Super high jump

Open-source port of PoP that runs natively on Windows, Linux, etc.
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Super high jump

Post by dmitrys »

There is a "superhijump" sequence in the sequence table that was supposed to be used in floaty mode, which I assume comes from the DOS disassembly. But for some reason it was not implemented.

https://github.com/NagyD/SDLPoP/blob/1e ... tbl.c#L640

With minor tweaks I was able to make it work. Having kid hanging onto the second top row would not be easy. A regular jump/hang sequence was designed for 1 row, straight from them floor. And having kid free fall from the top of the jump by adjusting the seq table has weird side effects like guards falling through the floor (I am probably not doing it right).

However, super high jumping can be used to knock down loose floors and makes the floaty mode a little more special.

User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Super high jump

Post by atrueprincefanfrom18 »

Wow this is really cool!
Maybe you can send a pull request and it can be used as another flag:
#ENABLE_SUPER_HIJUMP
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Super high jump

Post by dmitrys »

I was able to improve it. Since the jump always takes the same number of frames, I introduced another timer. If there is no floor or a wall on top of prince 2 rows up, I bump him 10 extra pixels and set the sequence to "fall". That makes the grabbing functionality to work as long as you are close enough to a floor tile edge. In order to make quicksave functionality in floating mode to work, you also need to save room, column and row of the targeted tile at the top.

User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Super high jump

Post by atrueprincefanfrom18 »

dmitrys wrote: May 6th, 2021, 7:00 am I was able to improve it. [...]
[video]
Excellent!!! :)
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
eien86
Sheikh
Sheikh
Posts: 23
Joined: March 25th, 2021, 5:44 pm

Re: Super high jump

Post by eien86 »

I like this mechanic VERY much!
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Super high jump

Post by David »

dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Super high jump

Post by dmitry_s »

Thanks
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Super high jump

Post by dmitry_s »

I created another small PR to address a couple of issues found by the Say HiJump mode.
https://github.com/NagyD/SDLPoP/pull/252
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Super high jump

Post by David »

dmitry_s wrote: August 30th, 2021, 6:06 am I created another small PR to address a couple of issues found by the Say HiJump mode.
https://github.com/NagyD/SDLPoP/pull/252
I have merged it.
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Super high jump

Post by dmitry_s »

I submitted a PR to fix an issue where Prince does not grab the tile above if you are standing at the edge of the tile in the same column. Currently it only works if you are standing on the tile in the column behind the tile you are trying to grab. The PR has a link to a video that shows the fixed behavior.

https://github.com/NagyD/SDLPoP/pull/266
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Super high jump

Post by atrueprincefanfrom18 »

dmitry_s wrote: December 12th, 2021, 9:03 am I submitted a PR to fix an issue [...]
Haven't looked at the pull request quite closely, but can it please be changed to be a configurable option? It looks like a breaking change to me for both of my mods. Maybe a configurable option will do the job.
Thanks.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Super high jump

Post by dmitry_s »

Are there any places in your mods where you would not want prince to grap a tile right above from the edge of the same column? You would expect to be able to do this with a single row jump.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Super high jump

Post by atrueprincefanfrom18 »

dmitry_s wrote: December 13th, 2021, 1:11 am Are there any places in your mods where you would not want prince to grap a tile right above from the edge of the same column? You would expect to be able to do this with a single row jump.
Yes, as far as I can think, there were a couple of places, so if it could be shifted to a configurable option, I can keep it turned off.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Super high jump

Post by Norbert »

Wouldn't it be better, if this high jump behavior is enabled, to have consistency across mods? My opinion is that Dmitry's version makes the most sense, looking at what's possible with regular jumps. If there are "a couple of places" where maybe ("as far as I can think") it'd be an issue for atrue's mod(s), wouldn't it be easier to slightly modify these instead? I just think it's unlikely that other modders will choose to go with atrue's version. And then there's a configurable option just for atrue's mod(s), which seems excessive? Just my opinion, of course. Either solution is fine with me.
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Super high jump

Post by dmitry_s »

I do feel like having a separate behavior option is excessive. You can always keep the same old source code in your existing mods.

That behavior is something I missed that should have been done in the first place.
Post Reply