Skip to content

CodeByBryant/PHP-Blast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP Blast

What Is This?

I just learned what PHP was yesterday, and naturally, my first thought was: "What if I made Block Blast entirely in PHP?"

This was a terrible idea. I did it anyway.

The Horror

This is Block Blast written in pure PHP with minimal JavaScript. Everything runs server-side. Sessions store the game state. Every click reloads the page.

Why?

Why not?

What I Learned

  • PHP is actually pretty cool for server-side stuff
  • You can make games in PHP (but maybe shouldn't)
  • Sessions are neat
  • Mixing PHP, HTML, CSS, and JavaScript in one file is chaotic
  • I now understand why modern frameworks exist

How to Run This

./start.sh

Or:

php -S 0.0.0.0:5000

Then open your browser to http://localhost:5000

Features

  • ✅ 10x10 grid
  • ✅ Hover preview
  • ✅ Score tracking
  • ✅ Game over detection
  • ✅ All in one 700+ line PHP file
  • ✅ Questionable life choices

Tech Stack

  • PHP (because I just learned it)
  • Vanilla JavaScript (like 50 lines)
  • CSS (gradient backgrounds = professional)
  • Poor decision making

What I'd Do Differently

Probably use literally any other approach. But hey, it works!

License

Do whatever you want with this. If you use it, I'm both honored and concerned.

Acknowledgments

  • PHP, for being surprisingly capable
  • My brain, for suggesting this in the first place

Made with confusion and determination 🎮

About

Block Blast in PHP. This was a horrible idea.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published