At last, I hope it will be simpler to support all platforms 😉
Still hope for a C#/.Net support of game oriented 3D API (DirectX/Shaders)… That’s why I still use XNA/MonoGame…
Source: One Windows
Working on fractals and procedural generation, I faced an “interesting” problem…
.Net Random does not guaranty to produce the same output with the same seed on two different platforms (Framework implementation)… See:
In most cases I need the result to be the same across platforms (I need to generate the same landscape, event if I change the machine I am working on)… So the only workarounds are to override System.Random or implement my own random number generator.
For a good random number generator example (with tests and proof), see:
Simple Random Number Generator
For the design part, I have abstract the System.Random methods with an interface IRandom then developed a “portable” random number generator:
Some unit testing then go 😉
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:
Explanations on fbm and landscape generation:
Real Time Procedural Universe
Here some exemples of the result.
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:
I also generate cloud cover with that tool, using this method.
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 😉 ).
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.).
After one year made by tops but especially by bottom and by very low, here we go again!
In a sense, that was not more bad to disconnect from the development under Windows Phone / Xbox / Windows. Many things evolved and Microsoft stayed in the deliberate vagueness on many technologies, of which XNA (I suppose that it will move on this side when the new version of the Xbox will be launched). On the other hand, when we work with Microsoft technologies, we know in what expect because this kind of behavior is not the first one. It is necessary to take it with philosophy 😉
Smartphones, Desktop, Laptop, tablets, consoles, there is of what to titillate the imagination!
Without considering tools Express (to understand limited but free) covering more and more aspects of the development (Visual Studio, TFS, etc.)
In brief, it is the good moment 🙂