lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Dolan, Ryanne Thomas (UMR-Student) wrote:


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.
When using rendering technics there is a lot of geometrical computation done by the CPU (now lot of on GPU) , for example the frustrum culling. Typically eight test are done to consider an object is in the field of view or not (bounding box checking). So eight tests (a minimum if you have hierarchical bounding box for an object) by the number of objects to render give a lot of numerical computation in which lua is not as fastest as a compiled language. I think it is interresting to write a 3D game engine in lua if you rely on C-C++ extension to do the ''bottleneck routines'' as mentionned by kerry. Moreover, I think there is a also good reasons for people writing "heavy" game engine sometimes wrote in assembler.
Cordially,
dh.
begin:vcard
fn:David HERVIOU
n:HERVIOU;David
org;quoted-printable:Ecole Nationale d'Ing=C3=A9nieurs de Brest
adr;quoted-printable;dom:BP 38;;25, rue Claude Chappe;Plouzan=C3=A9;France;29280
email;internet:herviou@enib.fr
title;quoted-printable:Centre Europ=C3=A9en de R=C3=A9alit=C3=A9 Virtuelle
tel;work:+33 (0)2 98 05 89 45
tel;fax:+33 (0)2 98 05 89 79
note;quoted-printable:Doctorant En Informatique au laboratoire LISyC (Laboratoire d'Informatiqu=
	e des Syst=C3=A8mes Complexes) dans le cadre du projet AR=C3=A9Vi.
url:http://www.cerv.fr/~herviou
version:2.1
end:vcard