[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: class implementation
- From: Niklas Frykholm <niklas@...>
- Date: Wed, 05 Apr 2006 09:34:25 +0200
Funny you say that, because I used my game engine to write a simple
3d shooter, and everything is implemented in Lua with the luaglut
binding. I certianly wouldn't argue with your assertion that Lua is
slower than a compiled language, but writing a 3D game engine in Lua
isn't that bad of an idea. At least in my experience, the framerate
of a game is influenced most by the geometry it is trying to render,
not by the language in which it was written. For example, my
engine's framerate doesn't improve at all when I use LuaJIT, because
in reality there isn't much Lua code being interpretted each frame.
For simple "test" or "toy" games without animation, AI, physics,
culling, etc, this may be true. But in my experience, when you start to
push these things you quickly become CPU bound rather than GPU bound
(even with a C engine) unless you take great care and spend lots of time
optimizing your program. Using Lua instead of C for the low level stuff
means you hit the CPU-limit faster.
// Niklas