Hacker News new | ask | show | jobs
by Meatshoes 6096 days ago
Lua is often used as an embedded scripting language within level editors, for example to keep track of the progress made on a quest or to trigger an event when the character reaches a certain point. Lua isn't used to code the game engine itself (in the vast majority of cases, there may be some obscure examples of game engines written in Lua)
3 comments

Right - The stuff that needs high performance or low-level access (e.g. graphics code) is written in C or C++, but most of the "soft layer" is scripted in Lua.

See: http://www.c2.com/cgi/wiki?AlternateHardAndSoftLayers

You need some LÖVE!

http://libregamewiki.org/LOVE

"LÖVE is a cross-platform, 2D game engine. The latest version of the engine is 0.5.0 released on September 9th, 2008.[1] It uses the SDL library, OpenGL hardware acceleration and the Lua programming language to program games.[2] It is licensed under the Zlib license. "

Much of World of Warcraft's user interface is written in Lua, and I'm not sure I'd classify WoW as an obscure example.
But the game engine is not. It doesn't use LUA to push polygons.
That is correct, but the game does use it for a lot more than just scripting.

ps: Lua, not LUA -- it's the Portuguese word for moon, not an acronym :)

So we can conclude then that games have many different facets to them and they can be loosely coupled enough that you can implement them using different technologies. The interface could be done in Lua, since it doesn't require intense computations when compared to graphics and physics engines.