Simple enough that apparently ...No, I haven't written any documentation on how the engine works, it's actually pretty simple though.have you written any documentation on how the engine works?
..you managed to accidentally write some. Here it is for Posterity.(Wow, that ended up being a longer post than I expected.)
There's very little passed around in the URL (which is intentional), basically there's always p (player id), z (zone id), and usually a (action), t is (as you guessed) to work around caching, it's set to the timestamp if it's unset, or incremented otherwise. I also set the cache headers, but some clients didn't obey them (I don't recall which now). There's a few cases where there's more in the URL, like the Swap Shop if you're putting something up, similar for the Market and when you're selling multiple items from your inventory. The a variable tends to get overloaded quite a bit, for example, in the Inventory there's a=17 (equip item 17) a=-17 (sell item 17) a=u17 (use/eat item 17) a=es17 (equip set 17) a=rs17 (remove set 17) and so on.
Based on the zone id, one of the zone handlers is called, for friendly (non-monster) zones, there's a special handler for each one, whereas for monster zones there's only a single handler which pulls the relevant monster information from the database and places a monster. In both cases the handler both handles any input for that zone and outputs the zone content. This is nice because it keeps everything for a particular zone together.
As for compatibility, yes, it'll work in just about any semi-modern browser, plus IE6 (which is neither semi-modern nor a browser, it is an abomination). Even the Wii can play it quite well. The primary limiting factor is screen resolution (and text size), but it should shrink and expand to different resolutions pretty well, you just need to shrink your fonts at smaller resolutions.
Quests are just a row in the database that states the required level, a description of the quest, a description for when you finish the quest, the type of the quest and two integer arguments which get passed to the Quest Master zone handler. There's another table for the quest rewards that stores the quest id, reward type and reward quantity. As for the actual meat of the quest, that's not linked to the quest system per se. For example, the first quest where you get 5 Cans of Spam from the Master Spammers doesn't have any knowledge of where the Master Spammers are or that they drop Cans of Spam, it just knows what's required to consider it complete, there's hints about how to complete the quest in the quest description, which is done manually.
On the Proposition of User Generated Content
So as for having end users making quests, that part is actually pretty simple, there's quite a bit of plumbing around the quest (possibly adding new items, new monsters, new zones, new combinations... etc) which is quite a bit more work than adding the quest, but still not too bad. Initially I just used phpMyAdmin to update the database directly, though since I've added a (relatively crude, because only I use it) admin interface.
However, the main problem is that nobody wants to play a game that's too easy or too hard (at least for more than 5 minutes), and keeping Game! balanced isn't exceptionally easy. Initially I planned out the level progression, the min/max/expected character stats at each level, the expected total amount of gold collected at each level, etc, so that I could plan monster strengths and spell/skill costs in a relatively balanced manner. However, adding new stuff (there actually wasn't any spells or skills initially, for one thing) can throw this for a loop. Also, there's the matter of how long battles take, which is something I didn't account for initially. At higher levels, Fighters used to take a lot of attacks to kill a monster (a dozen or more, but they didn't take a lot of damage each turn, either), which is kinda boring and repetitive, so I added a few passive spells for Fighters that increase their attack and lower their defense, overall making them stronger, but more importantly, speeding up battles tremendously.
The other problem with user generated content... is that you need a lot of users! To put that in perspective, have a look at the posts:views ratio on these forums, you'll notice that there's typically between 10 and 100 views per post, and experience shows that that's a pretty typical ratio of active:passive users. So, if you think about that for a moment, you'll realize that you probably need a very bare minimum of something like 50 concurrent users to actually have forums like these be self sustaining. Game! does have a number of "user generated content" areas, like the Market, the Swap Shop, the Tavern, the Campground, and the forums, but actually getting them to be self sustaining (going from 0 => 50 users) is tricky. Though, the most vexing part about going from 0 => 50 users is that you basically have to go straight from 0 to 50 users, as people usually don't stick around otherwise.
Right now Game! typically has between 10-20 distinct users playing each day which definitely isn't enough to make the forums self-sustaining, for example. The Market has been doing pretty well since the introduction of Bargain Hunter, but that sort of thing isn't as easy to do for the Swap Shop, the Tavern or the forums. So as of late, I've been trying to drum up more interest in Game! via more users (hence this thread). People have proposed a few features in the past that would involve realtime collaboration between a few players, which isn't that hard to do technically, but isn't feasible with a low number of users, because it's pretty rare that they'll both be online at the same time.
So yes and no... I agree that there's (many) more ways to integrated user generated content that I haven't implemented yet, but I'm skeptical of their utility barring a large boost in the active user count.
A very interesting read. It definitely got me thinking. I've managed to use up my stamina playing the last few days and I've been thinking about the game (from a technical aspect, of course, as I do always) and considering how it works and how it ought to work. I just might have enough half-ideas at this point to justify a bit of typing on my part.
I am interested to know more about what other players are doing in the game, and I think the other players might be too. For a multi-user online game, it's not too terribly apparent that there are more real users out there. For example, at the tavern (an good idea, btw) I haven't run into anyone, but I also have no reason to stay. Bow, when I was young all my friends and I hung out at the coffeehouse. Any given day, a handful of us would be guaranteed to stop in. Sometimes our paths crossed; sometimes the didn't. But in either case, it was a sort of 'check-in' place. People would stop in to see what was going on.
To encourage that sort of behavior, I recommend adding a piece or two of code that collects and presents information about how many people have stopped into the tavern and when the last one was there. You could reset the counts each day when stamina was renewed. (If you collect the right two or three pieces of data, you can probably keep track of things like: how many people had stopped in; what the average number of visitors was; and even what percentage of players stop in or the average days between visits, something like that.
the wise sage could display many stats if a little data gets updated during the appropriate routines. For example: While returning stamina to 100% at midnight, why not calculate the difference between the player's current stamina and 100, and add it to a running total of stamina used?
You could also potentially calculate a % of stamina used - but it'd be important to start with the date of implementation rather than character creation date). This would give a decent metric for most committed players in the game, which would be interesting to see at the Wise Sage.
I certainly encourage you to consider adding a wise sage section that shows 'most active' and 'most slothful' users, ranked by % stamina used since the more recent of character creation or implementation of stamina statistics collection . This gives committed players a chance to show up as noteworthy characters regardless of experience level, which in turn gives them a chance to be listed publicly. (in turn, everyone who abandons characters will have their characters turn up as 'most slothful').
Sounds like a pretty easy feature, and I bet people would really get a kick out of it. Comparisons between players takes the games in the direction of 'online communities' which can interact with themselves enough to sustain interest.
I like that it has the count of players, but I think you should put it at the top so that everyone reads it. It's easy to miss way down there at the bottom. I also think you should count, while you're counting players, all players that have used any of their stamina (a pretty simple query modification) so that you can show how many characters have taken action so far today.
There are many other options, of course, and if you need somebody to help code in the stats generation, you should let me know. These modifications are pretty easy to make and don't require much thinking, and totally avoid the problem of balancing things out.
Could you show more information about a player on the 'leader boards'? Could you make their personal stats, current equipment, pets ... things like that? The inventory items all have fun little drop-downs that show such things. How difficult would it be to add something like that to the users?
If such a thing were to exist, you could let users upload their own avatar images. I for one want to draw a poorly rendered image of _my_ character, just like those of my enemies! That would require an upload
mechanism, but something like that could be built in relative short order.
Speaking of greater information, I don't have a lot of experience (because rux didnt' give me any pets prematurely, like I asked him) but i have a ghost now, and I can't see anything about it. I wish that I could see it's stats or something. I don't know what exactly it does, whether it increases my fighting abilities or what, but having it with me has no apparent results other than it slowly deriving experience from thE setting in the 'pets' menu that brings it with me.
I wish pets were a bigger part of the action. In some games, NPCs in the party are able to take actions like attacking and defending just like the player - as you are no doubt aware. Of course, you are also probably aware that this would be a lot of work to implement.
Well, I think that's about enough rambling for now. I hope it gets your mind going, and that this thread can become a more technical features request page.
I wish to end the post with an offer of a little bit of programming assistance. I do LAMP work semi-professionally and would love to dig through the code, glance at your to-do list, maybe get a few items checked off. You should consider giving me a read-only FTP account or something.
In conclusion, good work on the game, I love what you've done with it, and I look forward to using up my stamina points again today, maybe even reaching level 10 if I don't die too much : ).