+Gemintronic Posted September 26, 2022 Share Posted September 26, 2022 So, made a small homebrew in homage to a rare game called "Birthday Mania" Download in linked topic. My objectives were: * Keep the game 4k. * Mimic the source games gameplay (for better or worse) * High res easily customizable title screen * More than 6 candles on same horizontal plane. I just barely accomplished all that. After adding in the high res title screen there was only 4 bytes left so no birthday music or extra features. Made 2 difficulty modes by setting a level variable on cold boot. The level determines how often candles drop. player1score is the timer (amount of permitted misses) if !switchleftb || !switchrightb then level = 10 : player1score = $50 else level = 6 : player1score = $99 Since the candles are playfield blocks I used this unwieldy code to determine which blocks to erase when hit by missile1 if collision(playfield, missile1) then temp1 = (missile1x/4)-5 : temp2 = (missile1y/8) : temp3 = temp1 + 2 : pfhline temp1 temp2 temp3 off : rewardtimer = 8 I could never exactly detect and erase one playfield block so I erased the nearest matching 2 blocks. I also had to delay the score reward and re-arm the player with a timer due to unwanted overlapping collision events. As a side two pfpixel commands didn't erase the intended blocks all the time.. so, pfhline! Used this line to see if any candles fell off screen and decrement the timer ("air" in Birthday Mania) if (var0+var1+var2+var3) > 0 && hattimer = 0 then sounda = 4 : dec player1score = player1score - 1 : if counter{0} then level = level + 1 By adding the last four playfield variables together we check all 32 block positions without pfread commands! To give the player an advantage the Hat Timer provides some invulnerability for a short time after collecting a candle with yer hat. player1score is from the player scores mini kernel so "dec" need to be used to deduct points properly. RevEngs paddle mini kernel was subverted to show the happy face guy with hat. The hats top is actually the ball so I can register collision with candles. https://forums.atariage.com/topic/223313-how-to-integrate-single-paddle-asm-code-into-bb/#comment-3519564 To stack both the playerscores and paddle mini kernel I changed the paddlemini label from minikernel to minikernelb and changed lines in std_kernel like this: ifconst minikernel jsr minikernelb jsr minikernel endif Since I am not using the playerscores as intended I kept seeing the player0score getting clobbered by unwanted values. So, I always made sure to reload the value that displayed the timer icon *just* before the drawscreen. player0score = $BA That's about the only interesting highlights I can think of now. 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.