Rock, Paper, Scissors

David O'Connor
CSC 471: Introduction to Computer Graphics
Zoë Wood

Introduction

Rock, Paper, Scissors is a very simple game to play and understand. It is always fun to play this nostalgic game. Especially with friends.

Goals

  • Camera Control (For Debugging Purposes Only)
  • Learning about Lighting: Phong
  • Learning about Quadrics: building, drawing, and shading
  • Implementing hierarchical modeling: Rotate, Translate, Scale
  • Incorporating similar & different hand gestures with different draws
  • Activating the Timer function at different times
  • Creating a simple C construct and compare for both hands
  • Learning about Bitmap texts and how to use them in game: Score, Game Status, Play Again
  • Controls:

    Player 1

    'q' is 'Rock'

    'w' is 'Paper'

    'e' is 'Scissors'

    Player 2

    ',' is 'Rock'

    '.' is 'Paper'

    '/' is 'Scissors'

    Design information

    Modeling

    I used the quadric library included in glut to create my hands. They were made with simple cylinders, cubes, and spheres. The reason I used spheres was because the cylinders where hollow and they didn't feel fluid until I added spheres for the joints and tips of the fingers. Each of these objects were hierarchically modeled to create my hands.

    Shading

    The Shading of my program is done in both the vertex and fragment shader. Thanks to the quadrics library, I was able to get normals from the quadric commands and implement them into the shaders in order for the light to be dynamic (ie. stay in one spot.). The colors themselves are picked by the players and are then picked from a set amount of Materials that are written in the program.

    Player Interaction

    Welcome Screen

    The beginning of the game starts in the terminal. Here you may choose how many players you want to play with, what colors you want, and how many games you want to play up to. BUT, you cannot change these choices unless you hard reset the game.

    In Game Play

    In the game, each player must choose a move. When both moves are chooses, the simulation starts. The beauty of this game is that each player does not need to commit to the move they want to play, so they have the ability to change there decision as the simulation is in motion. This in tern feels more natural since a true rock, paper, scissors game is more realistic if you play what you want at the last second. But to prevent cheating, I lock the choices of each player just before each move is revealed.

    Once the score limit has been reached. The game will end and a prompt to play again will appear. But since you cannot change the basic game functions like 'How many games', color, and 'how many players'. The game is limited to only a rematch against the same two players. If two other players want to join, they either have to accept the same game rules as the previous players or hard reset the game.

    If the players say 'yes', the game can continue from the beginning.

    References

  • OpenGL (for 3D drawing)
  • glm (for 3D math)