Map Editor Question

Started by
1 comment, last by runnerbuddy2k8 18 years, 7 months ago
I can easily make a map editor in vb that all the maps have the same size. I could do one large picturebox and save it as a bmp file, or I could have an array of pictureboxes and save it to a text file(haven't learned xml yet). My problem is that I cant figure out a way to have each map with a different size. I'd use one of those free editors, but I'm planning on having collision detection part of my game's code, and not part of the map file. Please don't offer me something form a website unless its a tutorial on how to make one. I'd like to actually learn how to make it. Edit: Tutorials for VB. I'm not very fluent in other languages atm.
Advertisement
hey there,
i would suggest in your map file have a section that describes the map's sizes.
when you read the file, take these sizes first and create your map using them, rather than a fixed number that is programmed in.
to store your map you'll probably want to use vectors or multi-dimensional arrays. i believe that vectors are easier but arrays may be quicker (not sure on this, correct me if im wrong). which ever way you chose, make sure you thoroughly understand how to manipulate the sizes in the editor and then how to correct the map information accordingly.

hope that helps :)
the_moo
Well, after thinking about my project a litle more, it seems that having my map as one big picture won't work for what I want it to do. I've decided to have these layers in the order rendered.

1. Ground
2. Items that can be walked on
3. Sprites
4. Walls/Trees/Mountains/etc.
5. Roof Tiles
6. Sky Texture

My first problem is that when trying to create a public array to hold the data in vb .net 2005, I can only make it where I made the structure to hold the data.

My second problem is that when I try to draw a picture inside an image, it doesn't work at all. If I have to draw to the form, I can do that, but I'd prefer to do it within a box of some sort.

Thanks in advance.

This topic is closed to new replies.

Advertisement