[BEHAVIOR] Sonic Physics

Post your work in progress addons and get feedback

Post » Sat Aug 01, 2015 7:25 am

@Momio: To be fair, the Sonic Physics Guide is the main thing that make the physics accurate.

@KZR: Still can't replicate the issue. Is it happening in the example capx? If not, could you give me one where it is happening?

My weekdays have been fairly busy (and probably will be for a few months more unfortunately), so my general plan is to work on things on the weekends, releasing an update on Sunday evenings if I can get anything substantial done.
That said, I might not manage to release anything by tomorrow. I'd like to address the tilemap issue in the next release, but I haven't made as much headway as I would have liked today. I guess I'll see how tomorrow goes.
B
78
S
28
G
12
Posts: 128
Reputation: 11,942

Post » Sat Aug 01, 2015 7:10 pm

A great effort in doing such behavior.
Thanks for this great contribution and congratulations. I have been looking at the classic sonic engine documents to try and replicate but I'm not that good of a programmer.
B
6
S
1
G
2
Posts: 26
Reputation: 1,477

Post » Sat Aug 01, 2015 7:15 pm

@PixelMonkey

Load the example capx, disable default controls, create an event "on key down/ on key pressed" and assign to it the action "simulate control: jump"

It won't jump.

As for getting stuck on slopes, I figure it has to do with the fact that i configured the parameters in such a way that the player will not slide off slopes when it stops.
Image
Image
Image
B
15
S
2
Posts: 48
Reputation: 1,597

Post » Sat Aug 01, 2015 10:51 pm

Now all we need is some Super Mario Galaxy/Sonic Lost World gravity (Point Gravity) style plugin to go with this and my dream can began. :V
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Sun Aug 02, 2015 12:04 am

@KZR:
Ah, sorry, I misunderstood you. The sim jump issue is definitely something I can reproduce, and I can have it fixed by the next release. For the slopes, have you changed the downhill slope factor then?

@Azu:
Eventually the Set Angle of Gravity action should be able to manage things like that, though I need to go back and change a couple of angles to be relative to that.
B
78
S
28
G
12
Posts: 128
Reputation: 11,942

Post » Sun Aug 02, 2015 3:06 pm

PixelMonkey wrote:@Momio: To be fair, the Sonic Physics Guide is the main thing that make the physics accurate.

@KZR: Still can't replicate the issue. Is it happening in the example capx? If not, could you give me one where it is happening?

My weekdays have been fairly busy (and probably will be for a few months more unfortunately), so my general plan is to work on things on the weekends, releasing an update on Sunday evenings if I can get anything substantial done.
That said, I might not manage to release anything by tomorrow. I'd like to address the tilemap issue in the next release, but I haven't made as much headway as I would have liked today. I guess I'll see how tomorrow goes.


This is Outstanding! PixelMonkey, thanks for sharing this kickass extension to C2. I will dive in a little later, but it sound like it pushes movement in exactly the direction I was hoping to take my C2 project. Digital Beers are on me 8-)

Much Appreciation,
Brendan G.
B
3
S
1
Posts: 8
Reputation: 356

Post » Mon Aug 03, 2015 9:32 am

Keep it up! Could be useful not only for platformers, e.g. 2d skate board game.
B
45
S
11
G
4
Posts: 517
Reputation: 7,393

Post » Sat Aug 08, 2015 7:18 pm

is the jump thing fixed already?
Image
Image
Image
B
15
S
2
Posts: 48
Reputation: 1,597

Post » Sat Aug 08, 2015 8:42 pm

@PixelMonkey
For accessing the tilemap's collision polygons I found looking at the physics behavior useful.

Here is the basics of getting them:
Code: Select all
//This is how you know an instance is a tilemap
inst.tilemap_exists

//This is how you get a list of the tilemap's collision polygons.
var collrects = [];
inst.getAllCollisionRects(collrects);

// for example grabbing the first poly like so:
var c = collrects[0];
c.rc //this is the bounding box
c.poly  //this is the tile's collision poly if it has one.

"poly" is defined in common_prelude.js as "cr.CollisionPoly".
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Sat Aug 08, 2015 11:37 pm

@KZR:
Yes, sorry, I've fixed the jump issue and added an air drag effect already, I just want to do a couple more things before I release an update. Sorry for the wait!

@R0J0hound:
Ah, cool, that should be helpful, thank you!
B
78
S
28
G
12
Posts: 128
Reputation: 11,942

PreviousNext

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest