Analog - the freeform map editor, v0.5

I figure this is in a good enough state to let other people tinker with now, so here’s the first version of my shiny new map editor! It’s been written so I’ve got something to use to create levels for Rescue Squad, but it’s been written to be game-agnostic. It should be reasonably simple to use it for other games (although at the moment it might be a little restritive due to only really supporting point geometry).

(full version

(full version)

(full version)

(full version)

(full version)

Website link, with downloads, screenshots and an example project.

The example project is my project file for Rescue Squad maps, which is worth checking out as it’ll give you something you can just load and have a play with. It also shows how little effort is required to customise it for a particular game.

Other notes:

  • Please read the help files, the “getting started” section should cover the basics with a minimum of fuss (suggestions for improvement welcome!).
  • Theres bound to be some bugs when people start pressing buttons in completely different orders to me. If you find any then stick a reply in here and I’ll see about fixing it.
  • It’s still pretty early in it’s development, so suggestions for improvements and additions are very welcome. I’m particularly after UI improvements/suggestions. And if you’re writing a game that needs a map editor I’d like to hear suggestsions on must-have features for you particular project.

v0.2 added:

  • Layers support. Each map can have as many layers as you want, each with individual grid sizes and snap settings. Add, remove and change the ordering of layers.
  • Slick rendering. Map drawing is now done via Slick which means it’s a lot faster and is properly double buffered.
  • General ui polish and refinements.
  • More complete rectangle support.
  • Renaming of elements.

v0.3 added:

  • Element groups. Elements can be categorised into different groups so it’s easier to deal with large numbers of elements (eg. a group for all landscape tiles)
  • Expanded rectangle element attributes to include line and fill colour.
  • Rectangle instances in maps can now be resized with grab handles.
  • General UI polish (mostly improved point and rectangle element creation dialogs).

v0.4 added:

  • Polygon support. Right click a series of points to create and left click to finish. Select to edit and drag the control handles to add/remove points.
  • Grid changed to proper grid drawing.
  • Point elements can now have no image.
  • Map renaming.
  • General usability improvements.

v0.5 added:

  • Map zoom
  • Support for open polygons (polylines)
  • Recent projects list in file menu

Notes:

  • Theres to be an odd 3-4 second pause the first time you resize the map window. It seems to be due to some kind of SWT/AWT bridge initialisation but I’m not sure how to eliminate it at the moment.

Thanks

looking pretty shmick :slight_smile:

I’ll have to remember it when i attempt to make another 2d game

Looks good but not having tried it yet…can you layer your structure tiles over terrain tiles?

It depends on what you mean by “layer”. You can certainly overlap the sprites as much as possible (I prefer not to use the term “tiles” since they’re not locked to a grid) and to as much depth as you want. However there isn’t explicit support for separate layers within maps. I suspect I’ll end up adding it at some point though because it’s suitably generic and can help keep things organised.

Superb!

I’m adding in proper layer support at the moment, so I’m open for suggestions on how the functionality should work. At the moment my plan is to base it on the layers you get in PSP and Photoshop, where you explicityly add and name layers as you see fit. Sprites will then be added to the currently selected layer.

Things I’m not sure on are:

  1. Should you be able to select sprites not in the active layer? This would probably have to switch your active layer to whatever layer they live in, which could mean you end up switching layer without realising it. OTOH, only being able to select sprites in the current layer could be annoying when you want to move something out of the way.

  2. I also need to add support for grids and snap-to-grid. Should these be set up per-layer or globally?

Comments?

  1. how about pressing ctrl and clicking will select a sprite in a different layer and switch active layers.
  2. I would say by default globally but allow per layer support for different grid/snap options.

could allow free movement of sprites and if the ctrl key is pressed (or any other key like shift/alt) then it automatically starts snapping to the grid when moved.

This is Eclipse RCP, isn’t it? I’m just curious… is it more comfortable working with RCP than using AWT/Swing?
How about using SWT’s OpenGL implementation for rendering the map? Maybe you could use much the same code for rendering and animation in both the editor and later in the game. You could also implement some kind of test mode in the editor then, which runs the game, or part of the game.

Yup, it’s an RCP app. I’m currently finding it… mixed. For a start I havn’t used SWT before, so thats a big change and is slowing me down in places. Eclipse has some really nice plug in development tools which make things easier, and you do get a certain amount of functionality for free (or at least cheap). For me that includes the rearrangable GUI, multiple open editors and the help to name the few more obvious ones. On the down side some stuff is harder than it should be (particularly handling enablement state for some actions) and the documentation could be better. Overall I’m pretty impressed with it though.

As for putting the game renderer in the editor - I’ve tried that an in practice it’s not nearly as useful as it sounds. Plus it makes both the editor and game code all the more complicated. Plus the idea is to keep the editor independant of any particular game, so tieing it to one game doesn’t make sense.

An OpenGL renderer is planned though, particularly since I want to add support for deformable quads and arbitrary polys (eg. for collision bounds). The main question is whether to use SWT’s built-in OpenGL or whether to figure out how to embed a LWJGL context for display.

Proper layers support is now in, which is nice, and I’ve been extending it to properly support rectangle elements as well as point elements.

http://www.triangularpixels.net/Analog/Images/09%20More%20Layers.png

Hopefully will post a new build up in the next few days after I iron out a few bugs with the scripting/export support.

v0.2 is now available, with layers support, Slick rendering and builds for Mac and Linux.

(full version)

v0.3 is now available, with groups for elements (see element palette bottom-left), per-rectangle element outline and fill colours, and resizable rectangle elements in the actual map editor.

(full version)

Old project files will be automatically upgraded when they’re opened in the new version.

This looks really nice.

As for #1, why not make it like in photoshop where you can select a checkbox for “auto-select: layer / group” and if that’s selected then you’re able to click on stuff in a different layer?

Thanks. :slight_smile:

So far restricting editing to the active layer is working well - mostly it seems that I want to work on one layer at a time (eg. now I’m rearranging enemy positions and power-ups, I don’t want to be selecting background tiles and collision geometry). But I’ll keep that suggestion in mind for the future.

One thing I am considering is proper support for tile layers rather than just emulating it with sprites and snap-to-grid. There’s some UI shortcuts that you can take when working with a tile grid (particularly “painting” of tiles which make it easier than doing things on a per-sprite basis and might be worth the extra coding effort.

Linux link doesn’t work, looking at the Builds folder it seems the file is not there.
If you upload the file I will try to give you some feedback on how it behaves under Ubuntu.

Ooops, you’re right I must have missed that somehow - link should work now.

Don’t know how well it’ll work, since I think the SWT<->AWT bridge is a bit neglected on non-windows SWT platforms.

Version 0.4 adds arbitrary polygon support (both filled and wireframe):

http://www.triangularpixels.net/Analog/Images/version0.4.png

(full version)

A bundle of other fixes and general usability improvements as well. Also image-less point elements since Dragonene asked so nicely. :wink:

Other builds and a revised test project shortly.

Nice editor! I’m downloading it and trying to work with it. Only a question: what type of file manages the editor? (xml, csv, etc.).

Regards.
Paco.

The project and map files are stored as xml, but should you need another format (or simply a different xml structure) then the editor supports using custom export scripts and write out your data into whatever format you like (be it xml, csv or binary).

There’s an example export script in the test project which should get you started.