Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Exactly, like game developers starting to write their 3D engine in Lua. I don't get it.


Any sources for that? I know Lua is often used as a scripting language in 3D games since it is very easy to embed a Lua interpreter into your game. If you haven't seen it, you should take a look at the lua source code. It's beautiful.

Essentially, you are making a nice internal API to your engine objects that you can manipulate, and experiment with, on a higher level without recompiling your application all the time. Python is also nice for this purpose (see OGRE 3D), but it's not as lightweight as Lua.

So in a sense, it's better to use Lua for parts of your engine that will change a lot, depending on what aspect of the engine you are a focusing on at the moment (like tweaking how the enemy A.I. works, for example). This is especially useful at the prototype stage of your application.

Is that what you had in mind, or am I mistaken?


I sometimes wonder why Lua when Tcl already existed, but I've never used Lua.


This interview addresses that:

http://www.techworld.com.au/article/260022/-z_programming_la...

We needed an easy-to-use configuration language, and the only configuration language available at that time (1993) was Tcl. Our users did not consider Tcl an easy-to-use language. So we created our own configuration language.

Given how different Lua ended up, though, I imagine there was more to it than that.


Lua is much closer (not visually) to the C/Java family languages, which makes it more approachable.


LuaJIT is wicked fast, and being able to have multiple VMs with a single interpreter is very nice as well. With cooperative coroutines, a nice C API (for calling into lua) and C/Invoke for calling out of lua nicesly, it is a very clean and effective way to power your applications.


How can you blame them? Game developers typically have insane deadlines. More power to them.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: