TileMap Object

Hi ! :smiley:
I’m currently working on a new object type : the TileMap object.
It will make the creation of big tiled maps easier and will improve the game performance (one object instead of many small sprite objects).

For the moment, I’m working on the editor :


  • Basic tile management in the editor [OK]
  • Rendering [OK]
  • Support for tile’s layers [OK]
  • Collision mask [Not finished]

The source code (under heavy development) is available on my GD repository (tilemap-object branch) : https://github.com/victorlevasseur/GD/tree/tilemapobject/master

1 Like

Brilliant! :smiley:
It looks nice, and great idea!!!

:mrgreen: Just wanted to request this feature(s) the other day, really exciting. I hope 4ian going to pull this feature (however it works on git) and implement it into GD in the NEAR future.

Thanks Victor :slight_smile:

Thanks Victor for working so fast on something I’ve asked you on PM.

I think after it is finished, you should do a pull request so it will be in every GD version from now on.

Also, are tiles separate images or do I load one big tileset image?

It’s one big image because this is a big advantage (for performance especially because texture change is the thing that causes the most of performance issues) compared to using several sprites.

It’s also the goal because I haven’t the time to maintain myself extensions for each GD version (that’s why I don’t maintain my personal extensions anymore) and 4ian seems to be ok on that point. :wink:

Great. I’m sick of having to cut my tilesets in order to use them in GD (was big problem when I was making Candy Man Saga). Also is that thing you said about platformer automatism on PM still true or have you resolved it?

//edit: Also it would be cool if you could select multiple tiles at once and drop it as sorta object (e.g. selecting whole tree at once), like you can do e.g. in RPG Maker.

I’m still working on the tilemap editor, the render, collision code is not ready yet, so I can’t say if it works.

Maybe not in the first versions of the object, but I’ll try to do it after. :wink:

As example I’ve made shows: dl.dropboxusercontent.com/u/210 … ct%206.rar GD has no problems with “complex” collision masks for platforms so in theory it should work. Dunno about HTML5 though - last time I’ve checked it didn’t support collision masks.

Collisions masks should work in HTML5, I’ve just tested in the platformer example to be sure, a platform with a custom collision mask works perfectly :smiley:

I’m ok to add it to GD as it seems something great for most users. :slight_smile: I have only some simple conditions:

  • I want something simple, for the user. I prefer to have some features to be dropped for the first version if they seems to complicated to be integrated into a simple, easy to use interface. Using the object should be really easy: Add it, choose a image for the tile set, start drawing the map. (For example, the size of the map should not even be asked to the user: A predefined default size should be applied, and then the user can customized it if needed)
    -I want something simple, for the developer. Here again, I prefer to have some features not to be developed for now but keep the whole thing easy to maintain :slight_smile: It’s very important to avoid bloating the software.

In short, “Keep it simple, stupid”. :slight_smile:
So far everything seems alright, so keep up the good work :smiley:

Speaking of cutting off features. I think Tilemap object should be one layer only, otherwise people won’t be able to figure out how to put player
under some tile, like in this mockup:

Tree is supposed to be on player there, but due to this issue, it can’t easily be done as player will be on top of it. That’s a no-no IMO.

Players will still be able to use multiple layers by putting multiple TM objects on top of each other.

I’ve kept only three layers, they can be useful for some tileset.
Example : a tile has the house windows separated from wall. With a second layer, we can easily add the window on the house without creating another tilemap object (not easy to see where to put the window with another tilemap).
But, you’re true, if you want the player to go in the back of some object, you’ll need to create another tilemap. :wink:

Good news ! The tilemap editor is almost done, I’ll begin the tilemap object (rendering in the scene) soon.

So nice! Can’t wait to see it finished :smiley:

Wow it’s really nice ! Visual are incredible can’t wait :smiley:

Any reason tilemap and tileset are in separate windows? Wouldn’t it be more user-friendly if it’d be just one window, like in RPG Maker?

This is a dockable window, so you can put it anywhere (out of the main window or in the main window).

Some news : the tilemap object can now be saved/loaded and render the tilemap in the scene.
I’ve reworked the editor to give more space to the map editor : I’ve put all settings (tile texture, tile size, spacing, map size) into two separate windows.

If you have some suggestions :slight_smile:

Very nice! :smiley:
Again I think one of the most important point is that the user can quickly choose an image and start drawing the map. We can expect most tileset to be properly aligned and without space between tiles, and the user will simply have to configure the tileset if it is not the case :slight_smile:
Maybe it would have been convenient to be able to choose the image directly from the main window?

Yes, so what can I improve to make it easier ? Open the configuration dialog when opening the object for the first time ?
EDIT : If I add the possibility to change the texture directly from the main editor, I’ll have to had the image bank to main editor, it will take a lot of space. I prefer the automatic opening of the tileset configuration dialog when you edit a newly created object. :wink:

Automatic opening of the configuration window is a good idea yes! :slight_smile: