TileMap Object

Thanks 4ian it helped.

A suggestion: would be nice to have a button to erase the tilemap object editor (delete all tiles) in case we wish to start all over again and also would be great if we could move the “scene” in the tilemap object editor by using middle mouse button, similar to GD scene editor.

Ok, I’ll add those feature including a button to fill the whole map with the selected tile. :wink:

I’m actually writing the (french) documentation, 4ian, what do you think of that http://www.wiki.compilgames.net/doku.php/game_develop/documentation/manual/built_tilemap ?

Any update on this regarding missing functions (editing map at runtime, custom masks)?

I am currently working on some other feature for the first stable version : Rectangle insertion, fill a layer with a tile and clear a layer.
TileMapObject - Rectangle Insertion.gif

The other features will come after the first official release of the object as the tilemap edition at runtime require some modifications.

Love it :smiley:

damn, it is looking good! :smiley:

It sure is. Though I think custom collision masks should take priority over rectangular tile placing. From my experience with RPG maker, the only tools I’m using are pencil (single tile putting) and flood fill. I use extremely rarely things like rectangle or oval filling, and so most people who uses RM from what I’ve seen in mapping video tutorials.

I see how replacing tiles at runtime can require rewrite of your code depending on way it was written in first place, so I don’t push for that, though.

For example I have this tile. It is “transitional” tile from slope to horizontal. At left it is tile zoomed 4 times and at right, black area is mask this tile would require. Magenta==transparency.

I’ve finally added tilemap edition at runtime because I’ve found a way to optimize a bit the tilemap regeneration. The tilemap is only regenerated ONE time if a change or changes happened in the previous frame.

Great! How about masks now? I’ve shown how only limited set of masks may be a problem with some sets.

Notice that if the collision mask editor will not be there for the first version, you can manually edit the tile collision mask in the project file as the collision mask is already stored as a list of points.

Well, that’s true, but I’m afraid I’d broke my project by accident.

Make a copy :stuck_out_tongue:

I’ve submitted the first version to 4ian for the next GD release. I’m now working on the collision mask edition and on some other small features.

Cool! Keep us posted. Also since sprite object has already mask editor, maybe you could borrow code from there?

Thanks Victor! As said in GitHub, I’ll merge it in a few days
If you develop a collision mask editor, the best thing to do would be to extract the code related to mask editing in the Sprite Object editor into a separate class/helper so that it can be plugged into any panel. :slight_smile:

That’s a good idea. Just have tomake some adaptation to make it usable for multiple polygons (Sprite object) or single polygon (Tile). :wink:

Isn’t single polygon special case of multiple polygons? Also, as I said before multiple polygons for tiles would be useful if you want to do some concave shapes, by layering two or more polygons on top of each other.

Once going to be worked on the code of the collision mask editor, I wonder if it can be an opportunity to improve it :laughing:
-add option to zoom in, zoom out to be able to see and select/drag polygons of mask easily or at least make polygons bigger to be able to select and move them inside the editor easily.

Imo, this feature is a must have especially in case of tiles, as at the moment to move polygons (set the shape of the mask to be accurate) can be a bit nerve-wracking in case of small sprites (tiles) but even in case of bigger sprites if it really has to be accurate.

Victor, maybe you could give us RC version of extension (one that you sent to Florian)? So I could start procuring my game? If execution won’t fail, my project would do for GD same thing Gunpoint and likes did for GM. Idea is very good and to my knowledge no one did such thing before, at least not the way I’ll do it, so…

But I need map extension so level building won’t turn into nightmare.