LUA QUESTIONS!!! Okay, I am going to try to make some programs in Lua, so I am wondering, is Lua an OO? And BTW, what is the best game engine that is scriptable with lua? I want the games to be 2d AND 3d. Thank you
It has some objects: http://www.lua.org/pil/16.html That does not mean it is strictly an OO language. You can have objects and not be fully OO.
Heya, As e.mccormick stated, Lua does have a form of object, but it's rather finicky and overall not really worthwhile. Not to mention the performance loss when objects are used. Objects in Lua are just tables, these tables can inherit properties from what is known in Lua as a "Meta table" (a table about tables.) In other OOP languages, this is usually considered the "super-class" or "parent-class". Here is a tutorial you could watch, it attempts to explain meta-tables. - http://youtu.be/CYxMfVy5W00 As for game development, Love2D is the best that I know of. It's a 2D game engine, that is fully scriptable in Lua. - http://love2d.org However, making a fully 3D game in Lua isn't likely to happen. I would suggest using Javascript, along with the HTML5 Canvas element. With this you can develop 2D or 3D games using WebGL. (Also the fact Javascript uses prototypical inheritance makes JS OOP, in my opinion, much better and also nicer to use than Lua) Here is a list of Javascript game engines: - http://html5gameengine.com Hope this helps!
Join our real-time social learning platform and learn together with your friends!