View Full Version : Recommendations Required

11-11-2004, 11:02 PM
I'm using Delphi 5 and I have no Delphi 3D experience at all, so any advice you guys can give me would be very helpful. So, thanks in advance.

What I'm trying to write is a Delphi application which will create a landscape from a grid of points (two triangular polygons per grid square) - where each grid square's corner point can be raised or lowered to create hills and valleys.

Having created a series of X,Y,Z points for each of the 'tiles' of this grid, I want to be able to texture them and view the results as a 3D representation in a window in my Delphi application.

The ability to raise and lower the landscape on the 3D window with the mouse would be nice, but not absolutely necessary.

The only other requirement really is to be able to move the camera around the landscape to view the resulting landscape.

My question is basically, what do you recommend for doing this in Delphi 5?

I've installed DelphiX and then read on the net that 3D support isn't it's strong point.

Also, as I'm no expert with DirectX, something with reasonable help files - preferably for idiots - would be a bonus! :)

Can this all be done with DelphiX, or is there an alternative to DirectX?



12-11-2004, 08:02 AM
If you want to go 3D then forget DelphiX. Though it is possible as the game Quazatron (http://turbo.gamedev.net/2003_04_20_issue.asp) was made with DelphiX, its far from easy, because there is very limited info about the 3D side of DelphiX.

Perhaps OpenGL is a better option for you. There are thousands of tutorials available (though most are for C/C++, but quite a few are for Delphi as well.

Here are a couple links you might want to check out (in no particular order).
NeHe (http://nehe.gamedev.net/) simply the best source for learning opengl
Delphi3D (http://www.delphi3d.net/) a great source with (more advanced) Delphi opengl tutorials
DelphiGL.de (http://www.delphigl.de/) A german/english site with some very cool demos and tutorials
GLScene (http://glscene.sourceforge.net/index.php) a great (if not the greatest :)) delphi library for opengl
Sulaco (http://www.sulaco.co.za/) A good site with many tutorials and a demos
GLXtreem (http://www.glxtreem.net/) another library, based on DelphiX but entirely written in opengl!

There are a of course many more, but these should get you busy till at least the end of the year (if not longer :))

Hope this helped a bit.

PS. Welcome to the forum

12-11-2004, 12:06 PM
Thanks for that!

I've managed to find a component called GL Visir, but haven't had time to check it out yet. It's free and looks like it might be able to do what I need.

Like DirectX, I know absolutely nothng about OpenGL. If you are familiar with it, can you tell me...

In very basic terms, (and ignoring objects & BSP's etc for now), is the landscape for an OpenGL game constructed using a matrix (grid) of tiles where each one is made from two poly's which you can deform by raising and lowering the corner points?

Or, do you possibly have to build the 'grid' yourself from individual poly's?

Sorry if my questions are stupid BTW... :)


12-11-2004, 12:24 PM
Oops... sorry, I forgot to mention that the Delphi application itself will export to a disk file all the X,Y,Z and texturing data for the resulting landscape.

This data will then be imported into another program running in a DirectX environment and used to rebuild the same 3D landscape.

If the methods used to create a landscape in DirectX and OpenGL are radically different then it may be necessary to stick to DirectX - even if OpenGL is the better option.


13-11-2004, 09:20 PM
You probably want something called height maps. They're basically a greyscale bitmap where each pixel indicates the height of that part of the landscape. There are quite a lot of tutorials on the net showing how to do this in both OpenGL and Direct3D (Delphi3d and NeHe have already been posted). If you only want to create such a height map you could try Terragen (http://www.planetside.co.uk/terragen/). If you want to create a program where you can fly around and see every detail I recommend that you look at some of the sites already mentioned.