Add Countdown timer screen everytime game restart

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
kiyo
Prole
Posts: 19
Joined: Thu Dec 08, 2022 12:49 pm

Add Countdown timer screen everytime game restart

Post by kiyo »

I want to add a countdown timer screen to get people ready before game begins. I want it when people start the game from main menu, i want to show it when people pause the game and continue the game and also when game over and player restarts the game. I coded the countdown screen and nothing wrong there. but when i tried to add countdown screen before gameplay, here all things messing up. do you guys have any easier solution?
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: Add Countdown timer screen everytime game restart

Post by Andlac028 »

If you can show us your code, we can help you fix it.

If you are using some scenes library, you just the timer scene before game scene. Or you can just add boolean variable countDown and store time and add if in love.update, draw and maybe events, to show countdown and return without drawing or updating game.
User avatar
Bigfoot71
Party member
Posts: 287
Joined: Fri Mar 11, 2022 11:07 am

Re: Add Countdown timer screen everytime game restart

Post by Bigfoot71 »

As Andlac028 said without having your code it will be difficult to tell you exactly how to implement it in your game. But if it's really the countdown part that blocks you I made you this little example which could give you ideas.

If you need precision on what I wrote don't hesitate, if it's on something else share what you did ^^
Attachments
Countdown.love
(1015 Bytes) Downloaded 39 times
My avatar code for the curious :D V1, V2, V3.
Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests