Live data from Hacker News

Grid – A Lua Game Engine

planimeter.org

1–10 of 79 posts

Re: Grid – A Lua Game Engine

#4

Why do people use Lua in a world where we have Python?

LuaJIT is much faster than Python, directly interfaces with C, incredibly small,and the language itself is very simple. This is also built on top of LOVE2D which is written in Lua and is arguably one of the best game frameworks out there.

Re: Grid – A Lua Game Engine

#5

Why do people use Lua in a world where we have Python?

Lua has significantly better performance than Python, but the big reason is that Lua has a very nice C/C++ API that makes it easy to integrate with other programs. Combined with a 20k LoC source code, and you have a programming language that is cheap and easy to embed, fast, and simple. Batteries are not included, so it’s very light weight.

Re: Grid – A Lua Game Engine

#6

Why do people use Lua in a world where we have Python?

Because Lua is much simpler than Python, but not in a way that makes it less powerful. You can grasp the entirety of Lua in your head, with all its semantics and behaviour, which is less easily done with Python (in my opinion).

Re: Grid – A Lua Game Engine

#7

Why do people use Lua in a world where we have Python?

Does Python have any good game engines? PyGame project is a nightmare. Lua's https://love2d.org/ is amazing.

Grid appears to be based on LOVE: https://www.planimeter.org/grid-sdk/api/Game_Loop

Re: Grid – A Lua Game Engine

#9

Why do people use Lua in a world where we have Python?

IMO, these are the main reasons;

1. Embeddability. You can create a game engine in a performant systems language like c++ and embed lua in it for the scripting.

2. Speed. The lua interpreter is much faster than python in general. When you throw luajit into the fix, they are not really comparable at all.

3. simplicity: lua is tiny. and one of the easier languages for non coders (game designers, artists) to get started with.

4. Effortless C interop. You can make lua bindings for anything written in c with minimal effort.

Now to this specific engine. lua has one of the simplest and most beloved game frameworks out there - Love2d. its almost a foundational game framework for so many people (like pygame in python, XNA etc), including yours truly. Its been a beginners choice for over a decade now. Grid is built on top of Love2d.

btw, just in case you are interested in a python game engine, you should try out Arcade. Its pretty feature rich and aimed at beginners.

Post reply on HN