Garbled Graphics Fish

Bucket Mouse

Active member
One of the enemies I made becomes a mess of garbled graphics when it collides with a wall. It's the only enemy that has this problem, but every single sprite I place of this monster does it. The sprite is 2 16x16 blocks wide and 1 16x16 block tall; none of the other enemies I made have those dimensions so maybe there's a bug affecting just that size?

weirdfish.jpg

Sometimes the sprite will bounce off the wall and remain intact, but it always eventually becomes garbled if I let it run long enough.

A second bug: Monster_0_01.BMP appears blank on the monster screen (where you assemble the tiles together and animate it, etc). I know what you're thinking, so let me confirm changing the pallette does nothing. In fact, you can select the blank tiles and a piece of the monster will appear there, with the right colors -- it just won't show up on the BMP display.
 

dale_coop

Moderator
Staff member
Maybe a problem of animations frames ?
Do your fish have differents animations (Idle, Swimming) ?
Verify that all your frames are ok.
And try to make all your animations the same number of frames (4 frames is a good spot ;))
 

Bucket Mouse

Active member
This one's actually simple -- the simplest animation in the game. Two frames: open mouth and closed mouth. Animation speed is slow.

I actually posted all the windows for this sprite in this topic: http://www.nesmakers.com/viewtopic.php?f=19&t=181 See if anything looks unusual.

Are you sure all sprites have to have the same amount of frame animations? That's an odd requirement.
 

RadJunk

Administrator
Staff member
Did you set the edge and solid reaction? And no, animation does NOT need to have the same number of frames per action, though i suppose it’s conceivably possible the engine is missing a Reset to frame 0 somewhere, I doubt it.
 

dale_coop

Moderator
Staff member
I had a similar problem, and it disappeared when I choose 4 frames for my monsters walking animations (I just copy/paste the 2 first frames).
Then couldn't reproduce the problem.
 

RadJunk

Administrator
Staff member
Another question to ask so I can better tech the problem at the engine level -

Does the object only have one "action" type (and only one "type" of animation, despite having multiple animations for various directions)? Or does it have multiple animation types, with different directions for each (like how our player has idle and walk)?

And again, are you sure you have the edge / solid reaction types set?
 

Bucket Mouse

Active member
TheNew8bitHeroes said:
Another question to ask so I can better tech the problem at the engine level -

Does the object only have one "action" type (and only one "type" of animation, despite having multiple animations for various directions)? Or does it have multiple animation types, with different directions for each (like how our player has idle and walk)?

And again, are you sure you have the edge / solid reaction types set?
Yes, they are set. But it may not matter because I decided to test Dale's theory about the glitch being activated by using just two frames. I increased the fish to four frames, then decreased a different four-frame enemy to two.

The enemy that was reduced to two frames inherited the glitch!

But increasing the fish to four frames didn't get rid of it. This was weird.

I made another fish, with the exact same settings (I did not copy-paste the previous one, I rebuilt it entirely). This fish was 4 frames from the beginning. I ran the game and there were no problems with that fish.

My deduction: Two-frame animations glitch up in this version of NESMaker. Also: if you save a sprite that's caught the glitch, it unfortunately has the glitch forever and you have to rebuild it.
 

RadJunk

Administrator
Staff member
I’ll have to further tech that, because it doesn’t make much sense with the way that data exports. I’ll dig deeper though.
 

dale_coop

Moderator
Staff member
Strange (small) bug.
I have a monster with 2 frames animations, and it works fine. I don’t know where is the issue, but sometimes when reduced 4 frames to 2, or maybe 2 animations (one with 4 frames and the second with only 2) could cause the problem... ? Or 2 actions using animations with different number of frames ? (But the glitch appears when the monster reverse direction after touching the edge or a solid element.)
Needs more tests (if I have time tonight, I will try again)
 

RadJunk

Administrator
Staff member
So while this has been hard for me to confirm, here's what MAY have happened?

It's possible that, for instance, other directions have different number of frames of animation. When the wall was reached, it changed to a new "animation" without resetting the animation frame to zero. I would've never noticed this, as all my movement directions have the same number of animations.

If this IS in fact the problem, you can try this:

1) Navigate to GameEngineData\Routines\UserScripts\AI_Reactions\Reaction_01.asm

2) At the bottom, add the following ASM code:

Code:
     LDA #$00 ;;; loads hex value zero
     STA Object_animation_frame,x ;; stores it to the current object's animation frame

That will make sure that when you bounce off a wall or solid object, it always returns to frame 0 when it goes to the new animation, and if the hunch is correct about what may have caused the problem, this should fix it.

Try it out and let me know! :)
 

dale_coop

Moderator
Staff member
Great new, thank you Joe.
If it's that, so maybe it is needed to add those lines to the ActionsRoutines AI_Action_01.asm, AI_Action_02.asm ... too ?

I made a small project showing the glitch on a monster : https://drive.google.com/open?id=1A1PPC872NGYT7ZUdGRlO5_7_KiINT9QG
(just unzip in a NESMaker beta 3.1.3 base folder and overwrite the GraphicAssets)
 

Bucket Mouse

Active member
TheNew8bitHeroes said:
So while this has been hard for me to confirm, here's what MAY have happened?

It's possible that, for instance, other directions have different number of frames of animation. When the wall was reached, it changed to a new "animation" without resetting the animation frame to zero. I would've never noticed this, as all my movement directions have the same number of animations.

If this IS in fact the problem, you can try this:

1) Navigate to GameEngineData\Routines\UserScripts\AI_Reactions\Reaction_01.asm

2) At the bottom, add the following ASM code:

Code:
     LDA #$00 ;;; loads hex value zero
     STA Object_animation_frame,x ;; stores it to the current object's animation frame

That will make sure that when you bounce off a wall or solid object, it always returns to frame 0 when it goes to the new animation, and if the hunch is correct about what may have caused the problem, this should fix it.

Try it out and let me know! :)
Well, it....half-solved the problem. The original fish doesn't glitch anymore; instead it disappears for a half-second every now and then. It's not a scanline problem; nothing else is in the same row.

This response is late because I haven't been able to do anything with the game all week. Life happens.
 
Top Bottom