Archive

Archive for the ‘Generator’ Category

Phase one

December 16th, 2009 Tim No comments

And in a feat not seen since the last time I took time off work, I have completed the first part of my project. I now have a procedurally generated line. Oh the excitement is palpable!

All steps in the generation of a horizon line

All steps in the generation of a horizon line

The above montage demonstrates each step taken in the production of the resulting horizon line. Each step uses the same simple algorithm which is the whole point of content generation. Even using the terrible random number generator provided by the standard C++ libraries seeded with the current time can produce nicely different results. Another excellent point of procedurally generated content is that a better RNG gives a larger spread of results, while clamping the seed to a known value allows you to use the same simple small algorithm to reliably create large reproducible data sets; be that images, sounds, or meshes.

Horizon 1 Step 8

Horizon 1 Step 8

Horizon 2 Step 8

Horizon 2 Step 8

These two images show how with even a very small difference in seed on a very poor RNG, the differences are quite noticable.

Categories: Development, Generator Tags:

Meantime

December 15th, 2009 Tim No comments

With all my work being taken up on building SOGui recently, I realised that I was loosing sight of the work that spurred me back into programming in the first place, namely procedural generation.

In that regard, I have started on another project. This one will let me begin producing procedurally generated visuals without having to go through all the legwork of creating a suitable GUI by using wxWidgets, and only using OpenGL as a component for drawing, rather than as a full interface. As with all my projects, I’m aiming to keep it as portable as possible, and useing Code::Blocks and gcc to develop it.

Below you’ll find a screenshot of the app in it’s early stage.

Screenshot of Horizon App

Screenshot of Horizon App

This will be the first part of a suite of ‘generator’ apps, and is concerned with only 2D procedural generation. This means it will simply take a line, and continually chop it in half, adjust the middle part up or down, and then continue to run on the new lines generated from that. An explanation of the algorithm itself can be found on http://www.gameprogrammer.com/fractal.html#midpoint. It is incredibly simple for now, but it should give me something to get started, and a break from SOGui.

If you’re interested, the source can be found, as always, on github at http://github.com/TimJones/Generator.

Categories: Development, Generator Tags: