As the title says im working on an MMO style game and have only just started using impactjs. I am knowledgeable in php and MySQL but dont know how to connect to q MySQL db using impact.
What is the best way you guys have found to store player information such as level, items, abilities etc while working with impact games so that next time the player logs in he/she can continue from where they left.
1 decade ago
You can store data for the player in two ways:
1. LocalStorage - an html5 feature. This stores data locally on the users machine.
2. Server w/ most likely a Database.
For an MMO you will want to use #2.
In order to do that with PHP/mySQL you will most likely use AJAX. So you will set up your server to accept AJAX requests and return information dynamically. Using jQuery will be helpful here.
The other issue to consider is that with an MMO you will have multiple players on your server. So as people connect asynchronously with AJAX, you will still have to read/write from the DB with php\mySQL.
Doing so will cause blocking, which will slow down the server, which will slow down the game for player as they wait on that data.
While you can certanly make your game with PHP/MySQL I would look into NodeJS. I say this a full time PHP\MySQL developer.
Hope that helps.
I'd have to agree with jswart here. I followed this tutorial series to get node.js setup and working:
the author of these tutorials plans on going through all the steps necessary to make a impact js mmo type game
Page 1 of 1