NESmaker pi beta (3.14x) and tutorials!

Rob Burrito

New member
for some reason the game is freezing with a palette change when i touch the checkpoint tile. moved the bubbles away and they are fine to walk through as a nothing object, just the checkpoint tile itself causing it. thoughts? re-watched the section on checkpoints and object bubbles (monster) and couldn't find any discrepancies on making a checkpoint tile, seems pretty straightforward. as far as i can tell the checkpoint tile is the same palette (only one dungeon palette group, and the change remains within the groups palettes)
 

RadJunk

Administrator
Staff member
Yeah, palette should have zero to do with it. More likely it has to do with the collision. Could it be trying to play a non-existing sound, again? By the end of the tutorial, I had a sound there.
 

Rob Burrito

New member
that was it! thanks again for the help. the code wasn't present at the time of the tutorial and you write it in at 2:44:45. some other folks will likely run into this. i went into the code and removed 'PlaySound #$01, #$00' and it works as it shows in the tutorial with no freezeup, and saves the checkpoint location. on the tutorial it shows as working without sfx on your test at 2:31:00,the version that got sent out will freeze up without taking out that script first. so some folks are gonna see that snag when testing and be wondering what they did wrong. could note on the video that it will freeze till the sounds are added or to remove the code for now.
 

Rob Burrito

New member
not sure if it's of interest, but also noted if a projectile without any collisions turned on, and no gravity, is travelling right; on the edge of the screen to the right will respawn it from the left infinently, but it will stop when shooting left and hitting the left side of the screen.
 

Rob Burrito

New member
ok so nearly finished the tutorial here, and noticed two possible bugs:
day triggered monster palette- when the triggered monsters respawn (get item/trigger, leave, then return to screen) cant seem to get the monster palettes to assign. fun to have them a different look, but would prefer to set their palette.

walking into the screen with an item for some reason will occasionally lose all health while entering a room, but not die. 0 hearts, and when taking a hit in the screen or leaving the room the hearts mostly return at random intervals per instance. definitely taking one or more hits by entering the screen. i've moved the location of monster 1 and it still happened. entry location is about X0 Y12 and first monster is X6 Y12. haven't seen this happen entering any other room yet. think it's definitely having a collision with a monster that isn't drawn yet, as it will occasionally push me to the right upon entering the room. pic included of the no hearts per entry:

no hp.PNG
 

dale_coop

Moderator
Staff member
For your palette monster, check your screen info, in the triggered tab, and verify you have assigned the right palette to your triggered monsters... ?

For your empty heart... maybe just HUD infos not updated ? Did you wrote/modified your
Code:
  LDA #HUD_ELEMENT_2
  STA HUD_updateHealth
in the InitLoads.asm script ?
 

Rob Burrito

New member
thanks for the thoughts dale, i'll work on the monster palettes next. wanted to mention i figured out the mystery hit. it has to do with the left edge anomolies, likely tied to the object floating getting stuck on the left of the screen too. if a monster from the previous screen is in the same location (x0 y12 in my case) as the player draw to location on the next screen it will register a hit. that explains why it wasn't every time, and happening while the screen info is loading most likely. i removed the monster from the previous page and couldn't get the bug to repeat, then confirmed by waiting for him to get to the edge. tough to pin down since it was a random variable on a previous page! in further exploration of the glitch, oddly received a negative heart amount by getting hit from a monster in the previous screen and bouncing me into that screen while the other monster was at x0 y12. erased the player object completely and gave a heart to the last position. game didn't freeze but player object was destroyed:

heart b damned.PNG
 

RadJunk

Administrator
Staff member
Fascinating stress test here. I'll definitely have to look into these things! No monster data from the previous page should have any bearing on new data loaded. POSSIBLY there is an order of events issue that's causing the hit. Like - the player's position may be updated prior to the monster positions being zeroed out. That seems perfectly reasonable, and if so, I have an easy solution (a lot of this code is code-lite...Mystic Searches, for instance, I know does not have this issue). As for the erasure of the player / negative heart...that's peculiar. Here's my guess...the hit happened when the drawing was turned off, and was trying to turn drawing back on in the middle, which messes up drawing addresses for these routines. Again, I think my planned fix will take care of it, but probably won't be until an official patch.

Thanks for the notice though!
 

Rob Burrito

New member
i figured out another potentially big clue for the triggered monsters. i set each monster palette to a unique palette, and found it's respawning them loading whichever palette is set at 'monster palette 32'. answered my question, now just know to change up that particular palette in the meantime for monsters who i want to respawn in a triggered state. might want to look at that as a known issue, hope it helps!
 

RadJunk

Administrator
Staff member
I’ll actually research that today. I have a feeling that it’s just a matter of a rogue byte write to in the case of loading a triggered screen, so a problem at engine level not tool output level, which should be easy to tech since the engine is still pretty light.
 

Rob Burrito

New member
sounds good, yeah placing day triggered monsters hasn't been a thing in the tutorials yet, so might be alittle ahead of it's time. i narrowed it down as much as i could for ya!
 

RadJunk

Administrator
Staff member
Ok, the monster-edge problem is patched. I’ll show you a very quick way you can patch it yourself!

What we’re going to do is ignore object collisions if we’re currently engaged in changing screens (as predicted, this is where that problem manifested!). This is just a few lines of code inside Routines\System\HandleObjectCollisions.asm.

Check the attached image for update to the code and let me know if that fixes things for you as well! :)
 

Attachments

  • BF7C1B76-A6DA-48BF-9841-54ACF55D4CA3.jpeg
    BF7C1B76-A6DA-48BF-9841-54ACF55D4CA3.jpeg
    8.6 MB · Views: 4,953

Rob Burrito

New member
yeah that fixed it. monster back in his bastardly position haha, now to play around with functionality. any challenges yet for the new tutorials? i was going to add a gravity effected/arching projectile next, hopefully with up+b as the input if all goes well!
 

RadJunk

Administrator
Staff member
oh snap! Yeah, go for that, that'd be awesome to see! :)

I've been busy curtailing some bugs in the HUD code. An ugly issue is happening when two Number Value type elements are trying to be drawn simultaneously. The values seem to be stepping on each other (not to mention, the version you have is ALL messed up and particular). So my focus is there!
 

RadJunk

Administrator
Staff member
Also, a hint............

You can try to use the double button approach but you might find yourself having trouble because of the necessary precision of button press! Probably what you want to do is, when you press be, IF the up button is also pressed, create the bomb, if not, create the projectile.

So you CAN read the gamepad directly, like this:

Code:
;LDA gamepad
;AND #%76543210
;;; all of those bits would be one or zero...I believe the buttons for this engine are:
;; 7 = right
;; 6 = left
;; 5 = down
;; 4 = up
;; 3 = start
;; 2 = select
;; 1 = b
;; 0 = a

;; so to check to see if the up button was down, you'd write:

   LDA gamepad
   AND #%00010000 ;; check up button
   BEQ upButtonWasNotPressed ;; if it was set to ZERO, that means it was not down
          ;;; here, this is what would happen if the button WAS pressed.
    ;;;create the bomb
    JMP doneWithButton
upButtonWasNotPressed:
   ;;; create the projectile
doneWithButton:
RTS

This checks if the button is CURRENTLY DOWN...it could all go inside the b button pressed script or whatever you're using to create objects. So when the b button is pressed (tool handles), it checks to see if the up button is being held (this script handles). Just a thought. :)
 

dale_coop

Moderator
Staff member
Finished the tutorial, tried to reproduce it withy assets from my PressStart game.
Was fun, love the new checkpoint tile type <3
A video here: https://youtu.be/w_RBFfuuMwc


Plateform_Mini.png
 
Top Bottom