Platform tutorial / collision detection question

Get help using Construct 2

Post » Thu Nov 07, 2013 7:05 am

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!Tig0r2013-11-07 07:06:41
B
10
S
4
G
2
Posts: 8
Reputation: 1,896

Post » Thu Nov 07, 2013 12:09 pm

A bit of a wall of text there

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"

B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Thu Nov 07, 2013 12:17 pm

i usually edit every of my sprites collision polys manually
B
27
S
7
G
3
Posts: 300
Reputation: 4,563

Post » Thu Nov 07, 2013 12:20 pm

[QUOTE=burningcake] i usually edit every of my sprites collision polys manually[/QUOTE]

And that is what you can do in the above mentioned menu
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Thu Nov 07, 2013 10:37 pm

@cvp

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

I'll try and be less wordy next time! :)
B
10
S
4
G
2
Posts: 8
Reputation: 1,896


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, brunopalermo, jorgmaquoi, Rable, unicornspitfire and 9 guests