SimCity Source Code Is Now Open
Tolkien writes "Source code for SimCity has been released under the GPLv3. For legal reasons the open source version was renamed Micropolis, which was apparently the original working title. The OLPC will also be getting a SimCity branded version that has been QA'ed by Electronic Arts. Some very cool changes have been made by Don Hopkins, who updated and ported what is now Micropolis. (Here is an earlier Slashdot discussion kicked off by a submission Don made.) Among other things, it has been revamped from the original C to using C++ with Python. Here is the page linking all the various source code versions. Happy hacking!"
Actually it doesn't (debian-amd64/unstable) /tmp/MicropolisCore/src$ make ../tileengine.cpp -o build/temp.linux-x86_64-2.4/../tileengine.o ../tileengine.cpp: In member function 'void TileEngine::renderTiles(cairo_t*, cairo_surface_t*, int, int, PyObject*, int, int, int, int, int, double)': ../tileengine.cpp:215: error: 'Py_ssize_t' was not declared in this scope ../tileengine.cpp:215: error: expected `;' before 'tileMapLength' ../tileengine.cpp:221: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:229: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp: In member function 'void TileEngine::renderTilesLazy(cairo_t*, PyObject*, int, int, int, int, int, double, PyObject*, PyObject*, PyObject*)': ../tileengine.cpp:356: error: 'Py_ssize_t' was not declared in this scope ../tileengine.cpp:356: error: expected `;' before 'tileMapLength' ../tileengine.cpp:362: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:370: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:395: error: expected `;' before 'tileCacheLength' ../tileengine.cpp:401: error: 'tileCacheLength' was not declared in this scope ../tileengine.cpp:409: error: 'tileCacheLength' was not declared in this scope ../tileengine.cpp:497: warning: deprecated conversion from string constant to 'char*' ../tileengine.cpp:516: warning: deprecated conversion from string constant to 'char*' ../tileengine.cpp: In member function 'void TileEngine::renderPixels(cairo_surface_t*, cairo_surface_t*, PyObject*, int, int, int, int)': ../tileengine.cpp:620: error: 'Py_ssize_t' was not declared in this scope ../tileengine.cpp:620: error: expected `;' before 'tileMapLength' ../tileengine.cpp:626: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:633: error: 'tileMapLength' was not declared in this scope /tmp/MicropolisCore/src$
cd TileEngine ; make
make[1]: Entering directory `/tmp/MicropolisCore/src/TileEngine'
cd python ; python setup.py build
running build
running build_py
running build_ext
building '_tileengine' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I.. -I/usr/include/cairo -I/usr/include/pycairo -I/usr/include/python2.4 -c tileengine_wrap.cpp -o build/temp.linux-x86_64-2.4/tileengine_wrap.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
tileengine_wrap.cpp: In function 'void init_tileengine()':
tileengine_wrap.cpp:4529: warning: deprecated conversion from string constant to 'char*'
tileengine_wrap.cpp:4529: warning: deprecated conversion from string constant to 'char*'
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I.. -I/usr/include/cairo -I/usr/include/pycairo -I/usr/include/python2.4 -c
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
error: command 'gcc' failed with exit status 1
make[1]: *** [TILEENGINE] Error 1
make[1]: Leaving directory `/tmp/MicropolisCore/src/TileEngine'
make: *** [all] Error 2