So, the space shooter game lost my interest pretty fast. It was a cool idea, but really, my favorite projects have been browser based RPGs. So, I decided to start work on UberQuezt 3. It all started with an experiment to see if I could make a simultaneous multiplayer turn based game. By using a mix of jQuery, AJAX, PHP, and MySQL, I was able to generate game sessions in a database which each user would ping every 10 seconds via an AJAX call on an interval. It then checks the database if both players have submitted their commands, then runs the results in a PHP script as to prevent hacking/cheating. Then on the next ping, it returns the data from the PHP function and displays the results for the users. Right now, it feels a little loose, but there are probably some things I could do to make it run smoother.

For instance, occasionally, the AJAX call for entering commands will get hung up and the commands will not get saved. To solve that, I will try to add some data to return from PHP on success, so if it hasn’t gotten that data back once the next ping happens, it will report the error. Another occasional error is that even though the results will come in and show up in the console log, they will not play out for the user. This one is a little more perplexing, and I may just need to figure out which exact event is messing it up.

Comments are closed.