You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tile collision implementation can only be done from code.
The current way of implementing it is not really complex, but it may be hard to implements more complex collisions (such as link between ground & slope), and also harder to debug it (impossible to show them).
The goal is to allow an easier tile collision definition directly from the collisions.xml file, such as the following examples (tile size = 16, so min=0 & max=15):
min & max are the function range for the horizontal location (where it can be applied)
Here we defined a ground collision for the complete surface (from 0 to 15), and the return vertical location is at the bottom of the tile (0).
y is the returned collision vertical point, by considering x as the horizontal location on the tile)
Here we defined a complex slope collision:
The first half size of the tile is a ground collision at the bottom
The last half size of the tile is a slope collision, starting perfectly after the ground one (+8, were the ground ended at 7)
Considering this, it should be easy to display an integrated debug mode for the collisions (by displaying the corresponding function after the map rendering).
It would also be nice to have a visual editor of this function, by using a simple map tile editor, that should be able to import a level rip (already available), define & assign collisions for the desired tiles by clicking on them.
The text was updated successfully, but these errors were encountered:
Tile collision implementation can only be done from code.
The current way of implementing it is not really complex, but it may be hard to implements more complex collisions (such as link between ground & slope), and also harder to debug it (impossible to show them).
The goal is to allow an easier tile collision definition directly from the collisions.xml file, such as the following examples (tile size = 16, so min=0 & max=15):
Here we defined a ground collision for the complete surface (from 0 to 15), and the return vertical location is at the bottom of the tile (0).
Considering this, it should be easy to display an integrated debug mode for the collisions (by displaying the corresponding function after the map rendering).
It would also be nice to have a visual editor of this function, by using a simple map tile editor, that should be able to import a level rip (already available), define & assign collisions for the desired tiles by clicking on them.
The text was updated successfully, but these errors were encountered: