How would you do a 2D map editor?

Advanced game related topics
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

How would you do a 2D map editor?

Post 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+?
GBeebe
Enthusiast
Enthusiast
Posts: 263
Joined: Sat Oct 09, 2004 6:52 pm
Location: Franklin, PA - USA
Contact:

how I'd do it.

Post 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.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post 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.
I love Purebasic.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Post by Poshu »

Heathen, that's smart! No flickering, hell yeah!

GBeebe: no game, just a map editor... I'm still learning
Last edited by Poshu on Sun May 11, 2008 9:10 am, edited 1 time in total.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post 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
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Post Reply