Games What's everyone working on?

ilan

Expert
Licensed User
Longtime User
Look at the demo. The comments and the code should be enough to understand.
To access the collision editor in Tiled, you have to edit the tileset, select a tile and click on the button with a circle mixed with a rectangle.

ok thanx, i found also this:

 
Last edited:

ilan

Expert
Licensed User
Longtime User
i am not sure how efficient this way is. you will need to create hundreds of object for a simple level. each tile square will have a several objects or at least 1 object but what i do now is i create a single object for the whole floor. this make more sense if you want to have good performance in your game.

here is an example of a level of my Pixel Knight game:

tiled1.png
 

Informatix

Expert
Licensed User
Longtime User
i am not sure how efficient this way is. you will need to create hundreds of object for a simple level. each tile square will have a several objects or at least 1 object but what i do now is i create a single object for the whole floor. this make more sense if you want to have good performance in your game.

here is an example of a level of my Pixel Knight game:

View attachment 58461
When you design a level, it's boring to redraw the objects around the tiles at every change. You can ease your work by generating the Box2D objects automatically according to the tiles used. Hence the collision objects. But it's not optimized at all and you may suffer performance issues in some cases. That being said, Box2d is good at reducing the number of candidates for a collision thanks to its object organization in a dynamic tree, so having 1000 or 10 objects do not change the performance in a significant manner in many cases. It's the number of possible collisions that matters much.
 

ilan

Expert
Licensed User
Longtime User
so having 1000 or 10 objects do not change the performance in a significant manner in many cases. It's the number of possible collisions that matters much.

oh ok, I didn't knew that. it also makes sense. thanks for the free lesson :)
 
Top