2D Shooter: The Main Menu

Objective: Create a title screen with the instructions and a way to start the game by pressing the space key.

The first thing we want to do is make a new scene. Go to file > new scene or press ctrl + N. Save this as “Main Menu” and now we’re ready to create the UI.

To make the main menu, it’s just a matter of adding images and text until you get something that resembles a title screen. I also wanted to add a flickering text similar to the game over text I made here, then I just needed to load the game scene with the keycode “space”. This should all be in a separate script, and for staying organized, any scripts for a scene should be in its own folder.

Here’s the script for the main menu that controls the scene loading and the flickering of the text.

--

--

--

Currently learning to code with the help of GamedevHQ in order to someday my my game ideas come to life!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Android Oreo: all you need to know

Full transparency: When will the Chainge app launch and what will it look like?

How to hide API key in Ruby

Becoming Friends With Github: A Guide To Git

Product Development using Agile Methodology

How to configure OpenPBS/PBSPro on Ubuntu

Managing One XCode Project with different Teams/Bundle IDs

https://appcircle.io/wp-content/uploads/2020/04/xcode-12-download-1030x391.png

How to root Itel 1353P

Root LG Phone

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sabrina Windsor

Sabrina Windsor

Currently learning to code with the help of GamedevHQ in order to someday my my game ideas come to life!

More from Medium

Why Modern Web Development is a Mess

Publishing to the Google Play store

What’s new in PVS-Studio in 2021?

Making Piano Tiles with Unity