Map Editor

Started by
17 comments, last by Dennis 23 years, 10 months ago
to neonstar:
I originally wrote my map editor using windows GDI stuff, but decided, "hey, directx will allow me to do some more cool stuff", so I swapped over to it. What a performance hit.. I''m curious as to how you did your editor and how well it performs..

-Zims
Advertisement
I don''t know if any of you have noticed, but I have been ranting about not being able to get my map editors renderer working very fast on the board here. Well, I did my usual trick for solving problems I''m having a tough time with, I forget about it for awhile. I haven''t looked at my map editor code for 4 days. just a few minutes ago I opened it up and began to look into why it was slow. I was glancing through the code and bang, I saw what was wrong. I have two width height variable pairs, one being the window width and heigt in pixels, and the other being the width and height in tiles. Well, My renderer was rendering 652 tiles by 478 tiles (a tile being 32x32).. No wonder it wasn''t that fast. Now it screams along.. (Bangs head a few times for stupidity)

Just thought i''d tell everyone to glorify my stupidity..

-Zims
Zims- Life''s like that

Dennis- Have we answered your question? Some of us here have jumped on your thread a little!

Bye

Matt
I think I''ll have to write my own one, but the problem is I got an old compiler: Borland C++ 5.01! No Visual C++ with MFC or Borland C++ Builder with VCL so it is going to be an awful lot of work.

BTW: Matt, the city really looks cool!
Mappy is good mapEditor.......and it tells you how the files are stored and even provides you with an interface to use it with directX


"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions

While this subjects around, I thought I''d jump on, and ask a related question:

For a 2d platfrom game what should the editor do? What I''m thinking of doing it is to have it save levels in files which would have:
1: Info section with fixed size. This would contain map width and height, along with location of corresponding .bmp file for the graphics used by tiles. Possibly other stuff

2: Tiles array with data for each tile on map as to which tile it is (stored in a lookup table), along with tile properties. Each entry would be some kinda struct, containing location of tile on template, along with special qualities of tile(solid, liquid, slippery, etc...)

Is this the correct approach to take? I''m probably gonna try to get this small platform game done over summer, soon as I finish with tetris

J2xC (J. Connolly)

"Then study this: Borg provokes Klingon, Klingon breaks Borg's nose" Belanna Torres, Star Trek Voyager 5.11 "Someone to watch over me"

J2xC (J. Connolly) Ah! By popular demand, I shall no longer resist...

you''ve got it. the way my file format is for my map editor is like this:

1. it saves a bit of data so the loader knows it''s a valid map file.
2. it saves the full path of the tile bitmap used in the map.
3. it saves the info, such as the width and height.
4. the array of tiles is saved for each of the 3 layers.
5. the array of cell bits is saved for each of the 3 layers.

that''s it, not too tough. it seems like you know what you want, so i hope you''re successfull with it! remember, if you ever have any problems with it, you can always ask on this board. if i don''t reply, someone should...

david
--david@neonstar.netneonstar entertainment
You guys may want to consider using a script as an intermediate format. The map editor loads and saves scripts, and a compiler app builds a binary from it. The perks to using scripts is that you can change the map spec on the fly without trashing all your existing maps. Just recompile the script and boom, new version of spec, same map.

-Zims
thats what i had planned on, although the scripts will be compiled by a standalone script compiler i''ll write when i''m done with the map editor. that would make it where i could have one map file, but many script files that use the same map, so I could have the player re-visit the same area in a different part of the game, but be different pickups, enemies and events... ahh, the beauty of scalability...

david
--david@neonstar.netneonstar entertainment

This topic is closed to new replies.

Advertisement