How to Make a Title Screen and Levels

Many games have title screens, as well as levels in RPGs. Creating these are easy because they are just backdrops drawn by the creator. Sensing blocks can be added to the sprite as Wall Sensors in order for the sprite to complete missions.


Title Screens

Title screens usually consist of one backdrop (the title and design) and a sprite (the "start" button). You will need three broadcasts for this screen:

-TitleScreen -StartGame -ShowSButton

The backdrop should contain this script:

when I receive [TitleScreen v]
switch backdrop to [Title Screen v]
broadcast [ShowSButton v]

The sprite should contain these scripts:

when green flag clicked
show
forever
if <touching [mouse-pointer v]?> then
switch costume to [costume2 v] //A different colored costume
else
switch costume to [costume1 v] // The original costume
when this sprite clicked
broadcast [StartGame v]
hide
when I receive [TitleScreen v]
show // This script is in case of a "Play Again" button at the end of the game. If you do not have a "play again" button, this script is not necessary


Levels

Levels are backdrops. Be sure to keep platform color consistent in Platformers, as well as anything that may cause the player to lose a life.

If you wish, you can add a large readout Variable that has this script somewhere in your project:

when green flag clicked
forever
set [Level Name v] to (backdrop name)

However, this requires each backdrop to be named. This is a very simple way of creating the backdrop levels and title screen.

Here's a simple script to put in the player so you can advance to the next level without scrolling or anything fancy.

when green flag clicked
forever
if (([x position v] of [Player v]) > (240)) then
switch backdrop to [next backdrop v]
go to x: (-202) y: (-70)

See Also

  • This page was last modified on 15 August 2016, at 15:57.