very cool, only just noticed the updated version.
nice addition with the tile adding
very cool, only just noticed the updated version.
nice addition with the tile adding
Version 1.0
If you remove a tile from a tileset then open a map that referenced it, i think it will be erased (set to 0), but i haven’t checked.
Screenshots and download: http://juddman.googlepages.com/ (Mapedit-1.0.zip)
To run it, download the zip, extract, run make.bat, then double click mapedit.jar (or run.bat)
Linux users may prefer to type “javac *.java” and then “java MapEdit”
Open a tileset by clicking the little open button at the bottom of the tile chooser (it’s a bad location, i know), and enjoy painting
or open MyScene.dat for a look at a small map i already made.
If you prefer, drag your own images onto the tile chooser to make new tiles. They can be added to existing tilesets or new ones.
It’s been tested but not extensively. tilesets are not compatible with previous versions, though you could create a new one with the same ID numbers for the same tiles, and it should work with existing maps. not sure.
TODO: Allow user to adjust grid width and height.
Edit: oops, forgot to remove that “tileset” button on the toolbar. it’s a placeholder and does nothing.
Juddman any news on the undo fuction, i was thinking, you could always save the scene in a temp file, on mouse release. or something like that, then reload it, when undo is called.
Looking at the site, undo/redo was done in the version prior to 1.0
New in 0.11
Undo and Redo.
Sweeet, very cool
By the way, resizing the map and shifting the tiles using the arrow buttons on the toolbars can’t be undone. Just thought i’d give you the heads up.
I have recently pushed a very small change to the SVN version, it just fixes a little UI annoyance related to clicking the tile chooser buttons sometimes not registering properly, and an issue where the tiles ‘type’ would be set to its ‘user text’, and the user text would be null, losing the type string completely.
the svn is here:
svn checkout http://simple-map-editor.googlecode.com/svn/trunk/ simple-map-editor-read-only
The project page is here:
http://code.google.com/p/simple-map-editor/source/browse/
The files that have changed are:
TileChooser.java
GraphicsBank.java
MapEdit.java
Tile.java
gfx/outdoors.sat
And since it’s not on this page of the thread, i might as well chuck the home page URL:
http://juddman.googlepages.com/
I am quite happy with it for the moment and don’t have anything on the todo list. Suggestions always welcome, but modified code is even better. If anyone would like to contribute something, i can add you as a project member to the google code project.
Edit: Something i have noticed is with the latest JVM, OpenGL accelleration is enabled by default, and it makes the editor really smooth, even when maximised on a large map and using a lot of alpha blended decorations like that huge shadow image. Well worth the update.
JuddMan,
I created an Eclipse project, and an ANT build file to allow us folks not running windows (Mac and/or Linux) to get into the action without too much grief. I altered the MapEdit and Tile classes to overcome the class resource mess so you can package the class files into a jar and have your resource files outside of the jar.
Drop me a line if you wish to have this nice little extras.
mcco0055: OK, i sent you an email.
I’ve made a couple of small fixes and uploaded a new version, It’s a JAR file, so should be easier to get going than before. the tile images are in the jar file and will have to be extracted if you want to use them.
juddman if your interested, I uploaded a copy of your map editor modified for my game. http://users.on.net/~bobjob/RTS_RELEASE.zip
cool, downloading now…
Interesting. very different. It looks like you based it off version 0.8.
Different grid sizes per layer, a height map, and sprites
I had a go at the game too but my guy died on the first enemy i attacked.
You could probably save some space by not including all the tiles you dont use
There is still a little bit more Iv added, like added a forth layer for air units (but it isnt implemeneted in game yet).
The game is still extremely un playable.
yeah forgot about that, cool I deleted them.
I’ve been looking into PNG and metadata recently.
What i’d like to do is make the GraphicsBank sets saveable as a single PNG image of all the tiles, with metadata describing the position and size of each tile in the set. I think i can do this by creating a tEXTEntry node with the info needed.
As well as this, maps could be saved as a thumbnail image with the metadata containing the map itself (which should be easy, since it’s already just text).
I’d actually like to be able to optionally store the tiles themselves in the map image somehow, but haven’t figured out how i’d go about writing a binary chunk into the PNG metadata (ie the way Fireworks stores layers). custom chunks don’t seem supported by Java.
Does anyone know if what i am thinking of can be done with the standard API?
There are two advantages of this approach:
and if i could store binary as metadata then
3. Map and tileset could be combined for easy transfer when convenience is more important than size.
hey juddman, here is my source code. for my version of your map editor.
There is a bit of code you might find interesting.
In class Scene there is some code to generate a “jpg” MiniMap
Map Editor Source (700k)
it may be useful if you ever want to make an RPG, and want a world map image.
somthing else to note is everything saves into a zip file (but with the extension “.cmp”)
How do I run this ? Thanks.
The above source link no longer works?
you download the JAR file from http://juddman.googlepages.com/ and then double click it.
If some program stole your .jar file extension (older versions of WinRAR do this) then you can right click the downloaded file, choose open with, and pick Java (you can also pick ‘choose program’ to permanently change which one opens those kind of files)
If you want some tiles, the source, or some sample maps, then all you need to do is unzip the JAR file using WinRAR or Winzip. it’s all in there. to run it once unzipped, there’s a file named ‘run.bat’ that you can double click
If you want to edit the code, you can compile it just by using javac, or by double-clicking make.bat. This will also make a new JAR file with everything packed up for you.
Hey Juddman,
First off thank you for the tool. I ended up using it as a starting point for a small RPG im working on and it gave me the motivation to actually start something and stick with it
I have a change to the application that I need make for my own purposes but I didn’t know if you wanted to be involved in it as an additional feature to your application? I have a tile set that I’m using that has some tiles that are larger that the tile width and height( but still even multiples such as 64x64, 96x96), a tree for an example. Currently if I place that tree on layer two it will anchor to whatever tile i select and render accordingly. The problem come when you want the char to walk behind it. Obviously if hes below the the trunk of the tree you want him to rend on top of the tree but if he’s above the the truck he needs to be behind the foliage. Obviously the truck should be the only tile that performs any collision detection as well. This problem worsen if your truck is bigger than that tile you selected then make collision detection even worse.
I don’t have the code design yet but here’s my solution (That may have some kinks that still need to be worked out). I was thinking of making some type of advanced tile pallet for your editor. Basically I could define a reusable “stamp” that would place the trunk on a defined layer in the selected tile have a defined type that tells the game it’s not a traversable terrain (for collision detection) and then place the foliage on level 2 in their own tiles with their own defined types. So as a result when using these tiles from the “advanced Pallet” the tool would place multiple tiles that all have their own attributes.
The tree is the simple example. I have some elaborate cliffs that may be 3x3 in tiles and only one tile is a traversable terrain type but i would go nuts if i have to break out the cliff into 9 tiles! Buildings are another good example too
I would love to hear from you and your thoughts. My email is Jeremy.R.Corson@gamil.com.
It’s a good idea and I’ve thought of having a mass tile stamp a few times before.
An alternative that would probably work is to use the top layer to paint walkable / unwalkable tiles - you could use semitransparent green and red boxes, and just not render that layer in your game, but use it for collision detection. This would save you splitting up tiles (which is kind of pointless if you’ll never use them individually - we’re not in the hardware-restricted NES days anymore), but it would use up a layer (feel free to edit the code to allow more layers - shouldn’t be too hard).
Sorry didn’t see your response till now and I also noticed i typo’d my e-mail… it’s gmail
The 4th layer for collision isn’t a bad idea actually. But i would still need a way to do the “walk behinds” for larger tiles such as trees. This would work well for my large cliff tiles tho!
for trees, a small block for collision at the base of the tree with the rest of it being walkable should work.
To make a sprite render correctly and go behind stuff, I would render all of the bottom layer first, then the middle layer, row by row, but at the end of each row on the middle layer, also render all the sprites that are standing on that row. This way, when you render the next few rows down, all tall things that stick up will be drawn over the top of that sprite. Finally, render the top layer which has things that are floating and should always go above the sprite.
The trick i used was to place the origin somewhere on the bottom edge of the tile instead of the top, so that tall tiles stick up, and therefore go in front of tiles on the row above them, rather than sticking down and going behind the tiles on the next row.
It’s not perfect. if you have a tree with overhanging low branches, you might want to break those branches into separate tiles and put them on the top layer so that you never appear to walk in front of them.
Don’t be afraid to use nice big transparent images. you don’t have to have a picture in every tile on the grid.