https://github.com/noweh/phpong
A Pong game in PHP With Laravel Livewire and AlpineJS
https://github.com/noweh/phpong
alpinejs laravel livewire php8 pong-game
Last synced: 3 months ago
JSON representation
A Pong game in PHP With Laravel Livewire and AlpineJS
- Host: GitHub
- URL: https://github.com/noweh/phpong
- Owner: noweh
- License: mit
- Created: 2024-05-05T10:04:10.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-06T09:24:39.000Z (about 1 year ago)
- Last Synced: 2025-02-18T04:55:58.042Z (5 months ago)
- Topics: alpinejs, laravel, livewire, php8, pong-game
- Language: PHP
- Homepage:
- Size: 1.47 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHPong





[](licence.md)Source code for PHPong.

## How to play:
- Use the arrow keys to move the paddle.
- Press longer on arrow keys to move faster.
- Press the space bar to start the game.
- Press the space bar to pause the game.
10 points are awarded for each time the ball hits the paddle. The game ends when the ball hits the left wall.
A level is completed for every 20 points scored. The game will then increase in difficulty.
## BACK-END INSTALL
### Requirement
You will need to have the following installed:
- [Composer](https://getcomposer.org/)
- [PHP](https://www.php.net/)To install the back-end vendors, launch the following command:
```bash
cd project
composer install
```### .env file
The `.env` file is mandatory to set up the site. The file should be located in the root of the project.
Copy the `.env.example` file and rename it to `.env`.### Cache
To clear the cache, run the following command:
```bash
sh scripts/refresh_cache.sh
```## FRONT-END INSTALL
### Requirement
You will need to have the following installed:
- [Node.js](https://nodejs.org/en/)
- [NPM](https://www.npmjs.com/)To compile the front-end assets, launch the following command to install the dependencies:
```bash
npm run development
```
Or, for minified assets:
```bash
npm run production
```You should now see two new files within your projexts `public` folder:
- .public/css/app.min.css
- .public/js/app.min.jsTo watch for changes, run the following command:
```bash
npm run start
```