Thursday, 11 November 2010

Terrain decorations

I have improved the terrain generator of Teemu with some automatic decoration rules. It's the same kind of style I'm using in Kaduria: first create generic terrain structure, then decorate with automatic growth of features and plants. The new feature in Teemu is that rules are data-driven (related to terrain type) so with one scanning routine you can determine what extra tiles need to be created for that particular tile. The routine is creating things like automatic shallow water edges between ocean and land, and growing bushes next to trees etc. There is a primitive rule to actually remove bushes to avoid them getting too widespread. It's a primitive form of competing from space which I'm going to use in Kaduria in much bigger scale to create plant growth.

Tuesday, 9 November 2010


Automap colors were taken from ascii color values, except entrances which are purple and red player dot.

Friday, 5 November 2010

Scrolling gameview

One of the new features in Teemu. In order to get it work I had to separate the Display-functions from level coordinates and give them absolute screen coordinates. Level::Show is refactored heavily and it's almost ready. I think I need to link the offset checking routine into movement of player and not inside Level::Show, but I'm not sure if there is any speed gained since the offset check is going to affect moving speed anyway. I made the view follow the player's coordinates so it's scrolling each time you move, but I'm going to change that to push scroll type. It's harder to do, but better than continuous scrolling. The main issue with push scroll is the area not visible to player, but reachable by throwing item. The visibility check must include the area left outside the current gameview.

I have already made a support for variable size levels and tried both smaller and bigger than the default size. I guess most levels are going to scale to bigger sizes well, but smaller sizes could need some adjusting. It's nice that the default size for level is gone and there can be different size levels.