Inverted Gravity

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

Inverted Gravity

Post by Nisaba »

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...
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Inverted Gravity

Post by levellass »

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