Platform Behavior Animation Problem

For questions about using Classic.

Post » Mon Mar 23, 2009 3:08 am

Just a minor problem I've noticed while working on my new game and my last one is with the platforming behavior, when the character jumps onto a platform occasionally he'll become stuck in the falling animation until he falls or jumps again. Its a minor problem and seems to only happen when you just barely make it onto a platform, but its still somewhat annoying. Is there some way to fix this?
B
5
G
3
Posts: 49
Reputation: 1,038

Post » Mon Mar 23, 2009 4:34 am

You should upload your .cap so someone can have a look at it, otherwise it's hard to say what's going wrong.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Mar 23, 2009 11:11 am

Sorry, forgot about that.

http://www.mediafire.com/?unomomhyjnh

Just jump on the platforms and eventually you'll end up floating around on one.
B
5
G
3
Posts: 49
Reputation: 1,038

Post » Mon Mar 23, 2009 12:17 pm

Okay I noticed various things in your cap:

First of all you have an always event which rounds the X and Y position of the player. I don't really know why it's in there in the first place. I can imagine it would cause quite some problems and I'd really recommend to remove it.

Then you have the platform movement assigned to the player sprite itself. You might want to use a simple rectangle dummy sprite to have the platform behavior and add the actual player with animations and all on top of that.

And for animations: you should have a look at tagged animations. Will save you some events. Of course if you have a dummy sprite you will have to add an event which always sets the player sprite animation to the dummy animation.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Mon Mar 23, 2009 5:33 pm

[quote="PixelRebirth":3t7ldsjh]Okay I noticed various things in your cap:

First of all you have an always event which rounds the X and Y position of the player. I don't really know why it's in there in the first place. I can imagine it would cause quite some problems and I'd really recommend to remove it.[/quote:3t7ldsjh]

That might be my fault :P

Looks like it's based off of the old versions of my tutorials. I had a very flimsy reason for doing the roundX, roundY thing. I've since updated them.

Anyway, it appears that the roundY bit was messing up your falling animation, delete those rounding actions and it works great.


[quote="PixelRebirth":3t7ldsjh]Then you have the platform movement assigned to the player sprite itself. You might want to use a simple rectangle dummy sprite to have the platform behavior and add the actual player with animations and all on top of that.[/quote:3t7ldsjh]

He doesn't need to! He's using bounding box collisions and his sprite frame size is always 16x16... it'll be fine :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Mar 23, 2009 6:12 pm

Yeah, I did use your tutorial. :P

But I did see a reason for it, the sprite gets blurred occasionally without it. Haven't seen the updated tutorial. I just don't think it looks good when the sprite gets blurred.
B
5
G
3
Posts: 49
Reputation: 1,038

Post » Mon Mar 23, 2009 6:21 pm

Set your sampling to Point in the app properties :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Mar 23, 2009 7:45 pm

Ah... of course I was using an overcomplicated broken method... :oops: Thank you.

...now I need to go fix Australopithecus. Curse your lying tutorials. :P
B
5
G
3
Posts: 49
Reputation: 1,038

Post » Mon Mar 23, 2009 7:54 pm

Well I did say in the originals that Point will keep your pixel art crisp and that I was only using Linear for smooth rotation :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Mar 23, 2009 11:20 pm

Meh, you can't expect me to read the boring parts.
B
5
G
3
Posts: 49
Reputation: 1,038

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests