@TheComet & Sepp - This code has been through the wars with openGL and has had a few improvements made along the way. I just thought I'd finally finish it off using the original API (GDK & DBP) that it was started with. The UV mapping on the walls has now been sorted but another slight bug has cropped up. Hopefully be ready in a few more days.
I've been constantly keeping an eye on your projects, although I don't make my own comments regularly. One day I might produce a full game.
@MrValentine - It'd be nice to see the final version of yours too. Been a while now.
@Duffer - No, I won't be making any money off this. It will be released for free and the source code will be available on request. I'll try my best to add as many features to it as possible as it's still being developed in GDK.
The next version, V5, will be likely on a planetary scale which will produce landscape, water, underground tunnels and hopefully city scapes. I've got stacks of notes written down for the next version and it will probably take a long time in development alongside other projects too.
Currently what this version does:
. The base class, PROC_MAP, generates the floor layout.
. The inherited class, GDK_MAP, splits the floor map into its segments, builds the floors, walls and ceiling, tessellates for better lighting, textures and sets the bounding boxes of each segment. All UV mapping is also automatic.
. The entire object is made into a single DBP/GDK object and each segment split into limbs which makes for better optimised rendering.
. Each section can be textured separately.
. A noise algorithm is added the the level to create a real sloping effect and not flat like most.
. All values used by the generation algorithm can be changed to produce billions of different levels although even changing the seed will do that anyway.
. I'm assuming the final object can be saved out as a DBO file.
. Automatic occlusion of far away segments.
. Generation is very fast as some functions have been dumped that were using pure STL and replaced with plain fast ANSI C.
. Decorating the level will be easy based on retrieving coords from any floor, wall or roof section in any segment. Just place objects at that point or at the midpoint between edges or faces.
. Doors can be placed between rooms as the algorithm does set the edge flag to a door type.
Over the time that I've been working on this, tons of code has been dumped and replaced or re-written as optimisations and other features get added. Whilst I'm still working with this, other additions are likely to be added along the way.
Pseudo code for it's use:
myMap = PROC MAP NEW() ` assigns memory for the class objects and sets default values
PROC MAP SEED myMap, 101
PROC MAP CORRIDOR TEXTURES myMap, "cfloor.dds", "cwall.dds", "croof.dds"
PROC MAP ROOM TEXTURES myMap, "rfloor.dds", "rwall.dds", "rroof.dds"
PROC MAP GENERATE myMap
` will produce a map similar to the one in the video in the first post
Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!