top of page
Search

Menu System

  • Paul Nourish
  • Jul 24, 2016
  • 1 min read

One of the last features I have needed to implement to my game is a menu and scene system that will allow me to choose what game I would like to play and whether to replay or view the final scores through the game.

This included a main menu scene, which lets you quit or choose a game type, a standard game scene, a keepings off scene and a game over scene (pictured below).

There were two main things I had to make to create this. The first class I created was a scene class that allowed me to set up certain situations to load whenever called, e.g. loading the players with the goals and murderbots, or loading a keepings off scene which only includes the players, ball and score. This scene system was a good learning experience for me as i did not have to write much new code and it was an exercise purely in code organisation.

The second part of this menu system I had to make was a simple button class, all this did was create a box around text that displayed messages depending on situations in the game and that could recognise when the bounds of the box collided with another object. using this collision function I could tell the game to load a certain scene whenever there was a collision between the mouse and the box and the left mouse button was pressed.


 
 
 

Comments


Recent Posts
  • Facebook App Icon
  • Twitter App Icon
  • Google+ App Icon

© 2023 by Name of Site. Proudly created with Wix.com

bottom of page