Here is the source code to my 3D RTS Terrain Engine

Started by
43 comments, last by Possibility 19 years, 11 months ago
Back by popular demand (I''ve been getting lots of emails lately asking for it). I''ve put the file back up for download.

http://www.tc.umn.edu/~pull0017/files/3D%20RTS%20Terrain%20Engine.zip

Possibility
Advertisement
To Possibility!

I am ecstatic to see a designed engine for a specific task. I really enjoy optimizing and things like this!

So I eagerly downloaded the file, and got it compiled and running ( There were some minor compile errors ), but other than that, the application part1.exe just renders all white...

I was wondering if you had some insight or some general How to get it up and running information to share
If its rendering all white, it might be your video card, or something that you might have did to it to get it to compile. I wrote the engine with a Radeon8500 and Radeon9700, so if you have one of those cards it should work for sure. I used DirectX8 and Visual Studio.Net. When you run it, it displays some text on the screen for different things you can turn on/off like DX lighting, shadowmapping, textures, wireframe ect.. try hitting them and see if it does anything.

Possibility
Hmm interesting,

No text appears at all. Literally, nothing but a white screen; by reading the readme file I tried toggling various things on and off with no luck.

I too am using the .net visual studio ide; however, I''ve got a geforce 2 GTS.

Here were the following errors that I got when compiling:

c:\3D RTS Terrain Engine\d3dfile.cpp(232): error C2660: ''D3DXComputeNormals'' : function does not take 2 parameters
c:\3D RTS Terrain Engine\Tile.cpp(159): error C2143: syntax error : missing '';'' before '',''
c:\3D RTS Terrain Engine\Tile.cpp(159): error C2143: syntax error : missing '';'' before '',''
c:\3D RTS Terrain Engine\Tile.cpp(160): error C2513: ''char'' : no variable declared before ''=''
c:\3D RTS Terrain Engine\Tile.cpp(159): error C2632: ''float'' followed by ''char'' is illegal
c:\3D RTS Terrain Engine\Tile.cpp(168): error C2065: ''y_offset'' : undeclared identifier
c:\3D RTS Terrain Engine\Tile.cpp(167): error C2065: ''x_offset'' : undeclared identifier
c:\3D RTS Terrain Engine\Tile.cpp(162): error C2065: ''large'' : undeclared identifier
c:\3D RTS Terrain Engine\Tile.cpp(161): error C2065: ''med'' : undeclared identifier

All of these various errors were caused by the small variable declaration in Tile::IntializeTile:

// THIS NEXT SECTION IS FOR TEXTURE COORDINATES FOR THE ACTUAL TERRAIN TEXTURES
float small, med, large, center, x_offset, y_offset;
small = 0.25f;
med = 0.5f;


"small" was defined as type ''char'' in rpcndr.h. Since it was obvious by the declaration this was intended to be a float, I renamed it to fSmall. I also had to get rid of the second parameter to D3DXComputeNormals()... Not sure why though.


Anyways, if I get it up and running I will definately post

I reloaded up (its been a couple years since i last opened it) the code and got the same "small" error and renamed it just like you did. After that everything ran just fine.

It might be your video card. A Geforce2 is a pretty old card. I would say you need a geforce3/Radeon8500 maybe. With a little code modification, you should be able to make it work on a geforce2.

Possibility

This topic is closed to new replies.

Advertisement