prOk Posted October 24, 2022 Share Posted October 24, 2022 Hi all. Looking for some advice on how you execute something like a 5 second timer when you display a game over type screen to reset or go back to the main title screen. Really looking for code examples or pointers. Should I be counting cycles? Quote Link to comment Share on other sites More sharing options...
+KaeruYojimbo Posted October 24, 2022 Share Posted October 24, 2022 In bB each drawscreen is 1/60th of a second, so something like game_over_loop x = x + 1 if x = 60 then y = y + 1 : x = 0 drawscreen if y < 5 then goto game_over_loop 1 Quote Link to comment Share on other sites More sharing options...
prOk Posted October 24, 2022 Author Share Posted October 24, 2022 Thank you, this worked perfect. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 24, 2022 Share Posted October 24, 2022 1 hour ago, prOk said: Hi all. Looking for some advice on how you execute something like a 5 second timer when you display a game over type screen to reset or go back to the main title screen. Really looking for code examples or pointers. Should I be counting cycles? Have you checked out the example programs on the batari Basic page? Here are two example programs with a game over delay timer: https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_tinkernut_world_deluxe https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#sprite_missile_bankswitching_example Quote Link to comment Share on other sites More sharing options...
ZippyRedPlumber Posted October 25, 2022 Share Posted October 25, 2022 A much older version of my Lyra game used a 20-second counter, once 20 seconds were up it goes to the title screen. 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.