Welcome to Colobot: Gold Edition development blog. Because releases are rare and there are no new information on the main page, the project might look stagnant while it is in fact in semi-active development. Therefore, we decided to start describing changes we introduce to the game.

Today I’d like to talk about one of the big features added to Colobot: dynamic shadows. Introduced in 0.1.5 as experimental feature, it was later enabled by default after further improvements. Dynamic shadows in Colobot are implemented using Shadow Mapping technique. Shadow Mapping is used in majority of modern games, it is supported by most graphics hardware, and it is rather computationally cheap to use in real-time 3D applications.

Unfortunately, Colobot’s default engine uses OpenGL 1.4 which does not use shaders, so implementing shadow mapping properly proved to be difficult. Previously, OpenGL 1.4 device needed 6 texturing units in order to calculate nicely looking shadows, but it also introduced few bugs. After one of the recent commits, most of these problems have been solved. “Quality shadows” setting has been changed and it only enables self-shadowing of objects. Shadows are now implemented in graphics device instead of generic engine. Devices will automatically determine whether they can use nice looking shadows. OpenGL 1.4 device needs 4 texturing units for better shadows, other implementations need 3.

Previously only objects could cast shadows but after today’s commit you can enable experimental feature which enables terrain shadows. It looks better but the downside is that this feature will eat considerably more FPS. Also, most Colobot worlds don’t have terrain that will cast shadows so this feature might not be needed at all. Still, it can be used for testing optimizations. You can see the differences below.

To activate this feature, you’ll have to add lines below to colobot.ini: