Breakable Tile Bug (4.5.9)

ScrollHaven

New member
I followed this excellent tutorial from @baardbi: https://www.nesmakers.com/index.php?threads/breakable-tile-4-5-9.8334/#post-48837

I also tested this one by @9Panzer: https://www.nesmakers.com/index.php?threads/4-5-9-breakable-blocks.7336/

They both worked great but also introduced a seemingly random bug. I will share my findings so far.

At first, it appeared that about 1 out of 10-20 tries breaking the tiles would mess up all the tiles in the level and also change the color palette.

You can see what I refer to in this video clip. The first pass shows it working correctly and the second pass shows the bug:
View: https://youtu.be/ig8VGLzdC0M


The same is this clip:
View: https://youtu.be/CKWapeJth_4


I was finally able to predictably reproduce the bug which is often the hardest and most important part of troubleshooting in experience.

I next built up a temp level to get to the bottom of what was causing the bug. In this clip, you can see that under certain conditions I was able to break all the tiles every time with no issues:
View: https://youtu.be/XDcRMV0RAC4


And at last, I got to the bottom of what was triggering it. Scrolling while the tile change happens:
View: https://youtu.be/mIWc9Dpd_W4


Now that I know what triggers it I am already thinking about pausing player movement while shooting as a possible fix. I am an artist, not a coder. If any of the coding gurus knows of a fix I would super appreciate it. Thanks!
 
Last edited:

baardbi

Well-known member
I know exactly what that bug is. Did you use my tile code? If so, can you copy exactly the code you are using and paste it here?
 

baardbi

Well-known member
Thank you for pointing this out. I had posted an old version of my breakable tile code (that had this bug). I have updated it now on the tutorial. Can you try the new one and see if it works better.
 
Top Bottom