Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Implemeting Reversed Gravity


luksamuk

Recommended Posts

So I've been talking to LakeFeperd a while ago, and we're in doubt about this.

As far back as I can remember, the only 2D Sonic Engine I've ever seen that had support to reversed gravity was the Sonic 2 HD's.

It's about time to Sonic Worlds to have too...

I've managed to mess up with the YAcceleration, setting it to a negative value, and inverting the left and right controls. But anyway, how do I flip Sonic upside down and make him detect the roof instead of the floor? I'm still lost on that point.

Link to comment
Share on other sites

Actually Dami made an engine in GM that had built in reversed gravity if I recall correctly.

I'm not sure entirely what would have to be done in order to do reversed gravity in Worlds. I might consider looking into it if it weren't one of the most overdone gimmicks in all of gaming. Still, as old as it is, it's timeless and probably worth looking into.

I think what you need to do in order to get Sonic detecting the roof as the floor is to change the natural angle that Sonic reverts to while in the air.

In the group "Change Angle" under "Player Animation", there is a group of events headed by the comment "On Air" and "Rotate towars (sic) gravity angle".

Changing those two events from

Animation Angle of PlayerOthers < 180.0

and

Animation Angle of PlayerOthers >=180.0

to Animation Angle of PlayerOthers < (180 + Variable_gravity_angle) Mod 360

Animation Angle of PlayerOthers >= (180 + Variable_gravity_angle) Mod 360

and the actions to have their maxes and minumums adjusted for the gravity angle similarly should take care of that part. I'd guess anyway.

As an added bonus, I think that would work for more than just 'reversing' gravity. Side to side and even any angular gravity should be feasible pretty easily.

Try out what I suggested and report your findings in this thread please.

EDIT: As a side note, expect a large number of gimmicks to not play fair with odd gravity. Many just won't have been made to support the idea.

Link to comment
Share on other sites

Yes, it works. But it doesn't make the engine recognize the roof as ground.

I was taking a look at this engine. It is a goddamn mess of thing to do! I think it should've been programmed since the beggining of Sonic Worlds.

I messed around the Y Movement groups. I even did something that made the gravity reverse, and the jumping was even reversed too (I could test it by using the hanging bars gimmick).

But even the hurt anim does not correspond. There's lotta things to change in this...

EDIT:

Funny thing. When changing the code of the animation angles to see how they worked, I got this:

attachment.php?attachmentid=1460&stc=1&d=1314670085

Sonic insisted in becoming a Smooth Criminal with his head.

post-1782-138639764819_thumb.png

Link to comment
Share on other sites

It shouldn't be too hard actually, but you would have to rewrite a great deal of the gimmicks (or just don't plan to support them for rotating angle).

Compute the player's the local angle in relation to the gravity angle when it's on ground, and use that local angle in all the condition tests instead of the real angle. Also, instead setting the angle to 0 when jumping, set it to the gravity angle.

The only real problem would be the gimmicks.

Link to comment
Share on other sites

About the gimmicks, there's no way a reverse gravity level will also contain the whole repertoire of gimmicks. Therefore, the only ones that would need to be reprogrammed would be the ones used in said level.

Aside from the basic springs and maybe hanging bars, exclusive "gravity-change compatible" gimmicks should make an appearance in the level, e.g. the Death Egg "elevator-conveyor-belt" area.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...