Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

877188 Posts in 32849 Topics- by 24290 Members - Latest Member: tyleryarnelli

May 18, 2013, 06:39:16 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Old Sonic Physics
Pages: [1] 2
Print
Author Topic: Old Sonic Physics  (Read 2295 times)
deemen
Level 0
***


View Profile WWW Email
« on: June 13, 2010, 03:59:29 PM »

I've always wondered how the Sega people got Sonic to move so smoothly along loop-de-loops and various other terrain. I think it's pretty clear the engine is tile based, but it seems to me like all the momentum and forces which affect sonic would need to be calculated on a "vector" basis, not just pixels in a tile system.

I dunno if anyone has any insight into this? I'm currently building a platformer using a modern 2D physics engine (Box2D), so I've asked myself the question a few times. It just amazes me how much all these old games managed to do on the hardware of the day.
Logged

Project Lead - Programmer @ Crankshaft Games
Current Project: Party of Sin
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #1 on: June 14, 2010, 01:14:42 AM »

Even if Sonic uses tiles for storage and display, it doesn't use them for the physics, like few games outside turn based strategies and rougelikes. Instead, each tile becomes a solid, and these add together to form a continuous level. Perhaps there is also some surface mechanics so each tile can point the the ones it connects smoothly with in each direction.

But by and large, the old school games are a mass of physics hacks that only reveal themselves in odd circumstances, or specific level design patterns which can be avoided. Sonic has position and acceleration, inertia, but nothing else in the game does, all colisions are either against solid objects, enemies, or special cases. So basically all the hard work of a physics engine is non-existent (box2d bottlenecks on the "solver" for piles of objects, or networks of joints). Heck, I doubt the game is performing collision detection between anything other than sonic.
Logged
nikki
Level 10
*****


View Profile Email
« Reply #2 on: June 14, 2010, 01:48:56 AM »

i doubt the physics are much more complex then say in mario  Shrug

it just has a 'highspeed' variable that triggers this fast rolling animation .
and allows custom behaviours (following a loop for example, or adjust speed)

your box2d method would roughly be a million times heavier on the cpu i guess  Smiley 
Logged
Don Andy
Level 10
*****


Andreas Kδmper, Dandy, Tophat Andy

tophat@live.de
View Profile Email
« Reply #3 on: June 14, 2010, 02:44:53 AM »

You could always take a look at Open Sonic and see how they are doing it. I think they emulated the original Sonic engine pretty well.
Logged
Gimym TILBERT
Level 10
*****


ILLOGICAL, random guy on internet, do not trust


View Profile Email
« Reply #4 on: June 14, 2010, 07:24:19 AM »

START HERE:

http://info.sonicretro.org/Sonic_Physics_Guide
http://info.sonicretro.org/SPG:Solid_Tiles
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #5 on: June 14, 2010, 08:30:38 AM »

Yep, Solid Tiles - Slopes and Curves shows exactly what I mean by "hacks". The level designers simply avoid designs that highlight the problems.
Logged
deemen
Level 0
***


View Profile WWW Email
« Reply #6 on: June 14, 2010, 04:03:46 PM »


Wow that's awesome. I love this kind of stuff. Maybe it is a bunch of hacks but it's truly ingenious programming to get around the problem. I'll look into it more, some of this stuff could be useful to get that old school feel.

BorisTheBrave I recognize you from the Box2DX forums. That happens to be the engine we're using. I've made some pretty heavy modifications to it (conveyor belts, one-way platforms etc.). Really solid physics engine. I could probably scrounge together a patch with the changes if you'd like.
Logged

Project Lead - Programmer @ Crankshaft Games
Current Project: Party of Sin
Dacke
Level 10
*****


I have never been to Woodstock


View Profile
« Reply #7 on: June 14, 2010, 04:11:51 PM »

Sonic 3 still has the best platformer movement I have ever seen. (Though Nikujin is fantastic, too).

If the hacks were easy to get right, I think we would have seen more games like that. Not even later Sonic games have been close.
Logged

vegan • socialist • atheist • humanist • liberal • FOSSer
programmer • feminist • animal rights activist • pacifist • teetotaller
deemen
Level 0
***


View Profile WWW Email
« Reply #8 on: June 14, 2010, 04:16:50 PM »

Agreed. I love the movement in Sonic games.
Logged

Project Lead - Programmer @ Crankshaft Games
Current Project: Party of Sin
Dacke
Level 10
*****


I have never been to Woodstock


View Profile
« Reply #9 on: June 14, 2010, 04:20:16 PM »

What I meant to say was:
Yes, do this! Awesome! Grin

Physics + Sonic movement
that would be ace
Logged

vegan • socialist • atheist • humanist • liberal • FOSSer
programmer • feminist • animal rights activist • pacifist • teetotaller
deemen
Level 0
***


View Profile WWW Email
« Reply #10 on: June 14, 2010, 04:21:44 PM »

I'm checking it out. I'll see what I can do Tongue
Logged

Project Lead - Programmer @ Crankshaft Games
Current Project: Party of Sin
Alistair Aitcheson
Level 5
*****


"Ali" for short


View Profile WWW
« Reply #11 on: June 14, 2010, 04:28:14 PM »

Thanks for posting that link, neoshaman - it's really interesting!
Logged

Craig Stern
Level 10
*****


I'm not actually all that stern.


View Profile WWW Email
« Reply #12 on: June 14, 2010, 05:14:58 PM »

Jinroh posted a tutorial about how to make an engine like this over in RPGDX a few months ago. It's a bit over my head, but you might find it useful. Smiley
Logged

Skofo
Level 10
*****



View Profile
« Reply #13 on: June 14, 2010, 05:40:07 PM »

You could always take a look at Open Sonic and see how they are doing it. I think they emulated the original Sonic engine pretty well.

They did not. Within 10 seconds of playing I was able to get stuck at a top corner of a rectangular roof where Sonic cycled between walking up it and falling.
Logged

If you wish to make a video game from scratch, you must first invent the universe.
Trevor Dunbar
Level 10
*****


Working on unannouned fighting game.


View Profile Email
« Reply #14 on: June 14, 2010, 05:53:02 PM »

Yah, don't use a physics engine for platformer stuff. Dood. It'll end up slower and all floaty like LittleBigPlanet.
Logged

Toucantastic.
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic