Page 1 of 1

Add Countdown timer screen everytime game restart

Posted: Sat Jan 21, 2023 4:46 am
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?

Re: Add Countdown timer screen everytime game restart

Posted: Sat Jan 21, 2023 6:13 am
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.

Re: Add Countdown timer screen everytime game restart

Posted: Sun Jan 22, 2023 12:57 am
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 ^^