Skip to content

noweh/PHPong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPong

PHP Laravel Livewire Alpine.js NPM MIT Licensed

Source code for PHPong.

PHPong.jpg

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.

pause-and-play.gif

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.

move-and-collision.gif

BACK-END INSTALL

Requirement

You will need to have the following installed:

To install the back-end vendors, launch the following command:

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:

sh scripts/refresh_cache.sh

FRONT-END INSTALL

Requirement

You will need to have the following installed:

To compile the front-end assets, launch the following command to install the dependencies:

npm run development

Or, for minified assets:

npm run production

You should now see two new files within your projexts public folder:

  • .public/css/app.min.css
  • .public/js/app.min.js

To watch for changes, run the following command:

npm run start

About

A Pong game in PHP With Laravel Livewire and AlpineJS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published