Overview
In this Game Recipe, we will discuss making a title screen for your game. We will be using an interface with selectable fields, as well as system triggers.
Requirements
- (Optional) A sprite to use as a logo.
- (Optional) A sprite to use as the background.
Setup
- Create a new interface. Set the Display Name and click OK.
- In this interface, use the Field tool to add a text field wherever you prefer.
- Set the Initial Text to “New Game”.
- Enable the Selectable option.
- Change the Visual Setting to Text, or leave it at Custom and set the Unselected and Selected colors to whatever you prefer.
- Select the Activated trigger and click Edit Script.
- Place a Show/Hide Interface event.
- For Interface, select (This).
- Set Turn to Off.
- Click OK to save and close the event.
- Click OK to save and close the script.
- Place a Show/Hide Interface event.
- Click OK to save and close the field.
- Add another Field below or beside the first one.
- Set the Initial Text to “Load Game”.
- Enable the Selectable option.
- Change the Visual Setting to Text, or leave it at Custom and set the Unselected and Selected colors to whatever you prefer.
- Select the Activated trigger and click Edit Script.
- Place a Show Load Game event.
- Click OK to save and close the script.
- Click OK to save and close the field.
- Add another Field below or beside the previous one.
- Set the Initial Text to “Quit Game”.
- Enable the Selectable option.
- Change the Visual Setting to Text, or leave it at Custom and set the Unselected and Selected colors to whatever you prefer.
- Select the Activated trigger and click Edit Script.
- Place a Quit Game event.
- Click OK to save and close the script.
- Click OK to save and close the field.
- If you have a sprite to use as a logo
- Use the Sprite tool to add a sprite field wherever you prefer.
- Set the Sprite to the one you want to use.
- Click OK to save and close the field.
- Set the Sprite to the one you want to use.
- Use the Sprite tool to add a sprite field wherever you prefer.
- If you don’t have a sprite to use as the logo
- Use the Field tool again to add a text field wherever you prefer.
- Set the Initial Text to the name of your game.
- You may set the Text Font or Normal Color if you’d like.
- Click OK to save and close the field.
- Use the Field tool again to add a text field wherever you prefer.
- If you have a sprite to use as a background
- Use the Sprite tool to add a sprite field to the very top-left corner of the interface.
- Set the Sprite to the one you want to use.
- Click OK to save and close the field.
- With the Point tool, right-click the sprite and select Move > to Back.
- Using the Point tool, you can resize or reposition the background to wherever you like, if it isn’t quite right where it’s at now.
- Use the Sprite tool to add a sprite field to the very top-left corner of the interface.
- Open the System Triggers menu.
- Select Introduction – very beginning of a new game and click Edit Script.
- If there are any events in this script already, disconnect them from the start by right-clicking on the line connecting the Start node and the first event. Set those events aside; we’ll reconnect them later.
- If you did move any existing events, make sure you have the Start node selected before continuing.
- Add a Show/Hide HUD event.
- Set HUD to Invisible.
- Click OK to save and close the event.
- Add a Fade Out event. Use the version under the Camera category in the list.
- For Transition, select “instant”.
- Set Color to whatever you want; black works fine if you’re not sure.
- Set Time to 0.
- Click OK to save and close the event.
- Add a Pause/Resume Game event.
- Set State to Pause.
- Click OK to save and close the event.
- Add a Change Active Interface event.
- For New Active Interface, select the interface you created previously.
- Click OK to save and close the event.
- Add a Wait for Interfaces event.
- Add a Fade In Event. Use the version under the Camera category in the list.
- For Transition, select whichever option you prefer.
- Set Time to 0 if you chose “instant” or whatever number you like if you chose “normal”.
- If you would prefer that the game remain paused until the screen fades in fully, enable Delay as well.
- Click OK to save and close the event.
- Add a Pause/Resume Game event.
- Set State to Resume.
- Click OK to save and close the event.
- Add a Show/Hide HUD event.
- Set HUD to Visible.
- Click OK to save and close the event.
- If you previously moved existing events out of the way, reconnect them now by dragging a line from the bottom of the Fade In to the top of the first left-over event.
- Click OK to save and close the script.
- Click OK to save and close the System Triggers menu.
- Select Introduction – very beginning of a new game and click Edit Script.
- Test your game by clicking the Test Game button. Don’t get it confused with the Test Map or Test Interface buttons; you want the one beside the Game Settings and Test in Browser buttons, pictured below.
Notes
If you get a black screen after selecting “New Game”, make sure you’ve set the Starting Map and Starting Location options in Game Settings (That’s the gear-shaped icon in the screenshot just above.)