Map Editor, what approach?

CraigG

Member
Joined
Nov 21, 2003
Messages
5
(VB.NET) I am looking for some advice as to which approach I should take in making a tile-based map editor for an online game. The entire map is roughly 16,500px by 16,500px. Along with the 16x16 tiles, I would need a 16x16 grid as the background, and the ability to add external images at 7 different layers. Tiles and graphics can have transparency. I would also need to do the standard map editing features, such as zooming.

So I guess the first couple of questions would be:

- Which graphics method should I use, GDI/+ or DirectX 9 (DDraw or 3D?)?

- Since the map is so large and will have to be scrolled, do I want to load the entire map into memory, or just redraw the visible section?

Thanks in advance for any advice.
 
- Which graphics method should I use, GDI/+ or DirectX 9 (DDraw or 3D?)?

If you need to ask this question, you probably have some exploring to do before you tackle a map editor. ;) I would recommend puttering with GDI+, then having a look at directx4vb.com (or any other tutorials around this forum) to get a start on that.

- Since the map is so large and will have to be scrolled, do I want to load the entire map into memory, or just redraw the visible section?

You wont be able to treat the entire map as one giant image. At 16,500 px^2, your RAM consumtion would be nuts. Youll probably want to keep your tiles loaded in some sort of surface and draw the currently visible area off of those. If you have a bunch of tiles, youll probably want to separate them out into map type or something, so you only need to have the relevant tiles in memory at any given time.

But I digress: Experiment with GDI+. Its easy. Then work your way up.
 
Your map editor should be using the map engine from your game. So whether or not you use GDI+ or DX is dependant on what the actual game uses.

My Sharp Invader game comes with a basic map editor. You might want to take a look at it for some ideas.
 
I originally had tried GDI+ and was discouraged by the slowness. After reading these posts, I took another shot at it, and sure enough; I just needed to learn the GDI+ tricks. Things are drawing just fine now with GDI+. Thanks for the advice once again.
 
Last edited by a moderator:
Back
Top