Archived

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

Possibility

a True 3D iso engine

Recommended Posts

Since everyone has been talking about 3D iso engines, I though I would post mine here. Its got a nice feature in that you can switch between perspective and orthographic viewing with a single key press. It also blends the edges of tiles together to make them more seemless. http://www.tc.umn.edu/~pull0017/3D%20ISO.zip Use arrow keys/mouse to scroll Use + and - on the number-keypad to zoom in/out. Possibility Edited by - Possibility on June 25, 2001 10:00:52 PM

Share this post


Link to post
Share on other sites
Nice work I picked up about 18.5 FPS on a 32bpp desktop, RIVA TNT2 model 64, PIII 600 mhz.

I didn''t notice a difference with alpha blending on/off, though.

Question, are you rendering each tile individually in seperate vertex buffers, with state changes for each tile? Or have you grouped all tiles with like textures into a few VB''s? I''m assuming the former.

Share this post


Link to post
Share on other sites
Oh I forgot, use the arrow keys to scroll, along with mouse at the edge of the window. Use the + and - keys on the number-keypad to zoom in and out. You dont need to tell me the frame rate or anything because the one you guys got is a slow version, its rendering alot more tiles then are need for whats visible on the screen. The actual frame rate for the initial zoom level is about 3 times higher.

The way I have it set is that each tile has its very own VertexBuffer, and I have a single IndexBuffer thats used when rendering all the tiles. Checkout the wireframe mode to see what the tiles look like. I dont do any state changes between tiles, I just change the stream source and the texture if its different from the previous tile. I tried it once with using a single vertex buffer for all tiles that are the same texture, but that wasnt any faster at all, and its to much work as those vertex buffer would have to be regenerated each frame - which is super slow. Plus you when you start having hundreds of tile textures, it wont help any anyways, so its generaly best to have a vertex buffer per tile that is generated when the program is started, IMHO.

Possibility

Edited by - Possibility on June 25, 2001 9:54:11 PM

Share this post


Link to post
Share on other sites
I don''t quite get why you would need to regenerate the VB''s each frame. I mean, the tile coords don''t change, right? You would still only have to generate the VB''s once then forget about them. You would also save tremendously on the number of calls you make to set the current texture. I''ve read several times that the more verts you have per VB the better your performance will be (up to a certain sweet spot, that is).

Share this post


Link to post
Share on other sites
Oops, I meant to say you have to generate a new IndexBuffer cause you only want to draw the triangles that are on the screen, so you have to create a new each frame. Generating any kind of buffer will take alot time. Plus, if you have a map of 256x256 tiles x 8 vertices per tile, you get vertex buffers that are too large. Plus, if you were to change a tile from one texture to another, then you would have regenerate 2 new vertex buffers (regenerate the one of the previous and for the new type). From what I have seen its just faster to do it per tile.

Possibility

The faster version is one at the link now.

Share this post


Link to post
Share on other sites
Possibility, I haven''t got a chance to look at your engine as I''m at work, but I thought I''d touch on something.

Now, I''m fairly new to D3D, so I could be a bit off, but here''s how I understand it:

You''d want one large VertexBuffer, around 2000 vertices. Your individual tiles wouldn''t keep their own VB''s, but rather just the data that would go in them. When it''s time for a tile to render you lock the large VB, using the lock flag that tells D3D to KEEP the old contents, and starting at position 0 copy the vertices from the tile, update your position variable, then unlock and render. Keep doing this until your position variable + number of vertices you want to render next would be higher than your VertexBuffer vertices (2000), in which case you''d lock with the discard contents flag and reset the position to 0 and do everything all over again.

Also, you''d want to draw all of your tiles that use the same texture at the same time.

According to NVidia''s site the 3 things that slow down D3D most is 1) Switching VB''s, 2) Locking VB (with discard flag), and 3) Changing current texture.

Of course, I''ve never tried the above, so I don''t know how well it would work in your case. It would definately be easier to just draw it like you are doing now, but I just thought I''d mention it.


- Houdini

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Duron 750
256MB PC133
Geforce2mx

14fps!!! It looks real nice though.

Share this post


Link to post
Share on other sites
Hmmm, I am running a 650 Athlon classic w/ 256PC133 ram with a voodoo3 and I get about 46fps. 14fps is pretty low for a geforce2.

Possibility

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Using 800x600x16 in windowed mode I got 25FPS on my Voodoo3 3000 on a 500mhz Windows 2000 machine with 96mb''s of RAM. It''s looks pretty nice and unlike that one person I did see a difference between alpha blending on and off. It looks pretty ugly with it off. I really didn''t see much of a speed problem with it like the other people did so I don''t really see anything wrong with it. Good job -Kyle

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Im gettin 170-200 up to 400 FPS, nice work
P4 256ram, Radeon 64mg,w2k.

Share this post


Link to post
Share on other sites
Looks nice
like the wey you made the eges bleand (saves time and memory)
i get 200 to 300 FPS on a 2xPii266 with 1Gb Ram on a Voodoo3 OCed to 400 Mhz

nice work

for go to add res
1600x1200x16

-VBLimits
Sorry about the Spelling..


Edited by - VBlimits on June 27, 2001 10:59:30 PM

Share this post


Link to post
Share on other sites
Hi

My PC:
Geforce 2 MX, 800 Duron and 256 MB Ram.
I am using Win2k SP2 German


But I have only 8.6 FPS in Fullscreen or Window Mode
In the Ortho view, I have only a grey background


Somebody with the same problem ?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Looks good! 60fps on my P3-800/128/Geforce2 GTS Pro.

--vidlgon

Share this post


Link to post
Share on other sites
quote:
Original post by eis_os
Hi

My PC:
Geforce 2 MX, 800 Duron and 256 MB Ram.
I am using Win2k SP2 German


But I have only 8.6 FPS in Fullscreen or Window Mode
In the Ortho view, I have only a grey background


Somebody with the same problem ?



Same here might be something to do with drivers I guess.

Share this post


Link to post
Share on other sites
200-300 fps Damnnn!
How can I over clock my voodoo3? Also, my voodoo3 is only 143Mhz, how did you get yours to 400!?

Also, it seems that the geforce2 MX runs it very slow. You guys should try and update your drivers or something.

Thanks for the feedback.

Possibility

Share this post


Link to post
Share on other sites
45fps with perspective
76fps without
hmmm maybe my specs would help
AMD 450 K6-2
128MB
ATI Radeon VE

You might want to use:
bool GetAsyncKeyState()
to test if a key is being held down. This will make keyboard scrolling a lot smoother, because you update the position synchronously with the frame rate. You are probably using windows keydown messages right now? You should also increase the map size you draw. It can happen that a hill or valley dissapears before they are off the screen.

I really like the alpha-blend.
Zennehoy


Edited by - zennehoy on June 28, 2001 10:23:49 PM

Share this post


Link to post
Share on other sites
I''ll check out that GetAsyncKeyState(). The map in that demo is only 64x64 tiles. You can zoom in/out with +/- to see the hills more.

** Just to note, the only reason I posted that little demo is so people can see the difference between Perspective and Orthographic, to show that you can do a 2D isometric engine using Direct3D orthographic viewing and get all the bonuses that direct3d offers like alpha blending and z-ordering instead of using directdraw.

Possibility

Share this post


Link to post
Share on other sites