Page 1 of 1

How would you do a 2D map editor?

Posted: Sat May 10, 2008 12:08 pm
by Poshu
Hi~
I'm toying with the idea of making a 2D map editor since a few time, but when I started working, some problem came in mind:

_If I display the map in an openwindowedscreen() it flickers massively here... Plus the whole programme is slowed down and It take a complete core of my CPU (Q6600)
_If I display the map using one big imagegadget, it's not convenient at all: heavy CPU usage I can hardly guess thee mouse position.

Can't choose between pest and cholera, any idea anyone? How did they do in RPG maker? Should I use GDI+?

how I'd do it.

Posted: Sun May 11, 2008 12:18 am
by GBeebe
Do you have a game that you are writing the editor for? I would display the graphics using the same technique/engine that the actual game uses. I like the idea of one window showing the level while another window acts as a tool box, properties/parameters editor, etc. My levels, however, are written in a text editor. But this all depends on what type of game you are making levels for... Tile based, non tile based.

As for the flickering, perhaps you should post some code so we can help you with that.

Posted: Sun May 11, 2008 1:03 am
by Heathen
Here's a tip: Unless you are using animation with many frames, you don't need to constantly render and flip the buffers. With my map editor, I only render when something changes or the window is switched.

Posted: Sun May 11, 2008 1:41 am
by Poshu
Heathen, that's smart! No flickering, hell yeah!

GBeebe: no game, just a map editor... I'm still learning

Posted: Sun May 11, 2008 3:34 am
by Rook Zimbabwe
I have been thinking of this same question myself... There are several FREE ones out there, but they have no examples or use with PB.

I really liked the FishEditor but they snobbed me and stated emphatically they would not support PB, only Blitz!

I recomend implementing LAYERS... minimum 4