The "dead skeleton" bug

Open-source port of PoP that runs natively on Windows, Linux, etc.

Moderator: English Moderator Team

David
The Prince of Persia
The Prince of Persia
Posts: 1402
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

The "dead skeleton" bug

Postby David » May 29th, 2016, 7:51 am

When a skeleton falls down 2 rows, it will do weird things, both in the original game and in SDLPoP.
(Mentioned here and here.)

I think I found why.
This code handles landing after falling 2 rows: https://github.com/NagyD/SDLPoP/blob/ma ... 005.c#L151

Code: Select all

         } else if (Char.fall_y < 33) {
            if (Char.charid == charid_1_shadow) goto loc_5EFD;
            if (Char.charid == charid_2_guard) goto loc_5F6C;
            if (! take_hp(1)) {
               play_sound(sound_16_medium_land); // medium land
               is_guard_notice = 1;
               seq_id = seq_20_medium_land; // medium land (lose 1 HP, crouch)
            } else {
               goto loc_5F75;
            }
         } else {

As you can see, the case of charid==charid_4_skeleton is not handled separately.
Instead the code assumes that if Char is not the shadow or a guard then it must be the kid.
So it plays the "medium land" sequence that uses frames that are appropriate only for the kid.

Now the question is: what *should* happen in this case?

In the SNES version, the skeleton "dies"... until the prince jumps over it.
But that version has graphics for this, while the DOS version doesn't.

Falcury
Wise Scribe
Wise Scribe
Posts: 300
Joined: June 25th, 2009, 10:01 pm

Re: The "dead skeleton" bug

Postby Falcury » May 29th, 2016, 12:16 pm

I think the "logical" behavior (at least for the DOS version) would be the "soft landing"? After all, in the original Level 3 something similar happens when the skeleton drops to the room below (it reappears alive while standing active).
Although of course, in Level 3, the skeleton's landing happens off-screen, as a hard-coded special event.

User avatar
oitofelix
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: The "dead skeleton" bug

Postby oitofelix » May 29th, 2016, 3:46 pm

David wrote:Now the question is: what *should* happen in this case?


In case it matters how it's done in MININIM, character types SHADOW, GUARD, FAT_GUARD, VIZIER and SKELETON are all of the meta-type "guard" and thus are handled by the same code. This implies that all such characters, including the skeleton, behave mostly equally in all situations unless a special event manipulate them to do otherwise. Thus skeleton has a count of lives and as many styles as any other guard. The skeleton in level three is different in the sense that it gets up by itself and has unlimited lives, but that is done by special event code.

MININIM, however, supports any type of guard anywhere, in any quantity, at any level. So its behavior may not be considered sound for engines with restrictions in that regard.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3024
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: The "dead skeleton" bug

Postby Norbert » May 29th, 2016, 8:04 pm

David wrote:Now the question is: what *should* happen in this case?


Your question seems to imply something needs to be fixed/improved.
If SDLPoP isn't crashing and behaves as the original DOS game, maybe it's fine as is.
You could polish away such quirks, but you might be removing the game's personality.
If what 'should' happen is subjective, maybe the original game already answers the question.
It's charming, like how a falling mouse in level 8 transforms; a magical world where anything can happen.

User avatar
oitofelix
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: The "dead skeleton" bug

Postby oitofelix » May 29th, 2016, 10:20 pm

Norbert wrote:If SDLPoP isn't crashing and behaves as the original DOS game, maybe it's fine as is.


This implies the original game is perfect as it is, and therefore has no bugs. That's false for any non-trivial piece of software, what that engine surely is.

Norbert wrote:You could polish away such quirks, but you might be removing the game's personality.


It's clear that the engine behaves like it does because the scenario that triggers the glitch was not foreseen by the programmer. That's expected given the proprietary nature of the program which was targeted at a very narrow commercial circumstance at the time it was developed. With engines like MININIM and SDLPoP, people are not hostage of the developer's errors anymore.

Norbert wrote:If what 'should' happen is subjective, maybe the original game already answers the question.


Having more than one sound behavior (like the skeleton soft falling, or falling and dying) doesn't imply all behaviors, including the bugs of the original engine, are sound.

Norbert wrote:It's charming, like how a falling mouse in level 8 transforms; a magical world where anything can happen.


Having developed an engine from scratch to solve the exact same game, I've come across all sorts of "magical" things. The only ones that have remained are those that surprised me not because they behaved in an unexpected manner, but because I did not expect them to behave correctly as they did.

After some weeks developing MININIM, it became clear that the original engine is not the answer for everything, as I could do way better in several areas. Those "quirks" are not personality nor magical, they are simple and blatant programming errors.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3024
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: The "dead skeleton" bug

Postby Norbert » May 29th, 2016, 10:48 pm

oitofelix wrote:
Norbert wrote:If SDLPoP isn't crashing and behaves as the original DOS game, maybe it's fine as is.


This implies the original game is perfect as it is, and therefore has no bugs.


Not at all.
The game isn't perfect, it has bugs, and it has imperfections: I like it that way, to me it's fine as is.

I didn't read the rest of your post, sorry.

User avatar
oitofelix
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: The "dead skeleton" bug

Postby oitofelix » May 29th, 2016, 11:40 pm

Norbert wrote:The game isn't perfect, it has bugs, and it has imperfections


Indeed.

Norbert wrote:I like it that way, to me it's fine as is.


You are totally entitled to your likes and dislikes. I respect that.

Norbert wrote:I didn't read the rest of your post, sorry.


That's unfortunate.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3024
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: The "dead skeleton" bug

Postby Norbert » May 30th, 2016, 12:22 am

oitofelix wrote:That's unfortunate.


When I see that every sentence I wrote got its own response in a point by point rebuttal style (example, example, example), I choose to play a fun video game instead of reading forum posts. This is not your 'fault', it's just the kind of person I am/have grown into. Although I must admit that I am getting tired of reading about MININIM's greatness/superiority in almost all of your replies. Maybe the repetitiveness is just too much for me.

User avatar
oitofelix
Sultan
Sultan
Posts: 189
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: The "dead skeleton" bug

Postby oitofelix » May 30th, 2016, 12:30 am

Norbert wrote:This is not your 'fault', it's just the kind of person I am/have grown into.


That's fine.

Norbert wrote:Although I must admit that I am getting tired of reading about MININIM's greatness/superiority in almost all of your replies. Maybe the repetitiveness is just too much for me.


That's ok.

Edit: Just to clarify and put my position in perspective, when I argue with someone I'm not aiming to convince that person more than anyone else that may be reading or will read those posts in the future. My arguments rest here as a record of my point of view, style and perception; as a way to convince those who wouldn't be convinced otherwise, how few they might be.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

Falcury
Wise Scribe
Wise Scribe
Posts: 300
Joined: June 25th, 2009, 10:01 pm

Re: The "dead skeleton" bug

Postby Falcury » May 30th, 2016, 10:50 am

Norbert wrote:
oitofelix wrote:That's unfortunate.


When I see that every sentence I wrote got its own response in a point by point rebuttal style (example, example, example), I choose to play a fun video game instead of reading forum posts. This is not your 'fault', it's just the kind of person I am/have grown into. Although I must admit that I am getting tired of reading about MININIM's greatness/superiority in almost all of your replies. Maybe the repetitiveness is just too much for me.


My apologies about that last example you mentioned...
But regardless of differences, it's still a nice thing that many people here do care strongly about such an old game!

Regarding the skeleton fix: the changed behavior can of course be optional?

User avatar
doppelganger
Vizier
Vizier
Posts: 112
Joined: April 24th, 2015, 9:04 am
Location: India

Re: The "dead skeleton" bug

Postby doppelganger » June 1st, 2016, 1:33 pm

Norbert wrote:
oitofelix wrote:That's unfortunate.


When I see that every sentence I wrote got its own response in a point by point rebuttal style (example, example, example), I choose to play a fun video game instead of reading forum posts.


Mine's here, except I had cross-examined David.
Doppelgänger
Hmm.. These mortals know about me.. :evil:

Download 'Hell of A Palace' now from Popot!

_Zaphod_
Beylerbey
Beylerbey
Posts: 55
Joined: January 13th, 2006, 12:01 am
Location: USA

Re: The "dead skeleton" bug

Postby _Zaphod_ » December 6th, 2016, 12:26 am

My opinion is that any bug that does not affect either the original game, or any mod is fair game to fix.

I believe this skeleton behavior is one such bug.

It seems pretty clear that the intent is for the skeleton to survive falls of any distance.

So that should be the behavior.


Return to “SDLPoP”

Who is online

Users browsing this forum: No registered users and 2 guests