StarForge is a sci fi survival sandbox. Hunt to eat, dig for resources, craft many items, build a fort, and fight enemies in order to survive! Do this alone, or with other players, in a fully infinite procedural world.

Post news Report content RSS feed Character Physics Teaser Video

Watch a video preview of our brand new physics movement system.

Posted by wsworin on May 2nd, 2012

Watch the video for a preview of our new physics movement in action.

Over the last couple months we've been making major revisions to the physics driving our character animation in StarForge.

Our brand-new movement model is designed closely around the real biomechanics of biped locomotion; it can simulate jumping, running, climbing, wall jumping, wall running, crawling and pretty much any other behavior all without the use of any state driven code. The result is a more human look and feel, and a character that is equipped to intelligently react to dangers far beyond what conventional movement code was designed to handle.

You can find a video preview of it below. Expect to be able to play it in a few days.

The Official Websites:

Please follow the game for more info at:

Post comment Comments
romnus May 3 2012 says:

looks amazing as always! :D

+2 votes     reply to comment
Harikien May 3 2012 says:

Are you planning on adding some form of animation for falling? Or Ragdolls?

+1 vote     reply to comment
DoctorSpanky May 3 2012 says:

Having that kind of movement.. amazing =D

+2 votes     reply to comment
HappyTriggerBot May 3 2012 says:

This is pretty cool and innovative.

Don't know if you guys know about the Overgrowth project, but in there they've made some pretty amazing character movement behavior and is well worth to study.

The algorithm look pretty advanced and I'm sure in takes all kinds of parameters like kinetic energy etc. into consideration. If I were to put the finger on something, for me the character leaning seems a bit odd. It's like you have a section of code in there that takes the ground normal into consideration and apply the inverse rotation of the delta between the normal and direction up. Maybe that's how we bipeds tackle uneven terrain, but in this case I think the algorithm overcompensates. Dialing that effect back a little would look better IMO.

+4 votes     reply to comment
CodeHatchling Creator
CodeHatchling May 3 2012 replied:

Thanks for the very thoughtful comment. :> I'm happy to see people are interested in how it works.

There are a lot of factors involved in the movement code, indeed.

I think it might be worth mentioning that "up" is never referenced once in the movement code, nor was the direction of gravity, and the purpose of this was to not give special treatment to ground surfaces. This way any given surface could potentially be used as a floor.
It is easy to walk on flat surfaces as opposed to vertical ones because gravity is counteracting the upwards thrust our legs exert each time we step. If you try to walk up a wall, the force you'd need to apply against the wall to gain sufficient traction would also push you away from it - unless something was pushing you and the wall together. Perhaps a strong wind, an explosion, the wall is rapidly accelerating towards you, you were thrown into the wall, etc.
This approach opens up a lot of opportunities that most movement frameworks leave unhandled. The moment our algorithm detects a surface - even if that surface belongs to a peice of flying debris, or a wrecked vehicle rolling towards you end-for-end - you'll be able propell yourself off of it. Like a ninja.

+2 votes   reply to comment
CodeHatchling Creator
CodeHatchling May 3 2012 says:

(Continued...) The specific problem you are mentioning, I think, relates to acceleration leaning in some cases. This is a bug I've recently fixed, but when you command your legs to accelerate you forwards, they'll lag behind you quite a bit. This was an easy fix that I overlooked.
Otherwise, sometimes what happens is when a steep slope is suddenly encountered, the legs get pressed back via a collision. So it's almost like he is tripping over the slope. It takes a bit for the legs to force themselves under the player's center of mass after this happens. I've created two fixes for this to minimize the effect, and other possible fixes are planned for testing.

I've tried the Overgrowth movement and I am impressed by the extreme degree of polish he has put into it. A lot of interesting tech has been used there, especially IK. I always admired games which had perfect foot planting with no skating or sliding. It has a solid design and I couldn't find any problems with it.
Nonetheless, while I draw inspirations from Overgrowth I am taking a different approach more akin to physics sandbox games. Eventually, I hope to not use animations at all and have everything bone in his body driven by physics - but for now, I'm using a simplified approach which doesn't "snap" in and out of ragdoll.

+2 votes   reply to comment
HappyTriggerBot May 4 2012 says:

Good to hear you're on top of things.

I admire your vision of omitting animations all together and rely solely on physics.

Having some physics programming experience I know it's pretty hard to get it working exactly the way you desire. Plenty of odd cases where you find it necessary to lend a leading hand to the simulation. If you manage to strike out a good blend there I see this working out pretty damn good.

+2 votes     reply to comment
Post a comment

You are not logged in, your comment will be anonymous unless you join the community. Or sign in with your social account:

Send Message
Release date
Released Sep 19, 2014
Game watch
Start tracking
Post news
Related Games
StarForge Real Time Shooter
Related Engines
Unity Commercial Released 2005
Related Groups
CodeHatch Developer with 3 members