Jump to content
  • Advertisement
Sign in to follow this  
MrKyleMann175

Creating a map editor

This topic is 1333 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, Im thinking of attempting to create a map editor/creator to act as both a game creation tool for myself aswell as a potential user tool for modding, what would be the most efficient way of doing this? I would using a method of while the editor is in use record the amount of times each time a certain model is placed aswell as its position and rotation, then export that information in a text file which would end up looking like:

Model: wall1
position: 34,0,12
rotation: 0,0,0
amount: 6

and so on for each model... and then when needed load the map into the game by using the "amount" as a for loop amount for each model for placement aswell as being used in the update/run function for checking for collisions?

thanks :)

Share this post


Link to post
Share on other sites
Advertisement

The most efficient way is definitely to use an existing editor.

 

Use an existing level editor - or maybe even just a pixelmap editor or text editor - and then write whatever conversion utilities are needed to produce the data in the format you want.

 

Some editors already have some mechanism to make plugins - for example, using a high-level language that won't waste your time too much.

 

Also consider the amount of time it's going to take your content team to build maps.

 

A feature-rich third party editor with plugins, add-ons, and conversion utilities, is likely to provide a better user experience with less effort, than trying to roll one from scratch.

Share this post


Link to post
Share on other sites

As appealing as using an image editing program like MS Paint might sound, when I went that way once, I found it unnecessarily annoying to use. Loading the images and reading the pixels to place objects in the world was very easy... but trying to place objects where blue is one object, and slightly-different-shade-of-blue is another object, made it increasingly difficult to look at the image and know at a glance what objects were what. It'd only be fine if you had a few different types of objects - but once you start having different floors, walls, plants, items, enemies, etc... to add to the map, the colors start to add up and the image-editing comprehension starts to go down.

Maps can still be saved/loaded as images though!

 

Getting a very simple in-game editor up and running in your engine takes very little work, as long as you rely predominantly on keystrokes and mouseclicks and don't care too much about fancy editor UIs.

 

Definitely use something like Tiled or Gleed2D if they suit your game, because they'd have more built-in tools allowing for faster content creation. You may need to spend a week or two to figure out how to load their file formats into your game though.

Share this post


Link to post
Share on other sites


I would using a method of while the editor is in use record the amount of times each time a certain model is placed ...

Model: wall1
position: 34,0,12
rotation: 0,0,0
amount: 6

and so on for each model... and then when needed load the map into the game by using the "amount" as a for loop amount for each model for placement aswell as being used in the update/run function for checking for collisions?
No idea what this "amount" is supposed to be. The example uses the model multiple times (whatever that means) but it seems to provide a single 3D position for placement.

 

In my experience, I found Blender very viable by using node extra properties and a python script to pull them out.

 

On Collisions

 

Do not use the same models. You will be sorry. Many beginners, often using uselessly overpowered i7 computers don't realize how much power they waste. Collision information cannot be reliably/trivially (pick one) inferred from the models.  Annotations built in the models tightly couple representation and behavior. You'll end up having three identical models where the only difference is a bit in the collision mask. This can be worked out but I find it just easier to require explicit, separate annotation of collision volumes.

Share this post


Link to post
Share on other sites

 


I w

On Collisions

 

Do not use the same models. You will be sorry. Many beginners, often using uselessly overpowered i7 computers don't realize how much power they waste. Collision information cannot be reliably/trivially (pick one) inferred from the models.  

 

 

I thought BSP-trees were invented for this. It seems there still is a need for a GPLed dynamic balanced BSP-tree with overlapping nodes implementation.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!