What's everyone working on?

Discussion in 'Game Development' started by andymc, Jun 22, 2017.

  1. Informatix

    Informatix Expert Licensed 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.
     
  2. ilan

    ilan Expert Licensed User

    ok thanx, i found also this:

     
    Last edited: Aug 5, 2017
  3. ilan

    ilan Expert Licensed 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
     
  4. Informatix

    Informatix Expert Licensed User

    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 likes this.
  5. ilan

    ilan Expert Licensed User

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