__________________________________________________________________________________________________________________________
Project Overview
The Space Slot Machine Simulator is a spaced themed slot machine. The code is written in C++ using the OpenGL and GLUT libraries.
There are three modes that can be accessed with keyboard calls: ‘P’ to Play Slots, ‘S’ to go to the Space Store, and ‘T’ to go to the Token Machine. Additionally, there is a purse display at the bottom of the screen to indicate the number of tokens and tickets the user has.
DOWNLOADS:
__________________________________________________________________________________________________________________________
Game: Rules
You can bet 1 or 5 token. The rules for winning is as follows:
Two of a kind: +Tickets x tokens betted
Three of a kind: +2 Tickets x tokens betted, +2 Tokens x tokens betted
5 Tickets: You win a Golden Bouncy Ball
< 5 Tickets: You are a loser :(
__________________________________________________________________________________________________________________________
Mode: Play Slots
This mode allows the user to play a slot machine game. The graphics components are drawn using hierarchical modeling.
Graphics Components:
Bet Buttons
The user is allowed to bet 1 token or 5 tokens by clicking on the bet buttons. The slot machine will simulate one play when the bet button is pushed.
The bet buttons are made of a glut Sphere and a texture wrapped around it. The picking will implement calls to check if there is enough tokens to make the bet. If there are enough tokens, the purse will update to indicate the token change.
Handle
The handle allows the user to make one play of the slot machine using the previous bet value. The handle performs an animation as if it were pulled down. The handle is made of a cylinder and sphere using hierarchical modeling. The material used is a turquoise color.
Slots
The slots rotate about a vector in the x-direction. The animation is sequenced so that the first slot stops first, then the second, and then the third. The slots have a texture map and a random generator decides on the results of the slots. Slot angles are used to make each slot stop at the appropriate picture.
Marquee
The marquee is a glut cylinder that has textures with messages. A particular message is shown when an action (a bet is made, the user wins, etc.) occurs.
Tickets
When a play is simulated, the program calculates how many tickets the user wins. The animation is sequenced so that the tickets appear in the purse after the play is finished. The tickets are rectangles with a texture mapped on it.
Tokens
When a bet is made or a play begins, the number of tokens is updated in the purse. The token is a cylinder with a polished gold material and a texture mapped on it.
Other Graphics Concepts:
Lighting
A point light source is used to light the screen. Because the setting is in space, the lighting is dimmer.
Texture Mapping:
There is a total of 17 different images used to bind textures on objects in this program. Each of the images are custom made to match the objects. The clip art used were found on Apple Works clip art libraries.
__________________________________________________________________________________________________________________________
Additional Modes
Token Machine:
The token machine is access by pressing the ‘T’ button on the keyboard. The token machine allows the user to input $1, $2, or $5 to get additional tokens. Each token is worth $1 (rip off!). Since the purse is small, the user is allowed only 10 tokens at a time.
Space Store:
The space store shows what the user has won with the tickets won by playing the slot machine. If you have less than 5 tickets, you are a loser.
If you win 5 or more tickets, you win a Golden Bouncy Ball.