Arenafoot Posted September 15, 2018 Share Posted September 15, 2018 Major AI overhaul, it now chases after stones and gives you a good challenge. I also changed the graphics of the UI a bit. 2 bytes left, I want to add two more if statments, so need to free up space somehow. After that I think that its done. Oh wow! This version 23 is REAL challenging (for the 1 player game)!!!! Quote Link to comment Share on other sites More sharing options...
+Karl G Posted September 15, 2018 Share Posted September 15, 2018 Major AI overhaul, it now chases after stones and gives you a good challenge. I also changed the graphics of the UI a bit. 2 bytes left, I want to add two more if statments, so need to free up space somehow. After that I think that its done. It will only gain you a few bytes, but putting initializations of variables to the same value on the same line will save a little bit. So, e.g.: _invisible0 = 0 _invisible1 = 0 Should be: _invisible0 = 0 : _invisible1 = 0 2 Quote Link to comment Share on other sites More sharing options...
Impaler_26 Posted September 15, 2018 Share Posted September 15, 2018 Major AI overhaul, it now chases after stones and gives you a good challenge. I also changed the graphics of the UI a bit. 2 bytes left, I want to add two more if statments, so need to free up space somehow. After that I think that its done. I just played v0.23 a bit and the AI is really challenging now. An old bug returned - the game speed doesn't reset after game over. When you start a new game it starts at high speed. 1 Quote Link to comment Share on other sites More sharing options...
Arenafoot Posted September 15, 2018 Share Posted September 15, 2018 An old bug returned - the game speed doesn't reset after game over. When you start a new game it starts at high speed. I didn't see that happen on mine.....it reset on the next game. Quote Link to comment Share on other sites More sharing options...
fluxit Posted September 16, 2018 Share Posted September 16, 2018 (edited) A way to provoke the bug is to use enough low speed powerups to flip the speed to 'hi.' Games from from that point on will start at a hi speed. Edited September 16, 2018 by fluxit Quote Link to comment Share on other sites More sharing options...
Impaler_26 Posted September 16, 2018 Share Posted September 16, 2018 I didn't see that happen on mine.....it reset on the next game. The bug only happens once you reach high speed (around 200+ points). 1 Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted September 16, 2018 Author Share Posted September 16, 2018 All bugs fixed! I managed to make the framerate stable by changing the pfread to a playfieldpos check and using it at playfieldpos=1. This shifted the top block creation to playfieldpos 1 instead of 0 and for some reason that fixed everything. I think that that is a good reason to stop touching it and just tweak some starting numbers. (Unless more bugs are found of course!) I'm quite happy with the game in this state. I also added an option to play vs the old AI (non moving one) by flipping the B/W switch. See it as a practice mode. Oh wow! This version 23 is REAL challenging (for the 1 player game)!!!! Glad you like it. I think that the AI is quite cool no. It will only gain you a few bytes, but putting initializations of variables to the same value on the same line will save a little bit. So, e.g.: _invisible0 = 0 _invisible1 = 0 Should be: _invisible0 = 0 : _invisible1 = 0 I tried some of that and removed 2 pfchecks which gave me a lot. They are super heavy commands! I just played v0.23 a bit and the AI is really challenging now. An old bug returned - the game speed doesn't reset after game over. When you start a new game it starts at high speed. Glad you like it! Bug is fixed in v24 1 Quote Link to comment Share on other sites More sharing options...
Impaler_26 Posted September 16, 2018 Share Posted September 16, 2018 All bugs fixed! I managed to make the framerate stable by changing the pfread to a playfieldpos check and using it at playfieldpos=1. This shifted the top block creation to playfieldpos 1 instead of 0 and for some reason that fixed everything. I think that that is a good reason to stop touching it and just tweak some starting numbers. (Unless more bugs are found of course!) I'm quite happy with the game in this state. The gamespeed works correctly now, will play some more later to check everything. You probably don't need it anymore but you could save 7 bytes by drawing the playfield directly with playfield variables: var1 = %00000001 : var2 = %00000001 : var5 = %00000001 : var6 = %00000001 : var9 = %00000001 : var10 = %00000001 : var13 = %00000001 var14 = %00000001 : var17 = %00000001 : var18 = %00000001 : var21 = %00000001 : var22 = %00000001 : var25 = %00000001 : var26 = %00000001 var29 = %00000001 : var30 = %00000001 : var33 = %00000001 : var34 = %00000001 : var37 = %00000001 : var38 = %00000001 : var41 = %00000001 : var42 = %00000001 http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#playfield Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted September 16, 2018 Author Share Posted September 16, 2018 The gamespeed works correctly now, will play some more later to check everything. You probably don't need it anymore but you could save 7 bytes by drawing the playfield directly with playfield variables: var1 = %00000001 : var2 = %00000001 : var5 = %00000001 : var6 = %00000001 : var9 = %00000001 : var10 = %00000001 : var13 = %00000001 var14 = %00000001 : var17 = %00000001 : var18 = %00000001 : var21 = %00000001 : var22 = %00000001 : var25 = %00000001 : var26 = %00000001 var29 = %00000001 : var30 = %00000001 : var33 = %00000001 : var34 = %00000001 : var37 = %00000001 : var38 = %00000001 : var41 = %00000001 : var42 = %00000001 http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#playfield Do you put that into the playfield enviroment or outside? It gives me errors. However I just tried pfvlines and that freed a lot up, got 43 now. pfvline 8 0 10 on pfvline 24 0 10 on I'm almost sad, it feels like I should fill it. 1 Quote Link to comment Share on other sites More sharing options...
Impaler_26 Posted September 16, 2018 Share Posted September 16, 2018 Do you put that into the playfield enviroment or outside? It gives me errors. However I just tried pfvlines and that freed a lot up, got 43 now. pfvline 8 0 10 on pfvline 24 0 10 on I'm almost sad, it feels like I should fill it. You use the variables instead of the playfield - delete the playfield and paste the code from my post where your playfield was. D'OH! I forgot about pfvline, that works even better for straight line playfields like yours. Quote Link to comment Share on other sites More sharing options...
fluxit Posted September 16, 2018 Share Posted September 16, 2018 The AI is quite aggressive, which is fun. Where before I would take the occasional coconut to the face in order to save 'player 2,' I've now seen it bang right through a coconut, beating me to the stone. It can be challenging at times to actually collect that third stone to replenish your life while the AI is active. Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted September 17, 2018 Author Share Posted September 17, 2018 The AI is quite aggressive, which is fun. Where before I would take the occasional coconut to the face in order to save 'player 2,' I've now seen it bang right through a coconut, beating me to the stone. It can be challenging at times to actually collect that third stone to replenish your life while the AI is active. I'm glad that you like it. Is the behaviour good you think? I could make it keep going for stones even after getting 3, but that seemed a bit much. Got some space left though so open for suggestions. Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted September 17, 2018 Share Posted September 17, 2018 It will only gain you a few bytes, but putting initializations of variables to the same value on the same line will save a little bit. So, e.g.: _invisible0 = 0 _invisible1 = 0 Should be: _invisible0 = 0 : _invisible1 = 0 I didn't know that tip, that's helpful, thanks Karl G. Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted September 29, 2018 Author Share Posted September 29, 2018 New version up. Feedback welcome! 1 Quote Link to comment Share on other sites More sharing options...
fluxit Posted October 1, 2018 Share Posted October 1, 2018 The 10,000s digit on one of the scores has a '1' in it at boot. This is seen in MAME and Stella. The AI can kick my butt at speed now if I don't use 'add branch' to kill it off. I let it play out after a silly death on my part, and it reached a high score of 7155. Quote Link to comment Share on other sites More sharing options...
+ZeroPage Homebrew Posted October 17, 2018 Share Posted October 17, 2018 We'll be featuring the NEW FINAL UNRELEASED version Monkey King LIVE on today's ZeroPage Homebrew stream on Twitch at 6PM PT/9PM ET! We'll also be playing the boxed version of Zippy the Porcupine!Twitch Stream: https://www.twitch.t...ropagehomebrew/Games Today: - Alien Attack (2018) by Edward Smith (easmith)- Alien Revenge (2018) by Edward Smith (easmith)- Monkey King (FINAL) (2018) by Alex Pietrow (coolcrab)- Zippy The Porcupine by (2015) by Chris Spry (Sprybug) 1 Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted October 18, 2018 Author Share Posted October 18, 2018 Big Update! Added new powerup and fixed the framerate. However there seem to be sound glitches. I'll work on those when I'm back from travel. New manual also up in main thread! 2 Quote Link to comment Share on other sites More sharing options...
bogax Posted October 21, 2018 Share Posted October 21, 2018 (edited) The code wont compile (missing goto's) The invicible icon in score_graphics.asm is different than shown You don't need pfvline here it's already in the branch clearing stuff ; pfvline 8 0 11 on ; pfvline 24 0 11 on gosub clearP0left gosub clearP0right gosub __sprite_color : drawscreen gosub clearP1left gosub clearP1right you don't need all these joy0fire clauses in the if statements you already tested that in the first if statement ; power up activation if !joy0fire then __skipfire ; if joy0fire && player0score > $0 then gosub __firesound ; if joy0fire && player0score = $a then gosub __slowdown : player0score = $0 ; if joy0fire && player0score = $b then gosub __killbranch1 ; if joy0fire && player0score = $c then gosub __livesplus1 ; if joy0fire && player0score = $d then player0score = $0 : _invisible0 = 1 ; if joy0fire && player0score = $e then player0score = $0 : gosub __mkbranch1 ; if joy0fire && player0score = $f then player0score = $0 : _invincible = 25 : _left_right{6} = 1 : _F0 = 25 if player0score > $0 then gosub __firesound if player0score = $a then gosub __slowdown : player0score = $0 if player0score = $b then gosub __killbranch1 if player0score = $c then gosub __livesplus1 if player0score = $d then player0score = $0 : _invisible0 = 1 if player0score = $e then player0score = $0 : gosub __mkbranch1 if player0score = $f then player0score = $0 : _invincible = 25 : _left_right{6} = 1 : _F0 = 25 You can flatten the killbranch routines a little (but you still need the labels for the individual routines since you're calling them to setup the playfield) killbranch1 player0score = $0 : bally = 100 gosub sprite_color if left_right{4} then clearP0left clearP0right var1 = 1 : var5 = 1 : var9 = 1 : var13 = 1 : var17 = 1 : var21 = 1 : var25 = 1 : var29 = 1 : var33 = 1 : var37 = 1 : var41 = 1 : var45 = 1 : return clearP0left var0 = 0 : var4 = 0 : var8 = 0 : var12 = 0 : var16 = 0 : var20 = 0 : var24 = 0 : var28 = 0 : var32 = 0 : var36 = 0 : var40 = 0 : var44 = 0 : return Since you allways call the sprite_color routine before drawscreen you can move drawscreen into sprite_color and get rid of a bunch of calls to drawscreen and you can do it with a tail call optimization (you need the prepended dot because that's what bB assumes ie "goto drawscreen" becomes "jmp .drawscreen" so you need to declare .drawscreen) if startgame then sprite_color_return ;Check if player is invisible if invisible0 then invisible0 = invisible0 + 1 : COLUP1 = $C4 if invisible0 = 200 then invisible0 = 0 if invisible1 then invisible1 = invisible1 + 1 : COLUP0 = $C4 if invisible1 = 200 then invisible1 = 0 const .drawscreen = drawscreen sprite_color_return goto drawscreen I think you're calling drawscreen a lot more than you need to Since your pfreads are with constants, just use the screen variables ; if pfread(9,1) then return ; if pfread(25,1) then return if var5{1} || var7{1} then return Edited October 21, 2018 by bogax Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted October 21, 2018 Author Share Posted October 21, 2018 The code wont compile (missing goto's) The invicible icon in score_graphics.asm is different than shown You don't need pfvline here it's already in the branch clearing stuff ; pfvline 8 0 11 on ; pfvline 24 0 11 on gosub clearP0left gosub clearP0right gosub __sprite_color : drawscreen gosub clearP1left gosub clearP1right you don't need all these joy0fire clauses in the if statements you already tested that in the first if statement ; power up activation if !joy0fire then __skipfire ; if joy0fire && player0score > $0 then gosub __firesound ; if joy0fire && player0score = $a then gosub __slowdown : player0score = $0 ; if joy0fire && player0score = $b then gosub __killbranch1 ; if joy0fire && player0score = $c then gosub __livesplus1 ; if joy0fire && player0score = $d then player0score = $0 : _invisible0 = 1 ; if joy0fire && player0score = $e then player0score = $0 : gosub __mkbranch1 ; if joy0fire && player0score = $f then player0score = $0 : _invincible = 25 : _left_right{6} = 1 : _F0 = 25 if player0score > $0 then gosub __firesound if player0score = $a then gosub __slowdown : player0score = $0 if player0score = $b then gosub __killbranch1 if player0score = $c then gosub __livesplus1 if player0score = $d then player0score = $0 : _invisible0 = 1 if player0score = $e then player0score = $0 : gosub __mkbranch1 if player0score = $f then player0score = $0 : _invincible = 25 : _left_right{6} = 1 : _F0 = 25 You can flatten the killbranch routines a little (but you still need the labels for the individual routines since you're calling them to setup the playfield) killbranch1 player0score = $0 : bally = 100 gosub sprite_color if left_right{4} then clearP0left clearP0right var1 = 1 : var5 = 1 : var9 = 1 : var13 = 1 : var17 = 1 : var21 = 1 : var25 = 1 : var29 = 1 : var33 = 1 : var37 = 1 : var41 = 1 : var45 = 1 : return clearP0left var0 = 0 : var4 = 0 : var8 = 0 : var12 = 0 : var16 = 0 : var20 = 0 : var24 = 0 : var28 = 0 : var32 = 0 : var36 = 0 : var40 = 0 : var44 = 0 : return Since you allways call the sprite_color routine before drawscreen you can move drawscreen into sprite_color and get rid of a bunch of calls to drawscreen and you can do it with a tail call optimization (you need the prepended dot because that's what bB assumes ie "goto drawscreen" becomes "jmp .drawscreen" so you need to declare .drawscreen) if startgame then sprite_color_return ;Check if player is invisible if invisible0 then invisible0 = invisible0 + 1 : COLUP1 = $C4 if invisible0 = 200 then invisible0 = 0 if invisible1 then invisible1 = invisible1 + 1 : COLUP0 = $C4 if invisible1 = 200 then invisible1 = 0 const .drawscreen = drawscreen sprite_color_return goto drawscreen I think you're calling drawscreen a lot more than you need to Since your pfreads are with constants, just use the screen variables ; if pfread(9,1) then return ; if pfread(25,1) then return if var5{1} || var7{1} then return Strange it worked when I uploaded it, but I was in a rush so maybe I messed up :S I'm stuck on a mountaintop on a island until the end of the month (looking at the Sun, or trying at least), but maybe I can get bB to work on my Mac. All my saves are on my home PC though, so I can't access them. I'm hoping that its just the .asm files that are wrong. I'll get back to you asap. Thanks for the upgrades also, this should shave off quite some bits again. Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted November 18, 2018 Author Share Posted November 18, 2018 RC5 has the sound glitch fixed and I think is basically done now. Unless people find anything terrible. 1 Quote Link to comment Share on other sites More sharing options...
fluxit Posted November 21, 2018 Share Posted November 21, 2018 The ghost monkey is a cool addition. It's a very small thing and may only be an emulator issue, but the leftmost pixel of the left ghost monkey shows up on the right side of the screen. I need to spend some more time with this release, but I've not seen any real issues so far. Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted November 21, 2018 Author Share Posted November 21, 2018 The ghost was not intentional, I changed the BG a bit and forgot the players. But it could become a feature as a controllable monkey that does not collide with things to keep the loser entertained in keep going mode. I'm glad that you like it though! Quote Link to comment Share on other sites More sharing options...
+Karl G Posted November 21, 2018 Share Posted November 21, 2018 Kinda like the "ghosts" of dead players in Warlords when the screen flashes. I doubt those were intentional, but it was a neat effect, so she probably decided to keep it instead of fix it, at a guess. 1 Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted November 22, 2018 Author Share Posted November 22, 2018 Kinda like the "ghosts" of dead players in Warlords when the screen flashes. I doubt those were intentional, but it was a neat effect, so she probably decided to keep it instead of fix it, at a guess. Having similar inclinations now. Will work on that this weekend. Quote Link to comment Share on other sites More sharing options...
Coolcrab Posted November 24, 2018 Author Share Posted November 24, 2018 (edited) Added a ghost function in 'keep going mode' that behaves as a normal monkey but does not interact with any objects. As suggested by Fluxit and KarlG The ghost monkey is a cool addition. It's a very small thing and may only be an emulator issue, but the leftmost pixel of the left ghost monkey shows up on the right side of the screen. I need to spend some more time with this release, but I've not seen any real issues so far. Kinda like the "ghosts" of dead players in Warlords when the screen flashes. I doubt those were intentional, but it was a neat effect, so she probably decided to keep it instead of fix it, at a guess. Edited November 24, 2018 by Coolcrab 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.