🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Untitled

posted in DruinkJournal
Published July 07, 2006
Advertisement
TEH MMORPG!!1 Client now compiles, and runs nicely. There'll be 3 main primitives supported at the engine level; Sprites, alpha blended sprites and maps. A map uses the same code I was using before - It holds onto a texture sheet, etc etc. I'll briefly re-cap that, because the most of the rest of this entry is about it.
In the editor, you have tile sheets that are 256x256. Each one is one bitmap image, and you can paste 32x32 tiles from that around the map. When the map is loaded, it determines a good size for a texture sheet, based on the amount of free texture memory, and the cards maximum texture size (Actually, the render device does that now, but never mind). So you get a texture sheet size of something like 2048x2048 usually, lower if your card has less VRAM. When the map updates itself, it does something like this:
for(each texture sheet){   for(each tile in the map)   {      if(this tile belongs to this texture sheet)         Add this tile to the vertex buffer   }}

At render time, the map can just loop through each texture sheet, drawing all the tiles that are present on it. Which is all nice and dandy.

However, I'm thinking that maybe using ID3DXSprite to draw the map tiles would be more efficient though. This is something I'll have to profile, and should be dead easy to do (I can just create a different class and implement them both). I'd also like a map manager class to handle all the tile sheet malarky if I'm using ID3DXSprite. It can sort by texture, so that would effectively do the same as my render-update loop.

I don't know, I'll have to profile it and find out. The advantage of my map method, is that I have internal details I can exploit. The dis-advantage is that that's not nessecarily a huge advantage [smile]

I posted about the structore of my scene graph Here. Take a looksie and tell me what you think.
Anyway, time has run out quicker than I thought. Back to work.
Previous Entry Untitled
Next Entry Untitled
0 likes 1 comments

Comments

ildave1
"Client now compiles, and runs nicely."

Way to go man. Keep up the great work!
July 07, 2006 03:14 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement