Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Why Firaxis switched from Python to LUA?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Acharis   Members   

5968
Like
0Likes
Like

Posted 27 July 2012 - 03:10 PM

Do you have any information why they switched for Civilization V? I tried to google it but so far only stumbled over flamewars regarding various scripting languages without the Firaxis' reason :)
Working on an Emperor focused, no micromanagement, asymmetric, 4X, space empire builder:

Stellar Monarch (4X, turn based): GDN forum topic - Twitter - Facebook - YouTube

#2 SimonForsman   Members   

7633
Like
2Likes
Like

Posted 27 July 2012 - 04:12 PM

Its hard to give you firaxis' reason (unless one of their employees lurk around here), but there are many reasons to choose lua over python.

The main advantages i can think of are:
1) Lua is smaller and faster. (at basic arithmetics and function calling, it loses greatly at tasks which the python standard library handles)
2) Lua has a slightly simpler syntax (no strict indentation) which makes life easier for modders, allthough i guess those who modded Civ4 are unhappy about the change as they most likely get less flexibility and have to learn a new language).

If they wanted people to write Civilization mods that turned the game into a first person shooter then yes, Python would be a superior choice, but for setting a few values and flags at runtime it just doesn't make much sense.
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 ddn3   Members   

1610
Like
2Likes
Like

Posted 27 July 2012 - 06:14 PM

I think it was due to speed. One of the original complaints about Civ 4 was it was too slow. Both Python and Lua are equivalent high level languages so flexibility wasn't the issue, imo. Lua in general runs about 4-5x faster than Python..

#4 Acharis   Members   

5968
Like
0Likes
Like

Posted 27 July 2012 - 11:09 PM

Sounds logical, thanks.
Working on an Emperor focused, no micromanagement, asymmetric, 4X, space empire builder:

Stellar Monarch (4X, turn based): GDN forum topic - Twitter - Facebook - YouTube




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.