Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

abd9e4790f

Python or Lua for [game] scripting?

This topic is 5276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After reading this article on gamasutra.com, I think Python is the way to go. However, they never said Lua was bad either. And I definitely do not want to "roll my own." So which one can I get up and running the quickest? And which one has a fairly easy learning curve without sacrificing features and/or flexibility? Words of Wisdom:
"C# allows you to use DirectX very conveniently, but don't learn it instead of C++. Since C# programs require Microsoft's .NET system, the language is unlikely to become standard on console machines" (Ernest Adams).
"...many programmers believe that the programmer's main concerns should be correctness and clarity and that code optimization should be left to the compiler" (Stephen Prata).
"When you get into the game industry, don't accept the status quo to easily. Question things that seem questionable to you." (Ernest Adams), "Don't be arrogant about it, or insists that you know better than veteran developers, but don't blindly accept the prevailing wisdom just because 'this is the way we've always done it.'"
[edited by - DIRECTXMEN on June 3, 2004 10:46:25 AM] [edited by - DIRECTXMEN on June 3, 2004 10:52:59 AM]

Share this post


Link to post
Share on other sites
Advertisement
I''ve tried embedding LUA but I''ve played with both languages. IMO they''re both perfectly capable for game scripting, though LUA does seem more ''lightweight''. LUA is nice and easy to embed, I''m not sure about Python I''ve heard conflicting things about how easy it is to embed.

I''d say have a play with both, have a look at the API each of them provides for embedding and decide which one you want to use.

Share this post


Link to post
Share on other sites
I found this. It's on a lua users site so it might be biased. But still that's quite interesting.
Clicky

I already know Python and I like that language a lot. OTH, it seems that lua was made specifically for being embeded in other apps.

[edited by - Codexus on June 3, 2004 12:57:04 PM]

Share this post


Link to post
Share on other sites
Personally I hate phyton in Blender.
It seems as if the scripts have to be rewritten for almost any new release.
And the developers have to grab the latest phyton version if they want complete phyton scripting functionality.
Not sure if that is because of the way it is implemented though ...
and no idea if it would work as well and better with lua ... ?

[edited by - Clueless on June 3, 2004 1:08:00 PM]

Share this post


Link to post
Share on other sites
Not easy when you have no respect and see it written differently all the time.

[edited by - Clueless on June 3, 2004 2:34:39 PM]

Share this post


Link to post
Share on other sites
embedding python is a little harder (use swig and other third parties). python allows you OOP which is available in lua5 with little tricks. python is maybe too much heavier (stackless version,...). python is to java what lua is to C. So I chose lua and I''m really happy with it.
I use lua to script game parts and characters behaviours.

Share this post


Link to post
Share on other sites
quote:

"...many programmers believe that the programmer''s main concerns should
be correctness and clarity and that code optimization should be left to the
compiler" (Stephen Prata).



I have a hard time believing that many *GOOD* programmers put all their faith in a compiler to do things as optimally as possible. A compiler isn''t psychic, and it can''t possibly know what your program is actually doing. It can optimize some basic stuff, but ultimately a programmer can''t avoid doing optimizations of their own in many situations.
.

Share this post


Link to post
Share on other sites
quote:
Original post by Etnu
I have a hard time believing that many *GOOD* programmers put all their faith in a compiler to do things as optimally as possible. A compiler isn''t psychic, and it can''t possibly know what your program is actually doing. It can optimize some basic stuff, but ultimately a programmer can''t avoid doing optimizations of their own in many situations.
.


It''s OK, because "good" was nowhere in the sig quote. So SOT. Although, I do like a good controversial signature.

Anyway, looks like Lua is the favorite, so I''ll look into. I only hope it is as well documented as say python is.

Thanks.


Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!