Physics platformer control system example

Show us your works in progress and request feedback

Post » Thu Jun 26, 2014 2:09 pm

I got the idea for this from someone in the irc chatroom (I forget who) & it's a fun control system that I thought a C2 beginner might find useful to examine, or better yet an experienced user might expand upon & share their results.

It works by making the player a spinning disc, with left & right move keys setting the angular velocity. A ground detector sprite determines when you can jump, detecting overlaps with a family of 'solids' (ie. immovable physics sprites).

High linear damping & some additional downward force is the key to making the player physics settle down faster & feel more like the platformer behaviour.

There's a basic platformer sprite in the scene for comparison (arrow key control for that, & WASD for the physics one), & you'll see the weak point of the physics player is the air control which I could never get to feel right. Maybe someone could have a go at some better code for that.

Image
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Thu Jun 26, 2014 2:10 pm

Forgot to include the capx...
You do not have the required permissions to view the files attached to this post.
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Wed Dec 21, 2016 6:35 pm

Hey this is very helpful- Thanks! (2 years later :) )
B
14
S
5
G
6
Posts: 64
Reputation: 4,243


Return to Works in Progress/Feedback Requests

Who is online

Users browsing this forum: No registered users and 0 guests