So I have a tilemap and want to draw platforms and other things that move or do stuff. I can have an object layer that defines a shape with a custom field that defines the tiles that make up the thing that's going to be removed, but then need to make those tiles into a sprite.
I'm stuck at the last part and wonder if there's a better solution to the first stages too? What's the ideas of the esteemed members of the board?
Comments
https://deluxepixel.com
Likes: oleg, antix
https://deluxepixel.com
I don't understand what you mean @SinisterSoft about "moving" to another map. Are you thinking about scrollers where one leads onto another where they wouldn't be rendered on top of one another?
Easy - import images in Sprite as suggested before (use object layer just to keep positions And properties - One of which may be the png)
'Hard' - add a platform tile layer on top of the object layer, then for each object in the object layer check if it overlaps with this one (where you drew your platforms through tiles) and rendertarget your platforms into Sprite/box2d obj when loading the level.
I believe that you can find something else to help you in some example around this forum. For starters I'd take a look at the tiled bump example made by antix some time ago: if I am not mistaken he had a way to generate 'boxes from tiles'
Likes: antix
There will be less small objects that move, so you can then have an object to object collision system - this greatly enhances a game. EG with Mario, monsters can bump into each other, etc...
https://deluxepixel.com
In tiled I have setup different object types. During the tiled draw in Gideros I process the object layer(s) to create a multitude of game objects...
As @pie also mentioned I made some code to create bump collision rectangles from a tiled map. The thread is here. The code isn't that efficient but you should get the gist of it
Likes: hgy29
I like the idea of keeping relative positions of objects on platforms using additional Tilemaps.
I found this, which pretty much contains the code I need to convert tiles into sprites already, so it looks like all bases are covered. Thanks again!
https://github.com/1dot44mb/gideros/blob/master/tools/TiledAsWorldEditor/class/TiledAsWorldEditor.lua
Likes: oleg
https://deluxepixel.com
@SinisterSoft that sounds interesting.. having just one clock. I might have to think on that
@totebo I just set all these things in the objects "custom properties" fields..
type - (horizontal, vertical, elliptical).
duration - how many seconds it takes for the platform to complete a loop.
position - how far along the path the platform starts (0-1).
clockwise - whether an elliptical platform will move clockwise or anti-clockwise.
width - how wide the platform collision rect will be.
Everything else can be calculated by an objects x, y, radius data. All in all pretty simple
>-
Likes: antix
Likes: oleg, antix
https://deluxepixel.com