Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  
Evil Steve


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.
Sign in to follow this  

1 Comment

Recommended Comments

"Client now compiles, and runs nicely."

Way to go man. Keep up the great work!

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!