Tilemap object questions & concerns

Discussion and feedback on Construct 2

Post » Tue Nov 05, 2013 4:16 am

Massive thanks to Ashley for finally adding tile support!

I'd like to discuss the future of the tilemap object / some features that will make building levels with it more practical...

1) There appears to be built-in collisions for the tiles, which is pretty cool, but they're just squares. Are there any plans to assign some sort of collision map so that we can have slopes and other shapes as well? I think that's how Stencyl does it. Usually you have one layer for your graphic tiles and another for collision tiles but without per-pixel collisions I'm not sure how that'd work here.

2) I assume a tilemap object is the equivalent of a big sprite object with a level image. Seeing as you only get 1 tileset and 1 layer per tilemap object, wouldn't it be extremely inefficient to have entire tilemap objects just for, say, a foreground layer of plants or a few tiles from a different set? Will anything be done about this in the future? It'd be great if a tilemap object can have multiple tilesets and maybe layers of its own.

3) Are there any plans to add tile rotating, flipping, and mirroring?

4) Will we be able to "copy" tiles that have already been placed (like right-clicking a tile in Tiled)? This is very useful for laying down certain patterns to place elsewhere, and keeps you from having to go all the way to the tileset to pick a tile.

5) Will there be hotkeys for the tools? (At the very least right-click to erase tiles?)
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Nov 05, 2013 6:47 am

You should use sprites as dynamic behavior, there no magic in programming. Tilemap is used for decoration also you can create another tilemap with solid behavior to mask the collisions, it's nice to have a lot of props without counting of objects.

Joannesalfa2013-11-05 06:48:44
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Tue Nov 05, 2013 9:45 am

@Joannesalfa - That doesn't really adress the concern about slopes though

@MadFactory - Regarding question #2. I obviously can't speak for Ashley, but I'd hazard a guess that as far as C2's innards and runtime efficiency is concerned, a Tilemap would have the same effect as if you used several small sprite objects instead of one big one. The Tiled Background object works on the same principle, just that Tilemap allows for more than one tile.

I have some thoughts about the Tilemap as well.

First off, love it. C2 has needed this kind of feature for a while now and I'm happy to see it. That said, improvement is always an option.

1. While trying out the Tilemap object I found myself accidentally moving the object around at times. Locking the layer makes you unable to edit the tilemap. I think a way to lock the Tilemap object in place, but still be able to edit it, would be a good idea. Maybe even necessary.

2. I second the idea of more "advanced" editing tools. Copy/Paste, select and drag, and being able to make stamps of a certain set of tiles would be nice features to see in the future. Of course, Tiled has some advanced features we could use in the meantime (or instead?) but it would be nice to see it in C2 down the road.

3. Speaking of Tiled. It has a feature that lets you add properties to the tiles. This could be usefull for a wide range of different things. Having tiles be of different materials for instance, changing the sound effects when walking on them and such.

4. Loading and editing tilemaps at runtime. I'm guessing the use for this is pretty self-evident. Ingame level editors, animated tiles, etc.inkBot2013-11-05 09:46:07
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Tue Nov 05, 2013 10:04 am

[QUOTE=inkBot] @Joannesalfa - That doesn't really adress the concern about slopes though
[/QUOTE]

@inkBot I'm not sure what you mean, I don't think Tilemap will have custom collisions until we add sprites to place where are the slopes. I'm pretty sure Ashley will tell us to use sprites to make slopes.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Tue Nov 05, 2013 10:37 am

@Joannesalfa - That's the whole point. The Tilemap object is currently completely binary in regards to collisions, and it kind of needs to not be. If we have to resort to adding separate sprites to add slopes, not to mention jump-through platforms, you might as well go back to just using sprites for everything. The exercise becomes pointless.

The collision polygon method is most likely not suitable for the Tilemap object and it's not accessible in the image editor for the Tilemap object. Whether that is because Tilemap doesn't use it (to prepare for per-pixel collisions maybe?) or if it's just using a predetermined, unchangeable, polygon, I can't tell.

If the Tilemap object is intended to be purely cosmetic, then that's what it is. But I really truly hope that that's not the case.

Edit: The first paragraph came ut harsher than intended. It's not intended as a dig at the effort of putting in the feature at all, merely a concern about the future potential of the feature.inkBot2013-11-05 10:44:10
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Tue Nov 05, 2013 12:19 pm

1) I'm not sure how custom collision masks per-tile would fit in to the editor. How workable would it be just to place sprites on top and use them for collisions as well? It seems to be a good middle ground.

2) It's far more efficient like that - it's more like using a series of tiled backgrounds in the most optimal way possible. I'll cover how this works in a technical blog soon.

3) Only if it's essential - is it really badly needed?

4-5) The current tilemap editor is very much a first iteration. We'll be improving it over time.

@inkBot:
You can't move the tilemap if you have any tool other than the select tool chosen. You can also stamp sets of tiles by selecting a larger area of tiles with the pencil tool.

With regards to advanced features, for now we're taking a similar stance as the image editor: we get tonnes of feature requests, and we're a small team, so we want to get everything covered as well as possible. That means not getting stuck down rabbit holes making the image editor as good as Photoshop when Photoshop already exists, and I think the same thing with the tilemap editor with regards to Tiled. It's a lot of work to reinvent the wheel when the importer seems to work just fine, and the built-in editor serves well for tweaks or small-scale design.
Scirra Founder
B
402
S
238
G
89
Posts: 24,630
Reputation: 196,027

Post » Tue Nov 05, 2013 2:55 pm

Tiled Map Editor has collision polygons.
Couldn't that be added if you were to use a tmx?

Otherwise I might suggest something like a collision behavior, that had something like a importable mask, similar to Yann's Polygon plug.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Tue Nov 05, 2013 5:11 pm

@Ashley

1) It's really not that bad for simple platformers or top-down games, but as soon as slopes and other shapes are introduced, using sprite objects for collisions can become a real hassle.

2) Ok cool. Just making sure!

3) Yeah, kind of ^^; I always got complaints on my earlier level editors not having these features, so I made sure to always add them. I even went so far as to rotate/flip/mirror groups of tiles like tetris pieces..although that was a bit much!

4-5) Glad to hear it :)

I completely understand not wanting to reinvent the wheel, and it makes perfect sense not to dedicate so much time on a robust image editor when tools like PS exist. However, I feel that tiles are one of the few exceptions here. Levels are arguably the most important part of the game and we need to be able to work on them quickly and efficiently to get all of our ideas in there and make changes, no matter how large, as needed.

Having used Tiled, Ogmo Editor, DAME, GM editor, Stencyl editor, and a handful of my own custom level editors throughout the years, I feel that the features I mentioned are quite essential and in no way "fluff". They will definitely be used by everyone!

Also I know it's a big list and everyone is making their own suggestions - we just want to voice our concerns before it is too late and you decide to move on to the next big feature!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Nov 05, 2013 5:24 pm

@inkBot

Make your words as mine too.


Sme other concerns here:

Plus, while using the Tiled editor to generate TMX, always keep your tileset image in a common place, like the same folder of your TMX, otherwise, when backuping it, you'll lose your tileset image.

Also, work with power of 2. Common usages are 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512 and 1024x1024.

If you want make mobile games, stick with smaller sizes and vary your tilesets, or you'll full the mobile memory asap.

I do use invisible squared collision boxes to make my delimitations, stretching and resizing it as necessary.

--------------------

@Ashley, I didn't tested it already to say enough, but we will have the ability to use animated tiles, even if importing it from Tiled?TELLES08082013-11-05 17:32:00
Image
B
108
S
24
G
18
Posts: 1,375
Reputation: 22,828

Post » Tue Nov 05, 2013 5:34 pm

The short answer to all of this discussion is, really, use Tiled/TMX Importer. A majority of the feature requests are already implemented, and the big one that isn't - using big custom collision areas - is so inefficient as to be unnecessary.

Place tiles and use other, invisible tiles to set up collision in Tiled. If you want to build a tile-based game, that's the way it's done, and if you want it to be easier to build without having to wait on new C2 features, that's the way you should do it.

@TELLES0808: You can do animated tiles with TMX imports already. Have a single tile with custom properties set up in Tiled's tilesheet that tells C2 (through events) that the tile is animated and the name of the animation to use. Using multiple tilesheets works in a similar way.

For example:
[CODE]
Animated Tiles:
+ System TMXImporter.TileProp("_animated") = 1
Set animation to TMXImporter.TileProp("animationname") (play from beginning)

Multiple Tilesheets:
+ TMXImporter On each tile cell
Set animation to TMXImporter.TilesetName (play from current frame)

[/CODE]digitalsoapbox2013-11-05 17:45:25
B
88
S
47
G
25
Posts: 535
Reputation: 21,802

Next

Return to Construct 2 General

Who is online

Users browsing this forum: unicornspitfire and 1 guest