Inverted Gravity

Request patches for Keens 1-3.
Post Reply
User avatar
Posts: 296
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat

Inverted Gravity

Post by Nisaba » Mon Mar 06, 2017 11:22 am

I'm looking for a way of flipping the gravity, so Keen and all enemies are walking upside-down. Like as if they were stuck on to the ceiling. the game physics should remain the same, only the gravitational force is directly opposed.

is there a way of patching this?
and if so, might it be possible to insert this gravity flip for just one certain single level?!

I'm really curious about this...

Posts: 2895
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Inverted Gravity

Post by levellass » Tue Mar 07, 2017 4:59 am

A permanent flip is simple enough, this for example controls the strength of gravity in Keen 1:

Code: Select all

#Change the game's gravity:
%patch $2C37 $03      #Acceleration (How fast jumps/falls change)
%patch $2C3C $00C8W   #Max fall speed 1
%patch $2C44 $00C8W   #Max fall speed 2

Code: Select all

#Change the game's gravity: REVERSED
%patch $2C37 $FD      #Acceleration (How fast jumps/falls change)
%patch $2C3C $FFC8W   #Max fall speed 1
%patch $2C44 $FFC8W   #Max fall speed 2

A 1-level switch of gravity is more complicated since a new gravity function is needed. It can be done, but it's no minor endeavor. Also note that reversing gravity usually sticks everyone on the ceiling; without code to 'jump down' Keen will be stuck on roofs and adding THAT is another big mess.

I will note that reversing ONLY the third line of that patch has some... interesting results.

Post Reply