3/7/17: Start/Options Menu Development

Today I worked on planning out the design of the start screen and options menu of my texas hold em game an how they will interact with each other. From now on, I am compiling a long list of design choices that I decide to make during the development of this game. Here are the design choices I made today for the start/options menu. I will actually implement it in Python over the break.

  1. Creating a starting menu. Where to start? Well, I will be implementing an “options” menu for the user to adjust the number of players, difficulty of the opponents (if time permits), the game music’s state (on/off), color of the deck of cards, etc. So, I need to design the starting menu in such a way that you can go back and forth between the starting screen and the options menu. Here is some pseudocode that shows how I will accomplish this
Function displayStartMenu():
Initialize buttons and fonts
Running = True
While Running:
-Display the background and title (“Texas Hold ‘Em”)
-Create two rectangles representing buttons, one for “start” button and one “options” button at (a,b) and (c,d) respectively


For each event in the event queue:
If the event type is QUIT:
Exit the game
If the event type is mouse clicked:
Get the mouse position (x,y)
If (x,y) collides with (a,b):
Running = False
Else if (x,y) collides with (c,d):
Call Function displayOptionsMenu()
Continue the loop (continue command)
Start the game


Function displayOptionsMenu():
Initialize buttons, fonts, sliders, etc
Running = True
While Running:
Display background, buttons, and sliders
##insert code for difficulty/volume sliders and other buttons
For each event in the event queue
If the event type is QUIT:
Exit the game
If the event type is mouse clicked:
Get the mouse position (x,y)
If (x,y) collides with the position of the back button
Running = False
#events/code having to do with other
sliders/buttons not shown

Looking back at this blog post, the blogger changed the format of the pseudocode above, making it look like a mess, but what can you do. On another note, here is what my game background looks like so far:




Comments

Popular Posts