chrismaltby / gb-studio

A quick and easy to use drag and drop retro game creator for your favourite handheld video game system
https://www.gbstudio.dev
MIT License
8.57k stars 473 forks source link

Player sprite shows through dialogs in Parallax scenes #1593

Open LordRembo opened 1 month ago

LordRembo commented 1 month ago

Describe the bug When showing a dialog in a scene that uses parallax (any kind of dialog), if it overlaps with the player, the player sprite shows through the dialog content.

To Reproduce Steps to reproduce the behavior:

  1. Add a Platformer scene, make it use parallax
  2. Add a dialog menu to the Select button
  3. Display your Player somewhere on the screen where it will overlap with the dialog
  4. Run the game, trigger the dialog
  5. You'll see your Player sprite showing through the inner part of the dialog frame (the light green color) but not the frame border

Expected behavior I'd expect the dialog to appear in front of the Player, hiding the overlapping pixels.

Screenshots

Screenshot 2024-09-23 at 21 58 16

Platform (please complete the following information):

LordRembo commented 1 month ago

It was mentioned in the Discord that the reason is that Dialogs and Parallax use the same mechanism. While a feature of the system, I think this should at least be documented with workarounds: eg. hiding the Player on trigger, and showing it again after the dialog script.

smfhacking commented 1 month ago

I think that only happens to you.

ooo maybe you used green when making the game's text font

since green is transparent

joeledge commented 1 month ago

This is a fairly common issue, a workaround is to hide all sprites before the dialogue and show after