I Want to Create a Simulation-Type Game using HTML + Another Language


I’m looking to make a zombie simulation game that uses html as a canvas. Some general things I expect:

  • Select your characters that participate in that session
  • Heavy usage of arrays and storing data
  • This will be very button heavy, so I’m thinking what is the best code to create html and to use the buttons to freeze a cycle of the code until you click continue or something to that effect

I’m thinking PHP is best for this, but do you have recommendations?


And you want to play this game in the browser? Or?

If you want it to run in the browser, JS is the way to go.

PHP is a back-end language, don’t think its suitable for a game


I think i found what you are looking for:


A long time ago (god about two years now that I’m thinking on it), I made a game using Javascript and HTML with the jQuery library. It was a simple idle clicker, mostly bug-free, and horribly unbalanced

PHP is a good language to go with, however you’ll have to keep in mind that it’s strictly server-side and cannot interact with the player unless you make an AJAX request. However, you can use PHP to generate the html and receive POST information (if you plan on using input fields) from the user, which you can store in a database.

These values could be things like usernames, passwords, and player’s “stats” if such a thing exists in your game, which can be loaded as php variables with the rest of the html and then used inside of your javascript for the actual game.