Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
Bitty Engine: An itty bitty game engine
21–30 of 54 posts
Re: Bitty Engine: An itty bitty game engine
#22Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
Re: Bitty Engine: An itty bitty game engine
#23Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
Probably since you can embed it in other languages quite trivially. For instance, in C after about a dozen lines of code you can now pass around data into Lua and back to C and thus give you access to a scripting language with little fuss. It’s also a fairly small and simple language, so adding it in won’t add much more to the overall footprint of the project.
Re: Bitty Engine: An itty bitty game engine
#24Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
Re: Bitty Engine: An itty bitty game engine
#25Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
My understanding is that it's simply historically fallen into the niche. Lua early on was relatively easy to embed in C codebases, making it a natural fit for scripting C (or C++) game engines and their editors. So many hugely popular game development tools are scripted with Lua at this point that it's somewhat breaking the mold to use anything that _isn't_ Lua in this domain.
Re: Bitty Engine: An itty bitty game engine
#26Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
I think it’s less that it’s particularly good for gamedev and more that it’s particularly easy to embed in an engine, and it’s faster than it has any right to be
Re: Bitty Engine: An itty bitty game engine
#27Godot does it, and it's an awesome alternative to Android Studio.
EDIT: although it supports WASM, and I'm curious how well does WASM works on mobile...
Re: Bitty Engine: An itty bitty game engine
#28Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
1. It's super easy to embed in an existing code base
2. The language itself is simple and easy to learn
3. It has native coroutines, which allows game devs to write code without a spider web of callbacks
4. For what it does, it is fastRe: Bitty Engine: An itty bitty game engine
#29Silly question from a web dev who has never written a line of Lua before (or delved into game development). What is it about the language that make it such a good fit for game development? Seems like every time I come across these engines, or read stuff about game development in general, Lua is always the language of choice. Can anyone explain it in a nutshell for me? Thanks
I think it’s less that it’s particularly good for gamedev and more that it’s particularly easy to embed in an engine, and it’s faster than it has any right to be
The main Lua interpreter by PUC-Rio is among the fastest bytecode interpreters for a popular scripting language. Very efficient C code.
Wizard programmer Mike Pall then came along and wrote an even faster Lua bytecode interpreter in assembly language. And added JIT for even faster performance of hot functions.
Re: Bitty Engine: An itty bitty game engine
#30I know I'm going to bring down the mood, but that kind of engine should support android as a priority. Godot does it, and it's an awesome alternative to Android Studio. EDIT: although it supports WASM, and I'm curious how well does WASM works on mobile...