29 Mar 2010

Games Programming - Menus need love too!

First of all let me apologise to both of my followers for not posting something sooner. ;-)

Now when it comes to indie games development one of the most over-looked aspects is designing the main interface. It occurred to me that a game needs a start screen menu, probably an options menu and possibly some sub menus as well. What my latest video shows is how I have chosen to tackle this need. Menus! Wooo exciting!

Anyway, because I would like to reuse my code. I chose to create a Menu class that can take a number of buttons and their corresponding actions as arguments and draw a menu dynamically according to a size variable. This way I can re-use the same code for all the menus in this game or another I may or may not choose to make.

The video simply shows me changing the size argument and then changing the number of buttons.