Lewis Linn-Cole

OpenGL Games

Introduction :: Tetris :: Tile Map Maker :: 3D Studio Max Importer :: Terrain Map

Terrain Map

About :: Downloads :: Screenshots


I felt as though I hadn't achieved much with the Tile Map Maker and realised that I had the skill and resources to make my own terrain maker. In order to structure what I really wanted to achieve, I have the following goals set out: -



These are the current working features (with the date they were completed in brackets): -

These are features that are being worked on: -

As I am also creating the real-time editor for the terrrain, these features are in addition to the standard "play mode" of the terrain: -

These are features that are being worked on: -

Of course, there is a lot more to it than these simple bullet points. I will explain a couple of things that may not be standard

A "restricted area" is an area where the moving object cannot go. This will be used in conjunction with models. E.g. a model of a tree is imported and placed somewhere on the map. This tree is a solid object, and the player would not expect to be able to travel through such an object. A restricted area is placed around the tree model which stops the moving object should it try to enter the area. This is achieved by storing a (storage) vector (an array of changing size) of points on the map and using the Winding Number Inclusion algorithm to test if a point lies within the polygon created by the vector of points. The algorithm used is taken from this page.

"Point-and-click" movement is when you click on the screen and expect to see your 2D mouse coordinates magically converted into the 3D world and hits a spot on the terrain. This is the standard concept for almost all MMORPGs that use a 3D terrain system. The way I have achieved this is by converting the 2D mouse input with gluUnProject. This gets a point just in front of the camera. With these two points (the camera and the input), a line can be formed. If the height of the line is the same as the height of the map at that point, then this is the point the player has clicked on. This is of course a simplification, but this is the basics of how this is achieved.




What does this demonstrate?

I have a good understanding of uniform grid height mapping. I also know how to keep objects out of given areas of a map.





* Note that the mouse pointer will disappear while rotating or zooming, and that roatation can be infinite. Also, when the right mouse mutton is release, it returns to its original location (where the right mouse button was pressed to start rotation).