Platform tutorial / collision detection question

0 favourites
  • 5 posts
From the Asset Store
Detects any kind of ad blocker. Very easy implementation into already existing projects
  • Morning all!

    I've just completed the jungle platform game tutorial and I have a general collision detection question.

    The tutorial provides a sprite sheet of 144 sprites, which are all different sizes, and says to use a size of 128x128.

    When I use a half-height tile, the collosion poly is the full 128x128 (including the white space), whereas obviously I only want it to be the size of the graphic.

    So first I created a second solid tile object, and made a separate tile object for the smaller sprites. This actually worked fine, and solved my problem.

    But then I figured... surely that can't be right, I must be missing something!

    So I went back through the tutorial, and I tried SHIFT + crop transparant edges - even though the tutorial didn't say to do that - and on the face of it (within Construct 2) this seems to have done the trick.

    But when I render the game, whilst the collision poly is now the right size, the sprites have been squashed to half height, so I again have the collision detection problem, plus squashed graphics!

    So I've gone back to making a second tile... but that means all the sprites in the sprite sheet that are less than the full size are unusable, and this seems very inefficient.

    So I figure I must be missing something fairly essential, which doesn't suprise me as I'm only two tutorials in!

    I've had a quick look at all the platform examples but they don't seem to use sprite sheets, and I can't find a .capx file for the jungle platform game.

    So... what am I missing here?! :)

    Thanks!

  • A bit of a wall of text there <img src="smileys/smiley17.gif" border="0" align="middle" />

    So not sure if this is what you are looking for, but.. you can edit the collision polygon of any sprite.

    Open the sprite for editing and select the option at the bottom: "set Collision polygon"

    <img src="https://dl.dropboxusercontent.com/u/2560922/mobiledev/forum/editColissionPoly.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i usually edit every of my sprites collision polys manually

  • i usually edit every of my sprites collision polys manually

    And that is what you can do in the above mentioned menu <img src="smileys/smiley2.gif" border="0" align="middle" />

  • cvp

    Thanks cvp (and also burningcake), that's exactly what I was missing.

    I'll try and be less wordy next time! :)

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