Words Fail Posted December 14, 2022 Share Posted December 14, 2022 (edited) I've got my game working.. I figured out how make it so when you run over all the blocks on the level it loads the next level... there's 4 levels right now, no enemies yet. I'd like the level to flash in between rounds. EDIT: I got the code working, but I'm trying to shorten it / make it better. Earlier in my code it sets a=1, 2, etc to say which level you're on. When the game determines you cleared a level it goes to a subroutine: levelend player0x=250: player0y=150 g=g+1 if g=30 then g=0: goto levelend2 drawscreen goto levelend levelend2 i=i+1 if i=40 then goto levelend3 if i=80 then gosub rack0: drawscreen if i=120 then goto levelend3 if i=160 then gosub rack0: drawscreen if i=200 then goto levelend3 if i=240 then gosub rack0: drawscreen if i=241 then a=a+1: g=0: h=0: b=0: return otherbank goto levelend2 levelend3 if a=1 then gosub rack1: drawscreen: goto levelend if a=2 then gosub rack2: drawscreen: goto levelend if a=3 then gosub rack3: drawscreen: goto levelend if a=4 then gosub rack4: drawscreen: goto levelend So rack0 is basically just a blank playfield statement.. and rack1 through rack4 are the levels.. so it's drawing the level, then drawing nothing, then drawing the level, etc. I am not sure how to get the speed nice. I used two freakin variables.. to slow it down. The flashes are kind of quick. Edited December 14, 2022 by Words Fail Quote Link to comment Share on other sites More sharing options...
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.