Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/izzyluuuuh/pong
Pong Game Using Lua
https://github.com/izzyluuuuh/pong
game-development love2d pong
Last synced: about 2 months ago
JSON representation
Pong Game Using Lua
- Host: GitHub
- URL: https://github.com/izzyluuuuh/pong
- Owner: izzyluuuuh
- License: mit
- Created: 2024-03-12T04:34:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-18T08:00:16.000Z (11 months ago)
- Last Synced: 2024-10-31T04:24:16.492Z (3 months ago)
- Topics: game-development, love2d, pong
- Language: Lua
- Homepage:
- Size: 147 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pong Game
Game Development## This is a remake of the classic Pong game.
The ***game*** is played between `two players`, each controlling a paddle on their side of the screen.The `goal of the game` is to hit the ball with your paddle in such a way that your opponent can't return it, causing the ball to go past their paddle and score a point.
\
The `first player to reach 10 points` **WINS** the game.The game starts in the `'start'` state, where it _displays a welcome message_.
\
When the user presses `Enter`, the game transitions to the `'serve'` state, where it waits for the **user** to press `Enter` again to _serve the ball_.In the `'play'` state, the ball is in play, bouncing between the paddles. The ball's velocity is updated based on collisions with the paddles or the screen boundaries.
\
If the ball goes past a paddle, the game scores a point for the other player and transitions to the **'serve'** state.If a **player** reaches `10 points`, the game transitions to the `'done'` state, where it _displays a victory message_.
\
The user can press `Enter` to _restart the game_.**The paddles can be moved up or down by the user using the _`'w' and 's'` keys for player 1_ and the _`'up' and 'down'` arrow keys for player 2_.**
## Run the game
### To run this code, you need to use a _Lua interpreter_ that supports the _`Love2D` game engine_.Here are the steps to run this code:
1. Install `Love2D`: You can download Love2D from [https://love2d.org/](https://love2d.org/) and install it on your computer.
2. Create a new directory and save the code in a file with a .lua extension, for example, `main.lua`.
3. Open a terminal or command prompt, navigate to the directory where you saved the file, and run the following command:```lua
love main.lua
```> [!IMPORTANT]
> ***This command will run the Love2D game engine and load your code. The game window should appear, and you can start playing the game.***.---
### Follow Me!
💙 Instagram: [@izzyluuuuh](https://www.instagram.com/izzyluuuuh/)---
![Pong Preview](https://github.com/izzyluuuuh/Pong/assets/103919666/cca6b708-2584-431b-a768-ef15a0a097a4)