Hi
Note from the future: this post was originally found on Tumblr.
Hi, I’m Captain Hennessey, creator of Civpy.
Civpy is a civilization game, written in Python. It’s going to have a flashier name but Civpy will do for now.
I’m also keeping it open source for now, to see where it goes.
Above you see two images. The first is a randomly generated world with a tiny house. This is the initial state of each Civpy game.
The next image shows the same world, only with the house evolved into a small village.
This is what I want to make: a civ game on an expansive map that’s very detailed at the same time. Cities aren’t just one tile (as was the case in the old Civilization franchise) but are a collection of buildings.
Each tile represents about the same size as a SimCity tile, which is around 1 acre. (So yes, if I want a map to represent an entire planet, we’ll need around 1m x 1m tiles—let’s park that thought for now)
The map is generated by a randomized algorithm. First it generates an altitude map, based on which other maps are generated (temperature, biomass, etc.)
The idea is that humans naturally start spreading around, but that the rate of spreading is limited by the surroundings: if there’s not enough biomass or arable land around, the population capacity per tile is capped. Also, “wilderness” is a factor: if you live on the edge of town, you’re more exposed to bad elements like wolves, barbarians etc.
OK, now some background about me and my motivation to make this game.
As we all know, game design involves a lot of hard choices, cursing and drinking. To make things worse, I’m not a good programmer.
Choice #1: Python.
Python is a little slow but there’s a lot of useful modules available such as Cocos2d. So basically all of the graphics and interface handling are done by Cocos2d. Later I will try to employ Cython to speed up the game, as well as directly use OpenGL to specifically speed up the graphics (it’s painfully slow on big maps and a reason why I can’t go beyond 64x64 currently).
Choice #2: Graphics.
The tiles are 16x16 pixels. Yes that resolution hasn’t been fashionable since the late ‘80s but it speeds up art development significantly. The trick is to make each pixel count.
Choice #3: No visible actors.
Most of the game state is stored in a bunch of two-dimensional arrays. You won’t see tiny figures running around (at least not for now). I figured it was going to take a lot of effort modeling individual characters (peasants, lumberjacks, smiths whatever) as they go about their business. Instead I chose for a SimCity-like approach, where (for example) population in one tile depends on the amount of food in the surrounding tiles.
Choice #4: No AI.
Maybe later :)
Thanks for reading, I hope to update as much as possible!