Setting up menus

For today’s Devember update, I bring you an ugly and not entirely functional title screen! Also I thought I’d show off a picture of the game over screen while I’m at it, since I never did that yesterday.

Our title screen is currently very simplistic with just some (vaguely) informative text and a semi-functional menu. This should actually allow us to select a level AND a speed AND a music, but I don’t have sound support yet and speed support is not added but would be simple to do so. Also the level changing does not yet function (it should really be a slider or something, but this is a simple prototype after all). However, the option to start the game actually works.

The prototype title screen

The prototype title screen

Selecting the start game option switches to the game scene, which is the main scene that drives the actual game play. When the game is over, it switches to the game over screen:

Our simplistic game over screen

Our simplistic game over screen. “Press enter” flashes for “panache”

This should really display a menu to start over or quit, but for now it just has an implicit retry; pressing enter switches back to the game scene again. As mentioned yesterday, the game over screen invokes the render method on the game scene before rendering its own text.

This is not a lot of outward forward progress but behind the scenes I am working towards a more generalized menu scheme that I can pull out into its own class or classes for reuse; possibly into the engine itself. Currently the code is all in the title screen method, where I’m working to implement all of the features that I think it should have before I start to make it more generic and refactor it out.

Based on the proximity to Christmas and the enjoyment of festivities therein, I’m not sure how fleshed out this is actually going to get over the next couple of days. I would like to have this and possibly also the image and sound preloading into the engine before the end of Devember, though.