How do I keep my tileset steady ? U_U

0 favourites
  • 6 posts
From the Asset Store
Huge Collection Of Platformers Game Assets (Tilesets, props, etc)
  • Tile width

    Tile height

    Two properties of a tileset object that I use on many layouts. On one of them, I changed it from "4px*4px" to "1px*1px". The editor cleverly keeps this change to that one layout so I launch the game and my hero warps from this 1px layout to another and discovers a world of glitch.

    I'm currently angry

  • 1px*1px seems a little extreme, I wonder how that would look like. Games usually never go that far for tile sizes, the standard is 32x32 or 16x16 AFAIK.

    Try posting a capx, to be honest I don't understand your problem very well.

  • I dont see your hero. I dont see the tilemap. I dont see how they interact. Lets suppose its a platform.

    I would like to give you 2 things 2 think over.

    First.

    Speed is set as pixels/second. (I would welcom an action that sets speed/dt)

    What importand in this is ... to know how many pixels something with a certain speed moves between the same event in the sheet.

    The time it takes to check again an event you can read in the expression dt.

    Now suppose an object is 1 pixel in size. And it moves at a speed 200 pixels/second. (= is rather slow)

    Suppose you have an 'on collision' event.

    Suppose the object it has to colide with has also a size of 1 pixel.

    Suppose it runs at 50/second.

    Now every dt (tick) this object moves 200/50 = 4 pixels. If the objects that it has to collide with is on a position%4 not = 0, there can be no collision dedected. Moving object is just never ever on those positions.

    So, Size Matters.

    Secondly.

    Push-out-off-Solids. (PooS). Actualy, platform, bullet, physics all those behaviors depend on PooS.

    Platform by example. The hero jumps. Falls. And then, at one moment, he actual wil overlap the Solid with some pixels. Now the PooS routine starts. It moves the hero back up till its out of the Solids. And that is how the hero walks on the Solids.

    If you use a tilemap. Each tile has its collision map. Now again. Hero jumps. Falls down. TIll that moment he will overlap the tilemap. But now the hero is overlapping (depending on the speed as explained) a lot of tiles (because they are 1 pixel tiles). And they each start the PooS. And probaly some dont know whats up or down. Resulting in weird calculations, and they are probaly not even all calculated when the next tick arrives.

    Again, Size Matters.

  • It's a 160x120 game, I use 1px to create details in my scenes ^^

    The problem is .. my capx is too heavy so I'll try to explain better

    Imagine two layouts that uses the same tileset object.

    The first layout uses 4px*4px blocks of grass and brick, I didn't need to change any elements.

    The second layout needed a river, that's why I changed the tile size to 1px*1px to draw it on the go.

    I like this idea, drawing directly in the software .. and it works ! I check on the first layout and it didn't change, the properties still are "4px*4px" even if I set "1px*1px" on the second one.

    Now I run the game, and the first layout just act as if it was set on "1px*1px", everything is a mess..

    Why the editor lies to me about keeping the tile size ?? U_U

    [quote:4p4sb6ol]So, Size Matters.

    I think you didn't understand my issue here..

    But are you saying using 1px*1px with collision is a performance issue ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is what we talk about ?

    https://www.dropbox.com/s/ap7w3ni8wf6di ... .capx?dl=0

    This is what you could not show ?

  • It's a 160x120 game, I use 1px to create details in my scenes ^^

    The problem is .. my capx is too heavy so I'll try to explain better

    Imagine two layouts that uses the same tileset object.

    The first layout uses 4px*4px blocks of grass and brick, I didn't need to change any elements.

    The second layout needed a river, that's why I changed the tile size to 1px*1px to draw it on the go.

    I like this idea, drawing directly in the software .. and it works ! I check on the first layout and it didn't change, the properties still are "4px*4px" even if I set "1px*1px" on the second one.

    Now I run the game, and the first layout just act as if it was set on "1px*1px", everything is a mess..

    Why the editor lies to me about keeping the tile size ?? U_U

    [quote:2act7k5o]So, Size Matters.

    I think you didn't understand my issue here..

    But are you saying using 1px*1px with collision is a performance issue ?

    That defeats the purpose of having a tilemap in the first place. Tilemaps are supposed to be reusable chunks of level, not a palette of pixels that you would use like when editing a bitmap in photoshop or gimp. As for performance, of course it would be consuming to render a complete tilemap one pixel at a time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)