Bezier Curves With Procedural Terrain Generation

 

Excecutable (5.39Mb)


This piece is a combination of two university modules: third year procedural content generation (the terrain and clouds) and a small part of the fourth year Advanced Game Technologies module, in which we had to show our ability to program mathematical concepts - in particular, Bezier curves. A full explanation of the technologies as written for coursework essay submissions can be downloaded here: Terrain Gen. Essay, Bezier Curves Essay. A link to the zipped executable is given above. Usage instructions are shown on screen in the program.

Abstract


Procedural content generation is picking up more and more notice as games get larger. Distribution costs for computer games are phenomenal and one thing we're probably going to see in the future is a move towards fully online distribution. This means that games have to become smaller. One way of doing this is to procedurally generate the content within a game, rather than ship large models in the package. This content generation strategy could also alleviate some work that artists have to do, letting them concentrate on more important things. In this project, a terrain is built entirely from code using algorithms such as Perlin noise, fractional Brownian motion, inverse particle deposition and height based smoothing. Even the textures are generated from four base textures and the terrain heights. Added into this is a sky built from clusters of billboarded sprites to represent clouds, with some very fake light scattering. These clouds are based on a technique used in some early flight simulators. To top it off a sky box and a simple reflective, animated water plane is included. a new terrain can be generated at any time simply by pressing 'N'

The composite Bezier curve maps a flight path that two aeroplanes follow. This is also procedurally generated and consists of multiple cubic Bezier curves joined smoothly at all ends to creating a continuous circular path. The control points for the curves are given along with some guide lines, to allow picking and full modification of the curve at the user's will. The number of curves making up the whole track can be increased or decreased (to a minimum of two).

The aeroplanes behave with simple dynamics, converting kinetic energy into gravitational potential energy and vice-versa to give a "roller coaster" illusion, where-by the plane speeds up as it looses altitude and slows down as it gains altitude. The camera can also be changed to follow the curve, providing a first person "roller coaster" view.