I declared success late last night on my 7DRL entry OL Rogue. Published what I got. I accomplished most of what I set out to do. You can save your game. The saved data gets put into the MySQL database on my web host. While that sounds simple, I had to do a lot for that to happen.
During my coding of the game save feature, I learned a number of things. One is that the mysql_query function in PHP can return one of two types. Specifically it might return the value FALSE on error. Didn't see that coming. I should have. It is in the documentation.
The other realization was that my PHP code should handle everything. Previously I thought I would bounce the user from PHP script to PHP script. However PHP is controlling the whole show for my game delivery. So I rolled most of the intermediate PHP pages into one super smart page.
In the future I want to be able to save more of the user's game state to a database. That includes the location you are in the dungeon, the position and hit points of the monsters in the dungeon, and other stats regarding equipment/items.
Free Laundry
-
Apparently a lot of apartment buildings have coin operated laundry machines
in the basement. And guess what? You can order a key to unlock the payment
me...
5 years ago
No comments:
Post a Comment