... Posted July 23, 2018 Share Posted July 23, 2018 I'm trying to make a "munching squares" effect I need to wait before changing the playfield to the next frame can anyone help me with this? Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted July 23, 2018 Share Posted July 23, 2018 Not sure how to help without seeing the code you're struggling with. Also, how you pause is a programming choice. For instance: I write two separate drawscreen related sections for paused and unpaused gameplay. The code snippets below are basically two very similar code blocks but one decrements a time display (the paused section doesn't) rem //** DRAW EVENTS **// drawevent_main COLUPF = pfcolor COLUBK = bkcolor COLUP0 = p0color COLUP0 = counter NUSIZ0 = p0size NUSIZ1 = p1size CTRLPF = pfctrl if p0ref then REFP0 = 8 if p1ref then REFP1 = 8 player1x = player1x - tempx drawscreen player1x = player1x + tempx rem //** COUNTDOWN TIMER **// frames=frames+1:if frames<>one_tenth then skip_tenths frames=0 tenths=tenths&$0F minutes=minutes&$F0 score=score-1 if tenths=$99 then score=score-90 if seconds=$99 then score=score-4000 skip_tenths tenths=tenths|$A0 minutes=minutes|$0B goto main_begin drawevent_pause COLUPF = pfcolor COLUBK = bkcolor COLUP0 = p0color COLUP0 = counter NUSIZ0 = p0size NUSIZ1 = p1size CTRLPF = pfctrl if p0ref then REFP0 = 8 if p1ref then REFP1 = 8 player1x = player1x - tempx drawscreen player1x = player1x + tempx goto main_begin 1 Quote Link to comment Share on other sites More sharing options...
JC Software Posted July 23, 2018 Share Posted July 23, 2018 Are you talking about this: Looks awesome, but keep in mind a munching squares program on Atari 2600 won't look as cool because in batari basic the playfield pixels are 32 x 11 (or 32 x 12 if you add some vertical scrolling)Anyways have a variable play as some sort of timer, each time the current code runs have it take one away from the variable (timer = timer - 1) then once the variable reaches 0 reset the variable to whatever number (ex: 60) and have it move to the next frame. 1 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.