TheXTech / TheXTech

The full port of the SMBX engine from VB6 into C++ and SDL2, FreeImage and MixerX
https://wohlsoft.ru/projects/TheXTech/
GNU General Public License v3.0
294 stars 28 forks source link

Pink mushrooms kill after restart #806

Open Trickiy opened 2 months ago

Trickiy commented 2 months ago

Describe the issue

With a setup like this image leave the enemies alone and 2 will die. Restarting the level the pink mushrooms will instantly kill the enemies.

A type of bug

Native bug

Does this issue happens always or randomly?

Always happens

Version

1.3.7-dev

Version Hash

0de7893

Platform

3DS

Processor architecture

ARM32 / ARMv7 (32-bit ARM)

Log file (if presented)

No response

Example Case

No response

Recording

No response

Vanilla Recording

No response

Additional context

No response

ds-sloth commented 2 months ago

This bug certainly has some vanilla elements, but it needs more experimentation to verify. Here's the level I am using to test this: block-npc-crush.lvl.zip

What I have found is that in SMBX-R, the NPCs don't get crushed by the pink blocks when the level is opened in an editor level test, but two out of the three NPCs do get crushed when the level is opened in an episode. I think that means that there is some invalid state-dependence at play (where something that doesn't get reset during the level load code affects the game state). We will need to fix this as a part of implementing full NetPlay support.

Trickiy commented 2 months ago

I tried to test the level you let me check out and some how broke things even more. Heres the world. Trickii_world.zip

2024-08-22_14-57-05 814_top

TheXTech_log_2024_08_22_14_53_20.txt

ds-sloth commented 2 months ago

Can you show me what the level looks like in your editor?

Trickiy commented 2 months ago

Initially looks fine, 2024-08-22_18-52-26 277_top but after entering the level and going back into the editor on repeat a few times or more. Everything straight up disapeared for me within the editor, also when I let the enemies try to walk off screen the middle one dies. 2024-08-22_18-54-43 526_bot The one I made was a lvlx your lvl is quite different from my lvlx, I wonder what the difference between the two are?

Trickiy commented 2 months ago

After placing 4 more enemies with pink blocks on there heads. I am starting to think that the mushrooms are cliping into the enemies and killing them for some reason. Also the death of one enemie will at times kill another.

ds-sloth commented 3 weeks ago

I just fixed a bug affecting the SMBX-R and TheXTech editors that led to the behavior being different between editor level testing and gameplay (including restarts).

That doesn't fix the strange behavior you found here, but it means that the behavior will be more consistent.

This particular case isn't very high priority, but I will leave the issue open for now because it seems to be related to a more interesting case in #829