This is a simple character press game built using OpenGL and GLUT (OpenGL Utility Toolkit). The game involves pressing the falling characters from the alphabet before they reach the ground. Each successful press will increase your score, and you start the game with 3 lives. If a character reaches the ground without being pressed, you lose one life. The game ends when you lose all your lives.
-
Make sure you have the necessary libraries installed for OpenGL and GLUT. Then, compile the code using a C++ compiler.
-
After compiling, run the executable to start the game.
-
When you run the game, you will be prompted to enter your name. Type your name and press Enter.
-
The game will start, and characters will fall from the top of the window. Use the keyboard to press the corresponding character as it falls. Each successful press increases your score. If a character reaches the ground without being pressed, you lose one life. The game ends when you lose all your lives.
-
If the game is over, you can press the 'r' key to restart the game.
The very first thing you will see after running the game is Console screen you need to enter your name:
When you enter your name then game will start and now the thing only you need to do is to catch the characters
when its over do press the character R or r from the keyboard to restart the game.
Press the corresponding key on your keyboard to "catch" the falling characters. Press 'r' to restart the game when the game is over.
The game uses the following libraries:
- OpenGL
- GLUT (OpenGL Utility Toolkit)
To compile the game, make sure you have OpenGL and GLUT installed on your system. Then, use a C++ compiler to build the executable.
g++ -o character_press_game CharacterPressGame.cpp -lGL -lGLU -lglutg++ -o character_press_game.exe CharacterPressGame.cpp -lopengl32 -lglu32 -lglut32Shan Ayub
The game code is based on a simple falling characters game tutorial. Thanks to the tutorial creator and the open-source community for providing resources and knowledge.


