Archived

This topic is now archived and is closed to further replies.

Possibility

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

Recommended Posts

Here is the full source code to a Terrain engine for a 3D RTS game I was working on. I stopped working on it about a year ago so I figured I might aswell let someone else use it. It uses DirectX 8.1b http://www.tc.umn.edu/~pull0017/files/3D%20RTS%20Terrain%20Engine.zip Possibility

Share this post


Link to post
Share on other sites
Wow. Uhm, thanks. Though I do intend to write my own, I will be extremely happy to download yours and study the code. :D

Something I thought was a pretty funny coincidence was good ol'' droid0.x is your unit on the terrain! Hehehe. My current stab at a game is a checkers game with droid0.x as the checkerpiece, rofl.

Share this post


Link to post
Share on other sites
sorry, but I just can''t open your link, would you be kindly to send it to my mailbox ? renqilin@sina.com, thank you very much..

Share this post


Link to post
Share on other sites
I browsed a bit on possibilities site and this is the new link.
http://www.tc.umn.edu/~pull0017/files/_vti_cnf/3D%20RTS%20Terrain%20Engine.zip

Share this post


Link to post
Share on other sites
Could you please try at least one more time? I''m really new to this and I think it would help me a little to actualy see how it works. So could you please upload it again?

Share this post


Link to post
Share on other sites
The link

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

was correct, but the file has been deleted from the server.

The _vti_cnf folders are automatically created by Microsoft Frontpage and contain 1 KB files with the names of existing real files. Don''t confuse those files with the real ones. The terrain engine source code can definitely not be found on the server at the moment.

Share this post


Link to post
Share on other sites
quote:
Original post by Origin
The link

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

was correct, but the file has been deleted from the server.

The _vti_cnf folders are automatically created by Microsoft Frontpage and contain 1 KB files with the names of existing real files. Don''t confuse those files with the real ones. The terrain engine source code can definitely not be found on the server at the moment.


I wonder then, how I was able to download it....

that is very odd indeed....

Dwiel

Share this post


Link to post
Share on other sites
If you were able to download it (and more importantly, unzip it) then you got it before Possibility took it down. It''s definitely not there now. If you''re talking about downloading the files pointed to in the _vti_cnf directory, you won''t be able to extract them. As has been said, these are just annoying, useless temp files which get created by Frontpage.

I''d love to see your source, too, Possibility. I''m specifically interested in how you are doing your texturing. You''re getting much better FPS than my humble terrain implementation.

-bpopp

Share this post


Link to post
Share on other sites
Oh wow, I didnt know there was such demand for it. No one seemed to want it before so I took it down. Anyways, I put it back up.
here it is.



I also just got a new Radeon9700 Pro and so had to test out the engine on my new comp - P4 2.6GHz

These images are with a much larger map, 128x128 tiles. The images in my first post were only 32x32 tile maps.

The very last image here is a wireframe image. The triangles are so small you cant see them individually.





Possibility


[edited by - Possibility on April 1, 2003 1:09:27 AM]

Share this post


Link to post
Share on other sites
Yeah, that''s the thing. I remember this from either a Flipcode IOTD or just some other forum post, but although the multitexturing is nice, the engine uses no LOD of any sort, making the usefulness of the code pretty limited... it would be very cool to have texturing like that with a LOD engine.

~CGameProgrammer( );
DevImg.net - Post screenshots, comment on others.
Town 3D Engine - A city-rendering 3D engine. Download the demo.

Share this post


Link to post
Share on other sites
You cant really use LOD with this type of game/engine. This is an engine for 3D RTS games like Empire Earth, Age of Mythology, or Warcraft3 ect... and they dont use LOD. The reason is because the camera doesnt zoom out very far and you can never see much of the terrain, thus LOD is not needed.
Also, this is a tile based engine. The terrain is not stored in one single mesh, but rather every single tile has its own VB, thus you can easily render only the tiles that will be visible, and also have any texture per tile (its not one single texture wrapped over the entire terrain). You do not want to use this engine for a FPS game!

If you turn this engine into an actual game, then you would also needed to set a limit for how far you can zoom out. Other then the very first screen shot, all the other 4 are way to zoomed out for a RTS game.

Possibility

[edited by - Possibility on April 1, 2003 9:23:02 AM]

Share this post


Link to post
Share on other sites
Very true. LOD is overrated in a lot of cases. Games without far view distances (FPS, RTS, etc.) don''t take advantage of it, and it''s faster just to brute force everything, probably doing some frustum culling as well. As you can see, he''s getting 171.19 fps rendering the entire map. It is on a Radeon 9700 Pro, but I''m sure the fps would still be high enough on a lower end card.

Share this post


Link to post
Share on other sites
Hm, dear author - can you comment please on how you draw the multiple textures? One pass per texture? This would be an awfull lot of passes (I am just trying to figure this out for my own attempts). Or are you multi-texturing (using less passes)?

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
Thona : what u ask can be achieved through single-pass multitexturing . A GeForce4 MX440 for example can blend 2 textures in hardware in 1 pass . Any amount of simultaneous textures higher than that (3,4...8) on this card for example would require more passes than 1.It really depends on the target hardware .

Share this post


Link to post
Share on other sites
I know this. This is why I asked - how it was done in this example :-) I am playing around with this right now myself, and - well - I try to optimise this.

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites