How do I add right collision polygon?

0 favourites
  • 12 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • Hi, i develop game for mobile and i have Sprite like this

    i want to destroy my player when it collision with all of part of this Sprite.

    is it true work to add several point to my sprite like this:

    ?????

    Or

    is it better to use several sprite to create that?

    please give me your idea.

  • is it true work to add several point to my sprite like this:

    Or

    is it better to use several sprite to create that?

    please give me your idea.

    I think it should be fine doing as you have done. Guess you write here because of the warning you get when adding more points to the collision polygon?

    If you experience performance issues you can always try to change it to use invisible sprites instead, or even reduce the number of points further in the one you have. Like so and then just move the others a little bit, to match those missing.

  • Although this setup might work, there is a lot of empty space which does add to the image-memory..

    Dividing this sprite into three might allready take the amount of image memory needed down a lot..

    Also this sprite seems to have several re-usable elements if the layouts are going to be bigger than this, which if seperated could again reduce the amount of image memory needed..

    So I guess it all depends on your needs and your further "visual" plans..

  • nimos100

    thank you for help,

    LittleStain

    I have over 20 sprite lake that, so , you think it is better way to use several sprite for re-usable elements?

  • I would agree with LittleStain, that your method is highly inefficient. You will definitely run into memory issues especially on mobile.

    The best way would be to use individual sprites. Tilemaps would be another good option, although the irregularity in your level design would make tilemaps a little more difficult to use.

  • ryanrybot

    Ok, thank you, it seems the best way is the individual sprites.

    best regards.

  • But,in this way my individual sprites are 10 for example and the total point of collision is 60 , is this good?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not just about collisions, it's also to do with fillrate and overdraw. Transparent pixels still need to be drawn and take up memory which will kill performance a mobile device, or even a desktop in severe cases.

  • Bust your sprite into 3 or more images so they are convex. 1-floor 2-wall 3-ceiling.

  • Collisions and optimisation aren't always so clear cut, see

    Experiment with what works best, there are few best practices that apply to every situation.

  • i confused !

    i try with to project :

    project 1: 1 sprite with some collision ( on picture of above )

    Project2 : 4 sprite with some collision ( less than 1st picture)

    it seem only Image memory in project1 is 8.2 mb and in project2 is 6 mb.

    what do i do!?

  • anybody?

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