So how do you make a start button on both the duck and weeding games there’s an actual start button that you click on to start the game. A student was asking and we looked through the code, but there is literally no code that we can see for the start button?
I thought it would be a sprite to click on, but it is not. I am wondering if these games were made in app lab instead then? One thing I think Code.org creators should seriously consider is merging app/game lab features. Would be nice as it is very hard and not convenient I find to create a game with levels.
Good suggestion and it’s come from a couple other people so we’ll see. In the meantime you can make a sprite that is the last thing drawn (bottom of code) and then has an if that if clicked on isVisible = false. Not the best solution but could work.
As part of a proof-of-concept, I made a short tutorial on how to make start and end screens in Game Lab. It’s not polished, but if you want to take a look, then please message me and I’ll send it to you.
If I have time, I can try and make a tutorial, but I do have a simple project that demonstrates the concept.
When run, there is a green “Go” Button. When that button is clicked, it goes away and a car shows up. If you click on the car 10 times, the score will update and the game over screen will show up.
I just came across this discussion and wondered if the video you created is still available? I have a student who has a game over screen but then wants to restart the game. I have suggested creating a ‘button’ to press which makes the sprites visible and resets the variables but I am not sure if it is the best idea.
I think your idea is a good one. To “reset” a game, you would want to hide sprites that need to be hidden (such as the game over sprite), reset the variables, and show the sprites that need to be shown. If designed well, a function could be made that does all of that. You call it at the beginning of the game and when you want to start over, you just call it again.