View Full Version : Alpha 2D/3D RTS Engine - Comments Wanted!
12-25-2001, 02:53 AM
Check out some shots and the zipped executable at:
Let me know what you think. I'm hoping to accomplish something at least as good as War 2. http://www.opengl.org/discussion_boards/ubb/smile.gif
12-26-2001, 12:09 PM
I have a question regarding the way I'm drawing my objects (trees and boats so far).
The landscape is a heightmap rendered as triangles to form a square grid. Projection is orthogonal. I first render the terrain, then the water all with depth testing on. Finally I render the objects with depth testing off.
I render the objects as texture mapped quads at the height of the terrain square they reside in. This allows boats to bob if water animation is on, since I perturb the water heightfield in realtime. When depth testing was on, it wasn't displaying the quads correctly - they would overwrite each other all over the place. When I turned depth testing off and displayed top to bottom on the screen it looks fine, as you can see from the screenshots on my page.
But when the ortho projection angle was such that a boat or tree was behind some visible terrain, the object was drawn on top of the terrain. I since fixed the ortho angle so that the backside of a slope is always visible, but I would like to know how to display these quads with depth testing on. This would have the added benefit of correctly showing things partially underwater, which is sort of desired for when I get troopers walking around in shallow water. I want the bottom portion of their bitmaps to be occluded by the water.
Any help would be greatly appreciated!
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.