Sonic style physics and collision code?

Non-platform specific questions.

Re: Sonic style physics and collision code?

Postby CrimsonTheDarkBat » Thu Dec 15, 2011 9:48 pm

Alrighty, I found the culprit - the animations of the player actor. Just tested him running up the slope as a static, spherical ball and there were no bumps.

Now what do I do? :C
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: Sonic style physics and collision code?

Postby skydereign » Thu Dec 15, 2011 9:56 pm

Ah, yeah that happens a lot (to the point that I always use two actors at least for the player). One is a collision actor, and the other handles the animations. I forgot that you'd be using an animated actor for your collisions. So, what you should do is separate the animation part of the actor from the movement/collisions. The collision side can have its visibility state set to enable events (but not draw), and the animations should use xy position to follow the movement actor (instead of parenting [unless you use a framed region as the movement]).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Sonic style physics and collision code?

Postby CrimsonTheDarkBat » Thu Dec 15, 2011 10:25 pm

Great job man, that plan worked perfectly and things are all ace! :D

Thanks so much for your help! :D + Rep :)

Only thing that needs fixing now is Moonwalking - what's the best way to tackle that? xD
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: Sonic style physics and collision code?

Postby skydereign » Thu Dec 15, 2011 10:29 pm

I personally would suggest the state method. I think it is the most standardized and dynamic way of fixing moonwalking. Also it's a good way to solidify variable control to your skill set, if it isn't one already. Here's a little lengthy description of it that I wrote for a new user. http://game-editor.com/State_Method

The main idea behind it is you use a variable to hold what the actor is doing (such as running, standing, jumping) and in any event that would change its state, you use a switch statement. That way, you can say if the actor is running when you press attack, you can make it do something different than if it were standing.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Sonic style physics and collision code?

Postby CrimsonTheDarkBat » Thu Dec 15, 2011 11:26 pm

Sweet, got it fixed in one shot with your guide. :D

Thanks a million, dude!
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest