Lua or Python

Started by
22 comments, last by BlueBerryBrainBox 21 years ago
One factor (really a minor complaint, but still something to consider...) thing that turned me away from Python was the fact that indentation and whitespace was part of the syntax, I''ve never seen anything like it in any other languages and honestly I think it could get in the way, especially with lots of nesting and stuff like that. I like the flexibilty of Lua''s syntax.

On the other hand a MAJOR con for Lua is the fact there are very few good tutorials out there...to really reach a good understanding about how to use it WELL I think you almost have to dig in and really digest the manual. Things to look into are ToLua (which someone mentioned above, I think)--it really helps to automate the busywork needed for classes and object oriented stuff. Also you might want to try downloading a wrapper that abstracts functions and hides the underlying API stack structure so that things are easier...or you could write your own, it''s not THAT hard

And if you get Lua up and running in your game, I''d definitely think about implementing a console so you can change variables on the fly.

Advertisement
I definitely recommend LUA and you will probably find that it is used in the game industry more then python. I really like LUA''s table structure - makes it really easy to organize data. I''m using LUA for my current package and made a wrapper to simplify things. I added functionality for self containing scripts (setPackage, closePackage, etc.). Feel free to use it in your own project. You''ll also find support for integrating C functions with scripts and call script functions from C. There is also support for opening and getting data from LUA tables. You can download it here:

DysLua - Lua Wrapper

The wrapper requires LUA 5.0.

Hope that helps. Feel free to ask if you have any questions.





--- COMPUTABILITY ---
--- COMPUTABILITY ---
Nobody's mentioned boost.Python yet, so I shall. It's awesome.

I'm hip because I say "M$" instead of "MS".

[edited by - the speed bump on April 2, 2003 11:38:44 PM]
"There is only one everything"
I would have to side with LUA

Started with in about 2 weeks ago.
Used by Bioware for Baldurs Gate... best game ever!!
Python is "glue-code". Use it if you want to build an application using modules that can be written in C++ or whatever...

Lua is "extension-code". Use it if you want to add scripting capabilities to an engine or an application.

Pyton wants to be in the middle. Lua wants to be added to something.

Well that''s my 2 cents anyways...

This topic is closed to new replies.

Advertisement