Prince 1 and 1/2 - a new mod

User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

I am not sure I understand the chomper/spike suggestion. They would react to a guard or non-shadow kid if it was possible to put him next to them. They only do not react if kid turns into shadow. If I were to merge without jumping over the other shadow, they would start reacting.

Only the last guard does not react to kid after the merge just like in POP2 when shadow merges into kid as I do not see the point to fight the guard the second time; but you can certainly kill him as the video shows. If I had better Gimp skills, I would have modified the spiked frames of the birdman sprite to make the guard kneel (there is no way to push a guard on spikes in the same room on the level) and used those frames when kid enters the room after the merge. But that is out of my skill range.

Unfortunately, to make the shadow fight kid the shadow would have to be the guard type for the level which is not really possible since you already have birdmen. The shadow works in POP in an interesting way. It starts as a copy of the kid character with an XOR mask to make him look different. But when shadow does into the fight mode, it uses the SHADOW.DAT file which is a guard file. In my earlier version of the mod, if you do not join shadow on level 9 you can see that he looks a bit different when his sword is drawn because the author who created those files does not use the same frame pics for KID.DAT and SHADOW.DAT .

On level 12a I was able to have skeleton and the shadow but that was possible because of the way the level is structured and because skeleton disappears when you defeat him. It is not possible on a level where you have other guards (dead or alive) in the nearby rooms.
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

I just realized there is an unintentional shortcut on level 10. It is fixed and the zip file linked in the previous post has been updated.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

dmitrys wrote: November 14th, 2020, 6:47 am I am not sure I understand the chomper/spike suggestion. They would react to a guard or non-shadow kid if it was possible to put him next to them. They only do not react if kid turns into shadow. If I were to merge without jumping over the other shadow, they would start reacting.
No, I meant they should react when the Kid is turned into Shadow. Just that they would not kill him even if he goes through them.
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: Prince 1 and 1/2 - a new mod

Post by dmitrys »

Oh, I see. That actually is closer to how POP2 works.

Edit: I updated the last linked 7Z file with the changes.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: Prince 1 and 1/2 - a new mod

Post by Norbert »

dmitrys wrote: November 14th, 2020, 7:47 amEdit: I updated the last linked 7Z file with the changes.
I've also updated the ZIP at PoPOT.
Don't worry about asking for me to update it there.
(It might occasionally take me a bit longer, though.)
PoPOT's at fault for not yet allowing authors to update mods.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

Norbert wrote: November 14th, 2020, 11:18 am PoPOT's at fault for not yet allowing authors to update mods.
It's maybe because you thought there won't be many modders wanting to add mods and/or update so often that you would be bothered in the end. It's not your fault anyway.
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: Prince 1 and 1/2 - a new mod

Post by dmitrys »

I have done some more work on making the shadow to be able separate from the kid like in POP2. It can now be done at any time after the merge. I am still testing it and need to handle special events accordingly to ensure you need to play as kid from the main events in the game.

It works with Shift-S (pressing left and right multiple times is too annoying) and requires at least 6 hit points (takes 5 hps), or kid would die. Also, you need to be in a room without an active guard since there is only 1 guard spot per room, and dead kid takes its place.

Here is the shadow being a part of the game plan on level 11 (that part of the level starts around 1:58).


Just playing around as shadow for no good reason on level 12B.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

Nice improvement on Level 11!
I would however recommend that if you could keep these in future mods of yours that would be great. Playing with these on original levels, doesn't add lot of excitement, but I believe it would definitely make more fun on custom levels!
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: Prince 1 and 1/2 - a new mod

Post by dmitrys »

I made some changes to level 13 to incorporate shadow in beating Jaffar. Now getting the second sword is a requirement to finish the game.
Some graphical and lighting changes have been added as well.



The whole separation from shadow was an exercise to understand how the guard logic works. While currently you can only separate from shadow in rooms without an active guard, and if a guard moves to that room kid's body will disappear, I think it is possible to create logic to have multiple guards per room by adding additional arrays to the level structure. I would not even attempt to have multiple active guards at the same time like POP2. But it should be possible to have multiple dead guards and have a new guard appear when you kill an opponent. This is just another idea for new mods.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

dmitrys wrote: November 23rd, 2020, 8:42 am But it should be possible to have multiple dead guards and have a new guard appear when you kill an opponent.
Yeah, just dead guards are fine...

Nice improvements! (Inspired from RoT?)

Thanks you posted the video, I was not able to find Level 14 gate raise button!
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: Prince 1 and 1/2 - a new mod

Post by dmitrys »

atrueprincefanfrom18 wrote: November 23rd, 2020, 9:03 am
dmitrys wrote: November 23rd, 2020, 8:42 am But it should be possible to have multiple dead guards and have a new guard appear when you kill an opponent.
Yeah, just dead guards are fine...

Nice improvements! (Inspired from RoT?)

Thanks you posted the video, I was not able to find Level 14 gate raise button!
The maze was original but the way you get to the sword was inspired by RoT.

I assume you are talking about the last button where you have to go through a fake wall. I was hoping that seeing the button when you climb up to the room after breaking the loose tile provides enough of a hint.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

dmitrys wrote: November 23rd, 2020, 9:15 am The maze was original but the way you get to the sword was inspired by RoT.

I assume you are talking about the last button where you have to go through a fake wall. I was hoping that seeing the button when you climb up to the room after breaking the loose tile provides enough of a hint.
Yes, that fake wall, I tried multiple going through multiple walls. I knew there was going to be one fake, but couldn't find that.

Yes, the way to get the sword. RoT is really nice and has also inspired me to create a Level 13 of my mod Nasty Dungeons similar to Level 13 of RoT. You will see it after I release it.
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: Prince 1 and 1/2 - a new mod

Post by dmitrys »

As I am studying the guard logic in SDLPoP, I was able to fix the behavior where guards disappear when they fall down another room. The most involved part was actually having positional sounds happen in the right place (due to positional audio in the mod) at the right time (the longer guard falls the longer it takes) when guard hits the ground.

Here is the standard scenario:


It also works with spikes (and chompers).


The best part about it is you can now hide opener buttons in rooms below in mods, if there is a guard around.


The only limitation due to 1 guard per room is if there is another guard in the room where the falling guard hits the floor, the fallout logic has to revert to the default POP logic. Otherwise, the other guard would disappear.


If there is enough interest, I can do a pull request to SDLPoP which would enable this behavior with the new fix flag.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

dmitrys wrote: November 24th, 2020, 2:00 am As I am studying the guard logic in SDLPoP, I was able to fix the behavior where guards disappear when they fall down another room. The most involved part was actually having positional sounds happen in the right place (due to positional audio in the mod) at the right time (the longer guard falls the longer it takes) when guard hits the ground.

[videos]

If there is enough interest, I can do a pull request to SDLPoP which would enable this behavior with the new fix flag.
Yes, they are nice improvements, you could do a pull request, that is actually the intended behaviour, I don't know why Mechner decided to just kill the guard if they go below the room and not show them hurted in spikes. (By the way, do they get killed with chomper if pushed down a room and there's chomper at the last room?) (Also, do they survive if they can do a safe 2 storey fall and they are pushed below a room?)

You could make a PR, with all the fixes, option to enable or disable them individually will be nice. Or is it better to have all the fixes into one toggle option?

Edit: I just noticed, guard death music is not being played. Is it because there's Kid's audio of long falling (aaaaahhh....)?
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: Prince 1 and 1/2 - a new mod

Post by dmitrys »

atrueprincefanfrom18 wrote: November 24th, 2020, 4:38 am Yes, they are nice improvements, you could do a pull request, that is actually the intended behaviour, I don't know why Mechner decided to just kill the guard if they go below the room and not show them hurted in spikes. (By the way, do they get killed with chomper if pushed down a room and there's chomper at the last room?) (Also, do they survive if they can do a safe 2 storey fall and they are pushed below a room?)

You could make a PR, with all the fixes, option to enable or disable them individually will be nice. Or is it better to have all the fixes into one toggle option?

Edit: I just noticed, guard death music is not being played. Is it because there's Kid's audio of long falling (aaaaahhh....)?
Jordan probably wanted to be consistent so the other guard does not disappear if a guard falls into his room. But at the same time, you have the same problem when a guard follows you to another room with a different guard.

Yes,it works with chompers. The victory music plays when you actually kill the guard. If he gets spiked, chomped or thrown off 2+ floors, only the corresponding sound gets played (if it happens in the same room). But with multi-story drop you can get both sounds if the guard falls after you kill him. Here is the video that shows both of these scenarios together.



The aaahh sound is played automatically when kid's or guard's "fall_y" variable gets above a certain threshold and works the same in any scenario. You have to drop the guard more than 2 rooms to trigger it.

A two story fall into the room below currently kills the guard. The guard, unlike mobs (loose tiles), does not actually fall in rooms outside the drawn room. That would require major changes to the game engine. Instead I simply scan the rooms downward and find the first tile that acts as a floor in the same column. Then I calculate the delay and position of the sound and render the guard based on the tile type (floor, spikes, etc). The guard is dead by default. [Edit: maybe fall_y is actually being calculated since the ahh sound can be heard - that would make things easier].

But I could calculate the number of rows the guard fell. It would have to happen in the first two rows of the very first room below + the "fall_y" value converted to the number of rows. I would have to see how to restore guard's hit points as I have not worked with that part of logic yet - I will have to ensure they do not fully reset as that would be very strange. It is definitely on my list.

Another limitation is guards that do not have dead/chomped/spiked sprites would not be visible. Skeleton does not have any of the 3 sprites. I replace them with the bones tile in many places, but that is custom logic which I do not think should be standard. Normally, fat guard does not have chomped or spiked sprites but in my mod he does.
Post Reply