[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: My experience with Lua so far
- From: "Daniel Collins" <daniel.collins@...>
- Date: Mon, 5 Jun 2006 19:16:28 +0930
Some of you may have noticed (by my newbie questions to this list) that
I have just started using Lua in a mobile phone game I am developing. I
thought it might be interesting to post here how my experience and use
of lua has changed in just the last couple of months, and to maybe
compare this to the experience of others.
Basically, the game I am working on needs to be strongly data driven
with new minigames and other content able to be downloaded at any time.
At first I was going to write a feature complete traditional game engine
in C, and then write lua bindings on top of that C API. This would
reduce the lua side of the project to little more than a glue language.
However, as the power and flexibility of lua itself has become apparent,
I have changed my entire approach. Now I am making the C API contain
only the most basic functions that simply cannot be done in Lua itself.
On top of that I create Lua modules and "classes" that extend the engine
functions with niceties.
So rather than just a glue language that doesn't do anything that
couldn't be done just as simply in C, lua has become an essential part
of the project, sometimes with entire game systems also written in lua.
If profiling later in the project shows some systems to be performance
critical, I console myself with the knowledge that pretty much any lua
code can be translated into C code that uses the Lua C API.
Just my experience.