Jan Zeleny's Development blog
27
2011
Changing seasons and optimization
To improve the impression of playing the same map for a long time, I implemented the runtime changing seasons technique. Now there can be different light, fog and vegetation color for every year season, leaves fall off in autumn,
snow descends into the lowlands in the winter, grass grow in spring etc.
I also did a lot of optimizations for vegetation, reflections in the water, and many others so the framerate is almost doubled. Therefore I also enlarged map to have 512*512 tiles.
Here you can see 4 seasons screenshots:


19
2011
Far ambient
I got rid of impostoring optimization and instead of it, I made a new optimization for drawing objects in a distance.
I call it "far ambient" and the principle is quite simple: Every object has its own low-poly approximation and when some
chunk of a map has been changed, the engine bakes all geometry and textures used in current map chunk to one huge mesh.
This takes some time (~0.1s) but It needs to be done only when some object has been added or deleted (when constructing, or using dynamite).
In ordinary frame, all far ambient objects from map chunk can be drawn by one render call! It saves the video memory used for impostors
and the most important thing: It saves the render time.
When the camera goes near the object, it is smoothly transformed to high-poly model by screen space noise thresholds.
You can see result here:
16
2011
Few updates
In last two months I did only few changes to engine and I've been working on gui migration to new API, cleaning of code, fixing some bugs. Now the development should go better with all of these changes.
You can see list with some of them here:
- Code polishing, few bugs fixed
- New gui system (without graphics yet)
- Better track laying
- New sea shader (improved normal map, reflection, sea shore waves)
- New grass shader able to cut grass on rocks, lower grass under tracks or buildings.
- Flowers where local humidity is high enough
2
2011
Development news
The development of multiplayer is not going very well, because of huge data that needs to be transported when player logs in (whole map with all trains, buildings statuses etc.) One of possible solutions is to disallow player to connect when game already started, but this is not what I want. I'd like to create server and let players connect run time.
I am also working on new gui system (not gui graphics yet). It should be more flexible and better designed for future updates. This task is almost done, now I am rewriting old functionality
into this gui system.
1
2011
Game rules improvement and plan for next week
I finally wrote some design document for this game and it forced me to make some decisions. One of them was industry system and benefits from satisfying some of market demands. I will not reveal what kinds of industry will be in Mashinky, but player will get different benefits from different production buildings and there will be around 20 different buildings/industries in 7 eras. I have already implemented all of these buildings and polishing rules (there are only placeholder models for all of these buildings, so I'd rather not take any screen-shots from this version :-) ).
Now I am trying to implement multiplayer via TCP/IP, so it will be possible to play via LAN or internet.
Players should have choice to cooperate or compete with each other.
13
2011
Track smoothing and First train station visualization
I would like to create game that will not only be strategy, but it should also be a very simple simulator where the player will be able to drive his train. This point of view changes the desired qualities of close look on building, trains and track where everything has to be more detailed.
The major problem for doing this was the shape of tracks. It was not smoothed in heights, so when the train changed slope, it was like a train accident. Now the tracks are finally smoothed and it is less annoying.
I am also thinking about train stations layout, because tracks are (due to tiles size) quite far from each other. Probably there will be covered platforms
and player will be able to build non-track tiles connected to the station like station building, warehouse etc. I will have to solve if the first train set will be American or European.
13
2011
Sea shader
It is more complicated to create a water surface in engine for Mashinky than in Transport tycoon. First implementation was back in university,
where I had sophisticated drainage system capable of creating rivers, lakes etc.
This system was great, but it had few disadvantages:
It took almost 1 second to rebuild drainage system after every change of map and It also couldn't reflect surrounding world due to many different lake heights.
I had to abandon this way and try to do it better designed for today's hardware.
Second try to implement sea surface was much better, because the game has only one level of water and it doesn't need to care while changing the terrain. The system for new water is only one huge quad across the whole map with following properties:
- Shader optimized for PS2.0
- It can render waves across the sea with small waves at sea shore and foam
- You can change terrain independently in real-time and the waves will adapt on new shore shape
- Capability to reflect terrain and objects like bridges above the sea gulf.
- It also has interesting visual qualities above very shallow lagoon
3
2011
New trees
I've decided to switch from generated trees to pre-modeled versions. Now the game engine uses 3 new trees (acacia tortilis, acer platanoides and fagus grandiflora) from very talented graphic artist Jan Marvanek.
Also the grass has been changed and all vegetation in game engine is now slightly animated in breeze. You can see
new HD screen-shots below:
25
2011
Winter trees
All trees in this engine have now two versions: summer and winter. I don't have seasons in my engine yet, but there is a snow fields, when you travel high in mountain.
It is much more realistic when these snow areas are covered by winter-looking trees, so when tree should grow high enough, engine will use winter texture.
28
2010
Speedup + Highlighting
In last few days I've tried to speedup starting of the game. This is improvement especially for this state of development (I need to run the game for few times per minute, so every second counts).
- Precompile of shaders
- Render object streaming when they are needed
- Track lay highlighting
Track lay highlighting is new feature that helps you to see what you are building and if it is possible. Here you can see one
screen-shot from construction mode:

22
2010
Save/Load/New game
Save and load of whole map with trees, trains, stops, buildings status, etc. has been completed. It has advantage for development, because now I can create many different maps for testing different situations and load which one do I want.
I've added "New game" option so I don't need to restart application to create new map.
There is also new camera for construction mode. Now it is simpler to lay track or manage terrain.
22
2010
Development progress
The development of this game is quite slow at this time. I have full-time job in another game development and I can not spend a lot of time on my own project, but I've developed few things recently and here is the list of main improvements:
- Grass has been updated with new color scheme
- Camera can now be scripted and it moves along predefined catmull-rom splines
- One new building has been added
- New linear fog
In next few days I want to work on better construction view (it is useful for more intuitive track laying, or terrain management).
10
2010
Basic engine info
The engine for this game is written in C++ and uses DirectX9.0c for rendering. Almost everything has been developed with respect to multiplatform use, so it can be further extended to render with OpenGl or it can be ported to another platform like Linux or Xbox360.
One of the most interesting part of this engine is capability of generate and render huge number of trees and vegetation. Trees can be quickly generated via L-System with mutations, different ages or level of details. It also has an ability to simulate spatial distributions for multilevel models of plant communities and few other ideas from amazing and very inspiring book Algorithmic botany, but I am not sure if I will use such sophisticated and heavyweight simulation in this strategy game.
For those who has some experience in game development, here you can read some of other features
already implemented into game engine: Terrain uses method called Interlocking tiles with chunked LOD,
hardware geomorphing and two prerendered maps with local conditions (slope, humidity, etc).
Vegetation is rendered with instancing and dynamic chunked impostors (they changes resolution and has
ability to accumulate with each other). This optimization gives enough power to real-time render more than
100,000 of trees, each with approximately 20,000 polygons on my ordinary pc.
4
2010
First short in-game video
The most recent part of development was implementing all previous game mechanics into new landscape. You can see the result in following in-game video:
4
2010
What does 'Mashinky' mean?
Mashinky is a name of the game under Monade development. The basic idea is to create strategy game based on isometric old strategy games mechanics (like Transport tycoon). This game should also have modern 3D graphics to let player drive the train like in train simulators.
Few first screen-shots and ideas have been released few years ago when I started to develop this game. You can see First engine and railroads logic. This engine was designed mainly for upper view and camera wasn't designed to follow train or to freely fly through the world.
Then I started to re-develop engine as my master thesis on University of Technology in Brno (department of Computer graphics and Multimedia). The topic was "Artificial landscape with vegetation".
I have created new game engine for interactive landscape generation with respect to natural phenomena like tectonic faults, water and thermal erosion, creation of drainage system with rivers and lakes. There are also techniques for creating and rendering of fractal vegetation via L-systems, impostors etc.