Re:Ask HN: If C++ is so bad, what should game developers use?
by silentbicycle on Sunday October 18, 2009 @06:17PM
(#888965)
While rather similar to Python, Lua has a simple stack-based C API that makes this far less of a problem. OTOH, Lua was designed for embedded use from the start, and its stand-alone interpreter comes second.
Re:Ask HN: If C++ is so bad, what should game developers use?
by lutorm on Sunday October 18, 2009 @05:18PM
(#888852)
Part of Civ IV (mostly gui stuff) is in python. They seem to be able to communicate with the C++ core fine.
Re:Ask HN: If C++ is so bad, what should game developers use?
by miloshh on Sunday October 18, 2009 @05:37PM
(#888892)
But I assume they did not write the game in Python and the optimize parts in C++. Quite the opposite - they wrote it in C++ and then found that some part (e.g. GUI) is growing in complexity while not being crucial for performance, at which point it is a good decision to use a scripting language for it.
That is a pretty common approach, but what was suggested above (writing first in HLL and then rewriting parts in C++) is, to my knowledge, never done in practice.
The only way you might get away with this approach is if your application is essentially a number of separate scripts that communicate through files. Then you can rewrite the key scripts in C++. But that is never the case for games.