Sign in to follow this  
Acharis

Why Firaxis switched from Python to LUA?

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this