Sign in to follow this  
Daniel Costa

Loading sprites (big map) XNA

Recommended Posts

Hello, I'm trying to make a 2d game, with perspective 45º (like Tibia, Zezenia, Phobos) .

 

I have some doubts about the map, at the moment my map is at the client side, but I need to map the map informations at the Server side, just the sprites at the client side.

 

But I have many doubts about how to load it, anyone got suggestions on how to load the map to the client?

 

Another doubt is how to make an effective map editor, by now I can't make a very big map, or my pc would just "explode", I'm thinking of an algorithm to just load the tiles that can be visible on my screen and when I scroll it loads the other tiles.

 

I'm using pictureboxes in the map editor, and the max size that I could reach was something like 500 x 500 = 250000 pictureboxes of 32px x 32px. But it all gets loaded at the same time when editing the map, I needed to load it in parts, any suggestion on the best way to do it?

 

Hoping for answers !

 

Thank you,

Daniel.

Share this post


Link to post
Share on other sites

You need to implement an paging system. You only need one picture box. And use the position of where you are on the map in your paging system to give you the tiles for that specific region.

Share this post


Link to post
Share on other sites

Here's a code framework for infinite worlds implemented in XNA: http://xboxforums.create.msdn.com/forums/p/111091/664227.aspx#664227

 

You would have to make an implementation of IPermanentMapStorage which gets maps from a webservice. 

You can probably use the rest of the code as is smile.png

 

/Jake

 

P.S. in case you are interested in seeing the newest version, which uses Perlin noise for map generation (not a requirement for the framework), it is attached to this post.

Edited by xnafan

Share this post


Link to post
Share on other sites

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

Sign in to follow this