Postmortem: Old .Net project

Back to 2006, I start to work on a personnal game project involving C#, .Net and Managed DirectX.

The goal was a X-COM/Master of Orion/Prevateer cross-genre “clone” (yep… perhaps I should clarify later πŸ™‚ ). No need to say that I wasn’t able to end that game πŸ˜‰

But during the process, I have worked on interresting topics:

  • Procedural generation;
  • Parrallax mapping;
  • Atmospheric scattering;
  • Scene Graph;
  • Xml DataSet.


In fact the most important thing I have worked on was the procedural generation based on Perlin noise. The aim was to generate planets surfaces, clouds, etc. using fractals methods (mainly based on Fractal Brownian Motion, or fbm).

Explanations on Perlin noise can be found here:
Noise Machine

Explanations on fbm and landscape generation:
Real Time Procedural Universe

Here some exemples of the result.

Planet and its moon

Planet and its moon

Another planet

Another planet

Another planet

Another planet

The basis for me was a seeded 3D fractal noise generator (with the same seed you generate the same output), the said Perlin Noise, use it with fractal methods (frm and like) to generate a heightmap (surface storing the result for each x/y coordinates).

In a second time, I generate a texture representing the surface of the planet using the generated height against a texture atlas (depending on the climate of the planet).

In a third time, I generate a normal map (floating point texture storing the normal vectors) based on the planet texture and the heightmap to be used by the parallax mapping shader to simulate depth by displacing texture coordinates.

Description of the Parallax Mapping:
Parallax Mapping

I also generate cloud cover with that tool, using this method.

Procedural Texture

Procedural Texture

Normal map

Normal map

For the setup of the scene graph reprensenting the different star systems, I use a .Net DataSet saved as a xml file. The DataSet allow to define tables, collumns, primary keys, foreign keys, so you can use it as a lightweight database (it have to stay small, everithing is loaded in memory). Nothing complicated (the model is strongly inspired from Master of Orion II πŸ˜‰ ).

Database editor

Database editor

Star map

Star map


In conclusion:


By using procedural generation, I was able to fill a large world with unique planets and that was cool πŸ˜‰

The main frustrating point for me was the performances. By the time of the project, fractal generation wasn’t fast enough in .Net to process at runtime, so it was limited to the editor part to generate content.

I will continue to investigate in procedural generation and perhaps more sophisticated methods (like Biomes, etc.).


About Sylvain Bories

Software Developer (.Net, C#) and hobbyist game programmer (Unity 3d, DirectX). Interested in Technology, Science Fiction, Fantasy, Ecology and Fencing.

Posted on February 1, 2013, in Computer science, Programming, Technology and tagged , , . Bookmark the permalink. Leave a comment.


Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: