Prince 1 and 1/2 - a new mod
Re: Prince 1 and 1/2 - a new mod
Some fun with skeletons.
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Prince 1 and 1/2 - a new mod
Funny! Is it because the guard logic?
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Prince 1 and 1/2 - a new mod
Is the GitHub link broken? Or dmitrys, you took deleted the repository? I wanted to view the source code. Where can I get it?
Re: Prince 1 and 1/2 - a new mod
The source code is a part of the mod archive
https://www.popot.org/custom_levels.php?mod=0000232
Or this one (contains background music)
https://github.com/dstarosta/Prince15di ... r3_mt32.7z
https://www.popot.org/custom_levels.php?mod=0000232
Or this one (contains background music)
https://github.com/dstarosta/Prince15di ... r3_mt32.7z
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Prince 1 and 1/2 - a new mod
Thanks. Actually I wanted to see code of some of the custom things that you did in the mod. Can you tell me at what files I should look into? Seems like you made a lot of changes...
Re: Prince 1 and 1/2 - a new mod
Yeah, I have made a lot of changes to the logic.
For inactive guard logic search for the "inactive_guard" array. All related logic is going to reference it.
There are 3 extra slots for dead guards "dead_guard1", "dead_guard2" and "dead_guard3" along with 3 "outbound_dead_guard" slots in case they die between rooms.
There is a "dynamic_guard" variable that tracks information about dynamic guards (that enter from the side of a room). It get dynamically initialized when kid enter a room from a method with hardcoded values. Maybe there is a way to store this in LEVELS.DAT.
Kid as shadow mode is determined by "is_kid_shadow" variable. Kids dead body gets stored in the "Dead" slot which is 1 per level to avoid the PoP2 bug where you can have multiple dead kids. It makes the kid render as shadow, lifes are treated differently, he becomes immune from falls/spikes/chompers/falling tiles and most guards do not see him.
For inactive guard logic search for the "inactive_guard" array. All related logic is going to reference it.
There are 3 extra slots for dead guards "dead_guard1", "dead_guard2" and "dead_guard3" along with 3 "outbound_dead_guard" slots in case they die between rooms.
There is a "dynamic_guard" variable that tracks information about dynamic guards (that enter from the side of a room). It get dynamically initialized when kid enter a room from a method with hardcoded values. Maybe there is a way to store this in LEVELS.DAT.
Kid as shadow mode is determined by "is_kid_shadow" variable. Kids dead body gets stored in the "Dead" slot which is 1 per level to avoid the PoP2 bug where you can have multiple dead kids. It makes the kid render as shadow, lifes are treated differently, he becomes immune from falls/spikes/chompers/falling tiles and most guards do not see him.
Re: Prince 1 and 1/2 - a new mod
I have done some improvements to inactive guards. They can now block sword strikes and strike prince in the back.
I also added an animation that explains how kid loses his sword on level 6. Interestingly in the original game when a loose tile falls onto a sword tile, it does not turn into debris like a potion tile does.
I also added an animation that explains how kid loses his sword on level 6. Interestingly in the original game when a loose tile falls onto a sword tile, it does not turn into debris like a potion tile does.
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Prince 1 and 1/2 - a new mod
Wow! Great job! But I think the prince shouldn't die even if the inactive guard hits him (similar to PoP2).
Yes, the sword can be turned into the debris tile, this feature can be turned on in SDLPoP although I don't know where it might be useful.
Re: Prince 1 and 1/2 - a new mod
Having kid losing a hit point when an inactive guard hits him presents a few difficulties that might not be immediately obvious.
1. You have to trigger a sequence that pushes kid forward. I am not sure if it even exists because in the sword fight (when both swords are drawn) they always face each other in PoP 1. Mechner mentioned in the PoP 2 Bible (I think) that they completely redone the fighting logic in PoP 2 because the Char/Opp logic did not work well with multiple active opponents. That is also why kid dies instantly without a sword. That part I have actually changed. If kid faces the opponent, he automatically draws the sword when he is hit so he loses one point and gets bumped back with the sword drawn. Technically you can just move kid a few pixels forward but it would look unpolished compared to the rest of the sequences. And it still would require making sure he is not falling through wall/gate/doortop tiles.
2. You have to have a set of variables for inactive guards that ensure they do not keep hitting kid every 2 frames, which is 5 times a second, if he was not bumped far enough. Otherwise, it will end up being extremely frustrating to play, ala goblin heads in PoP2. For an active guard there is a variable that does that.
https://github.com/NagyD/SDLPoP/blob/83 ... 002.c#L970 But you do not want both guards to keep hitting kid at exactly the same frame if he gets caught between them because it looks weird.
As for the sword, it makes sense for the broken tile to cover it. It can be used for puzzles where a sword is difficult to retrieve.
1. You have to trigger a sequence that pushes kid forward. I am not sure if it even exists because in the sword fight (when both swords are drawn) they always face each other in PoP 1. Mechner mentioned in the PoP 2 Bible (I think) that they completely redone the fighting logic in PoP 2 because the Char/Opp logic did not work well with multiple active opponents. That is also why kid dies instantly without a sword. That part I have actually changed. If kid faces the opponent, he automatically draws the sword when he is hit so he loses one point and gets bumped back with the sword drawn. Technically you can just move kid a few pixels forward but it would look unpolished compared to the rest of the sequences. And it still would require making sure he is not falling through wall/gate/doortop tiles.
2. You have to have a set of variables for inactive guards that ensure they do not keep hitting kid every 2 frames, which is 5 times a second, if he was not bumped far enough. Otherwise, it will end up being extremely frustrating to play, ala goblin heads in PoP2. For an active guard there is a variable that does that.
https://github.com/NagyD/SDLPoP/blob/83 ... 002.c#L970 But you do not want both guards to keep hitting kid at exactly the same frame if he gets caught between them because it looks weird.
As for the sword, it makes sense for the broken tile to cover it. It can be used for puzzles where a sword is difficult to retrieve.
Re: Prince 1 and 1/2 - a new mod
Here are a few more videos.
Guards are following prince much more aggressively as long as he exits the room from the same row as the guard.
Also, the closest guard to prince in another now becomes active if a guard in the same row has been killed to reduce guard inactivity.
There is also ambient music that changes between combat and regular modes.
Guards are following prince much more aggressively as long as he exits the room from the same row as the guard.
Also, the closest guard to prince in another now becomes active if a guard in the same row has been killed to reduce guard inactivity.
There is also ambient music that changes between combat and regular modes.
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Prince 1 and 1/2 - a new mod
Great improvements!
Re: Prince 1 and 1/2 - a new mod
I believe I have understood most of the mechanics in the game as far as prince and guard movement and tile behavior is concerned.
So I decided to complete the graphical piece that I feel like the game was missing. So I created a flaming sword that turns shadow into the flame character (or kills kid) using dynamic palette changes to the sword and the prince spite along with a custom placed torch animation.
So I decided to complete the graphical piece that I feel like the game was missing. So I created a flaming sword that turns shadow into the flame character (or kills kid) using dynamic palette changes to the sword and the prince spite along with a custom placed torch animation.
Re: Prince 1 and 1/2 - a new mod
Someone posted a question here:
https://www.popot.org/custom_levels.php?mod=0000232
You made a new commit, it looks like.
https://github.com/dstarosta/Prince15dist/commits
The source code is only on GitHub in the package?
https://www.popot.org/custom_levels.php?mod=0000232
You made a new commit, it looks like.
https://github.com/dstarosta/Prince15dist/commits
The source code is only on GitHub in the package?
Re: Prince 1 and 1/2 - a new mod
Yes, I have made a few small changes.
The source code is available in the zip as well. The github 7z file stores the version of the game with ambient music because of the popot.org 10 MB limit.
The source code is available in the zip as well. The github 7z file stores the version of the game with ambient music because of the popot.org 10 MB limit.
Re: Prince 1 and 1/2 - a new mod
I have implemented another guard using a separate sequence table instead of timers. The second guard can now advance to land strikes from behind, strike back after blocking and use a full set of frames for striking. I just need to tune striking distances.