NESmaker Pi beta 3.14 update patch and new tutorial set

User avatar
dale_coop
Posts: 455
Joined: Fri Feb 16, 2018 7:05 am

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by dale_coop » Thu Jun 28, 2018 7:14 am

Yes could be something like that.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
User avatar
Rob Burrito
Posts: 81
Joined: Mon Apr 23, 2018 4:31 pm

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by Rob Burrito » Fri Jun 29, 2018 1:58 pm

Video 10_FlashingDeath there's a spot you missed editing the code back. when you test after giving health at 1:06 your object moves to the top left tile object, where as the code as downloaded is written to JMP RESET and resets the game for tutorial followin folks at home. not a huge deal there, but later in the tutorial after putting in the animation it will not animate and jump back to restart which is definitely an issue for folks learning. its from at the end you threw in that JMP RESET line to show how easy it could be to mod that to do other actions, just updating the download to remove line 6 in Routines/System/HandlePlayerDeath. also note the yawn at 4:34 lol'd me.
User avatar
TheNew8bitHeroes
Posts: 251
Joined: Fri Feb 16, 2018 9:24 pm
Location: Sarasota, FL
Contact:

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by TheNew8bitHeroes » Fri Jun 29, 2018 2:25 pm

Yeah, I'm sure there are a few things I may have missed. It's going to be hard to come up with a really serious tutorial set that teaches concepts, because I have to keep sort of going back and showing how I do things and change things (like with the platforming tutorial). But if I do it a strict way, I'll get a lot of "well why can't you do it like xyz" (which you can, but it takes that conceptually understanding of how and where to change things). That's why I keep doing these tutorials - to sort of see what is working.

As for the yawn...hey, full day of work, few hours of taking care of the kiddo, THEN starting work on NESmaker...it's amazing there was only ONE yawn! haha
User avatar
Mihoshi20
Posts: 273
Joined: Tue Mar 06, 2018 11:47 pm

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by Mihoshi20 » Fri Jun 29, 2018 3:30 pm

Finally gotten around to where I can follow the new tutorials for NESmaker 3.1.4(Pi)[Empty] and everything has been trucking along fine, but I hit a weird issue midway through video 12_HudPart2 that persisted for videos 13 and 14. I seem to be the only one having this issue as no one else has mentioned it so thought I'd post and see if I missed or overlooked something.

The issue I'm having is that when assigning ScoreGoesUp.asm to a button and pressing it doesn't immediately update the hud as seen in the video unless I leave the screen and come back, only then does it update as normal until the game is reset through death or a power cycle then the strange behavior is restored. This behavior also happens if I comment out all the lines in ScoreGoesUp.asm and create a 'pickup' type monster, only when leaving to a nearby screen and coming back does the game work as intended.

Would love any insight as to what's going on. Screenshot of the UI or code snippets can be provided if need be.
User avatar
TheNew8bitHeroes
Posts: 251
Joined: Fri Feb 16, 2018 9:24 pm
Location: Sarasota, FL
Contact:

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by TheNew8bitHeroes » Fri Jun 29, 2018 3:44 pm

Sure. My *guess* is that the hud element number doesn't line up right.

For instance, if you use HUD Element 3 as the one that shows the variable score, you need to go to Routines\InitializationScripts\InitLoads.asm and update the part that says ///SET UP HUD HOOKS HERE.

You want to make sure that, in that instance, it says

Code: Select all

LDA #HUD_ELEMENT_3
STA HUD_updateScore
This works in conjunction with the GLOBAL_Player1_Score variable, which you should set up as the thing displaying, and the variable being changed.

Lastly, make sure NO OTHER hook is set to update to that element, or it could be overwriting the update.
User avatar
Mihoshi20
Posts: 273
Joined: Tue Mar 06, 2018 11:47 pm

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by Mihoshi20 » Fri Jun 29, 2018 3:58 pm

TheNew8bitHeroes wrote:
Fri Jun 29, 2018 3:44 pm
Sure. My *guess* is that the hud element number doesn't line up right.

For instance, if you use HUD Element 3 as the one that shows the variable score, you need to go to Routines\InitializationScripts\InitLoads.asm and update the part that says ///SET UP HUD HOOKS HERE.

You want to make sure that, in that instance, it says

Code: Select all

LDA #HUD_ELEMENT_3
STA HUD_updateScore
This works in conjunction with the GLOBAL_Player1_Score variable, which you should set up as the thing displaying, and the variable being changed.

Lastly, make sure NO OTHER hook is set to update to that element, or it could be overwriting the update.
Does it matter if a hud element is setup above it but goes unused? The hud element isn't set to the same number but isn't actually assigned in the hud.

Code: Select all

;;;;;; SET UP HUD HOOKS HERE:
	;; what number element does it use?
	;; Set your created hud variable to #HUD_ELEMENT_x
	LDA #HUD_ELEMENT_2
	STA HUD_updateHealth
		
	LDA #HUD_ELEMENT_4
	STA HUD_updateScore
	
	LDA #HUD_ELEMENT_6
	STA HUD_updateLives
	;;;;;;;;;;;;;
Element 2 is never displayed.
On first boot, or anytime the reset routine is called then pressing the button or picking up an item doesn't set the score in real time, but leaving to another screen or returning to the previous screen then it does update the score in real time as intended until a reset is called. So the routine works as shown, just not on initial startup.

Update: Okay, with your help pointing me in the right direction I commented out the unused element and the score updates as intended! Many thanks for the heads up and jumpstarting my wheels turning! It seems you can't just have elements hanging out unused.
User avatar
TheNew8bitHeroes
Posts: 251
Joined: Fri Feb 16, 2018 9:24 pm
Location: Sarasota, FL
Contact:

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by TheNew8bitHeroes » Fri Jun 29, 2018 4:17 pm

Hm. First boot may be able to be fixed...there is a code HandleScreenLoadHudDraw. Try ORing in the HUD_updateScore - but it should already be there. You should be able to look at it and see exactly what I mean. That SHOULD update it upon loading a screen.

I'm confused about what you're asking above. Are you TRYING to show Element 2 and it's not working, or are you trying NOT to use a health variable? Either way, it should not be a culprit. Though if you don't intend to use it, try commending out ORA HUD_updateHealth in the code I just mentioned...but it shouldn't have anything to do with it.

So the VARIABLE amount of score is loaded into element 4, then? It seems like the variable is working, but not real time update (these are handled separately...you can easily change graphic data when changing screens, but real time updates mid frame are much harder, which is why they're handled separately...the former can happen in line at the time you want it to, the latter can happen ANY time throughout gameplay, so it ends up getting cued and waiting for the next available update frame).

Again, this is hard for me to tech beyond what's shown in the tutorial. The reason I think it has to do with the STA HUD_updateScore or something related is because the variable IS being affected, it's just not showing, and that's the piece of code that determines which of the hud elements needs the update.
User avatar
Mihoshi20
Posts: 273
Joined: Tue Mar 06, 2018 11:47 pm

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by Mihoshi20 » Fri Jun 29, 2018 4:23 pm

TheNew8bitHeroes wrote:
Fri Jun 29, 2018 4:17 pm
Hm. First boot may be able to be fixed...there is a code HandleScreenLoadHudDraw. Try ORing in the HUD_updateScore - but it should already be there. You should be able to look at it and see exactly what I mean. That SHOULD update it upon loading a screen.

I'm confused about what you're asking above. Are you TRYING to show Element 2 and it's not working, or are you trying NOT to use a health variable? Either way, it should not be a culprit. Though if you don't intend to use it, try commending out ORA HUD_updateHealth in the code I just mentioned...but it shouldn't have anything to do with it.

So the VARIABLE amount of score is loaded into element 4, then? It seems like the variable is working, but not real time update (these are handled separately...you can easily change graphic data when changing screens, but real time updates mid frame are much harder, which is why they're handled separately...the former can happen in line at the time you want it to, the latter can happen ANY time throughout gameplay, so it ends up getting cued and waiting for the next available update frame).

Again, this is hard for me to tech beyond what's shown in the tutorial. The reason I think it has to do with the STA HUD_updateScore or something related is because the variable IS being affected, it's just not showing, and that's the piece of code that determines which of the hud elements needs the update.
I got it worked out thanks to you pointed me to the right area, I wasn't using element 2 for anything but had left it in the code. Seems that was throwing a wrench in everything as it looks like you can't have elements just loitering about. Commenting out the element 2 related lines fixed the live update refresh issue the score was suffering from.
User avatar
TheNew8bitHeroes
Posts: 251
Joined: Fri Feb 16, 2018 9:24 pm
Location: Sarasota, FL
Contact:

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by TheNew8bitHeroes » Fri Jun 29, 2018 4:38 pm

Excellent! Yeah, we're working on a front end solution for this in the hud designer / variable creator that does all this automatically. It's the most sophisticated, nonsensical piece of the engine thus far, but it's cool how versatile it is!
User avatar
Mihoshi20
Posts: 273
Joined: Tue Mar 06, 2018 11:47 pm

Re: NESmaker Pi beta 3.14 update patch and new tutorial set

Post by Mihoshi20 » Fri Jun 29, 2018 5:08 pm

TheNew8bitHeroes wrote:
Fri Jun 29, 2018 4:38 pm
Excellent! Yeah, we're working on a front end solution for this in the hud designer / variable creator that does all this automatically. It's the most sophisticated, nonsensical piece of the engine thus far, but it's cool how versatile it is!
Yeah, code weaving is often like casting a magical spell. Amazing when it works buy one mispronunciation or added words and instead of lead into gold you suddenly have a portal to the void have have to figure out what went horribly wrong and turn to the dark arts of debugging. I'm happy to have found this gremlin now and saved you about a billion tech support messages on the same issue later down the line. LOL.

I for sure am looking forward to doing more with the variable image setting, not just for quick weapon selector or indicators, but also for changing a portrait to show a quick hurt animation.
Locked