Creating a Win Screen
Games are more satisfying if they have an ending! Here are some tips for making a screen you can use to show that the player has won:
1. First, you’ll need to create something that marks the end of the game — a finish line to cross, a portal or door to go through, etc. To do that, you’ll need to make a new sprite:
- Double-click in the layout, choose sprite, type a name that helps you remember what it is, and click Insert
- Draw a picture, or click the folder button to import one that’s on your computer.
- Click the X to close the Animations Editor, then put your sprite wherever in the game you want it to go!
2. Next, you’ll make the actual screen you see when you win. You’ll need to make a new layout — another screen. To do that, look in the Project Bar on the right. Then find the Layouts folder, and right-click on it. Then click + Add layout:
3. Click Add event sheet.
4. In the Properties Bar on the left, change the layout’s name to something like Win screen. Then change the size to the size of your viewport — if you haven’t changed it, that’ll be 640x480.
5. Design your win screen!
If you want to add a picture, create a sprite:
- Double-click in the layout, choose sprite, and click Insert
- Draw a picture, or click the folder button to import one that’s on your computer.
If you want to add words, create a text object:
- Double-click in the layout, choose text, and click Insert
- Scroll down in the Properties Bar to find where you can change what the text says and what it looks like (color, size, font, style, etc.)
6. To make the ending work, you’ll need to tell the computer, When the Player runs into the new sprite, have the computer go to the win layout. You can do that by creating an event on your event sheet.
- Look in the Properties Bar. Find Event sheet 1, and double-click on it
- Scroll to the bottom, and click Add event
- Click your Player, then click Next
- Choose On collision with another object, then click Next
- Click <click to choose>, then click the sprite you just made, then Done
- Click Add action
- Click System, then click Next
- Choose Go to Layout, then click Next
- In the dropdown box, choose Win screen (or whatever you named your new layout)
- Click Done
Your event should now look something like this:
If it doesn’t look right, try to fix your mistake or ask for help. Then hit Preview and test your game—can you get to the ending?
Be sure to test your game’s screens thoroughly! Then go back and try something else.