MUD using PHP and AJAX?
Posted: Fri Jul 31, 2009 4:01 am
This is kind of an extension of the "TCG using PHP and AJAX thread". What about making a browser-based MUD with PHP and AJAX? I am pretty familiar with MUD programming, and the 3 most difficult things to deal with in MUD programming using a traditional MUD language such as C or C++ are:
1. Threading
2. Sockets and network code
3. Clumsy and inelegant Telnet interfaces
If you used PHP and AJAX, you would basically deal with all three of these in one shot. I am still pretty new to PHP, but it appears that all threading for multiple users is done by the web server itself. That is a huge part of creating a MUD, since neither C nor C++ are built to natively thread. And while I know PHP does have some socket coding, the networking element would be incredibly streamlined when compared to C or C++ since you are working with browsers and standard internet transfer protocols. And finally, naturally, there is no Telnet, so no having to deal with Telnet.
There are many AJAX live web chat systems out there, and any of these could be used as a starting point for the client-end page, since that is really all that the Telnet terminal is as far as MUDs are concerned. Then you only need to write the game logic (which is still not small task) and connect it to built database and the AJAX chat front-end.
I have still had a lot of interest in MUDs for developing small to medium indie MMORPGs. I still think that MUDs have a place in the game world, just as books still have a place in the world of movies. MUDs actually started experiencing a decline before UO was ever released. Most people assume it was the creation of graphical MMORPGs that lead to their decline, and while I am sure it had something to do with it, a big issue was the massive re-use of existing codebases. The market became flooded with people who just got a copy of DikuMUd, SMAUG, or some other codebase, threw in some pre-built, generic areas and mobs and turned on their server. MUDs competed by room count instead of room quality, and the result was that about 99%+ of these MUD's rooms were generic rooms found is many, many other games (I can't count how many times I have gone through "MUD School" in different games). The MUD playing community was divided between a gigantic amount of generic game servers, so each game seemed quite sparsely populated.
The few MUDs who actually have created proprietary engines with all unique rooms, items, NPCs and quests have done quite well. Achaea is one notable game, which started the same year that UO was released. It regularly has over 1,000 players registered with it, and is one of the oldest microtransaction games available (this is the first big game by Matt Mihaley, who is now creating Earth Eternal). Probably one of the largest successes is Gemstone IV, which is a monthly-fee supported MUD that has over 50,000 active subscribers. The game has a $14.95 a month subscription fee. That's right. 50k players playing a text-based MUD for $14.95 a month.
Bandwidth costs are also very low for MUDs, giving either more room for profit for a commercial game, or less fees to cover for free-to-play games. And of course, there is no cost of creating art assets. This gives the design team a huge amount of freedom for creating special events and new content. Content can be created very quickly, and in some cases, can even be created without bringing down the servers by allowing "builders" to create new items, rooms and NPCs through special commands. Events can be epic and far reaching due to the ease of development. For example, in one event in Achaea, giant dragons came out of a cave (this was to mark the opening of a new cavernous area) and started attacking the cities. One of the cities was damaged badly, with building being burnt down, castles towers being knocked down and other mayhem. All this could not have been done in a graphical game for a 5-day event. Every building would have to have been re-modeled in various states of destruction, and then everything would have to have been changed again for the rebuilding. This would just not be economical in a graphical game, but in a MUD, that is just a day or two of event coding.
I think a good, creative MUD could garner at least a medium-sized community today. Having it browser-based would make it that much more accessible, too. All it takes is a creative design team to break the now stale mold of MUDs, and create something truly different than the scores of bland MUD codebases that exist today. With all unique rooms, quests and NPCs, it could definitely work. In many ways, the surging popularity of graphic MMOs has only increased the amount of people interested in MUDs. However, in today's MUD world, they simply get turned off by over-simplistic game mechanics that seem archaic compared to modern MMORPGs. But that has nothing to do with them being text-based, and has everything to do with the fact that some of these codebases have had limited updates in the last 20 years. This is particularly sad considering that MUDs can be (and at several points in time, very much have been) on the bleeding edge of MMORPG gameplay due to not having the baggage that comes with graphical games.
1. Threading
2. Sockets and network code
3. Clumsy and inelegant Telnet interfaces
If you used PHP and AJAX, you would basically deal with all three of these in one shot. I am still pretty new to PHP, but it appears that all threading for multiple users is done by the web server itself. That is a huge part of creating a MUD, since neither C nor C++ are built to natively thread. And while I know PHP does have some socket coding, the networking element would be incredibly streamlined when compared to C or C++ since you are working with browsers and standard internet transfer protocols. And finally, naturally, there is no Telnet, so no having to deal with Telnet.
There are many AJAX live web chat systems out there, and any of these could be used as a starting point for the client-end page, since that is really all that the Telnet terminal is as far as MUDs are concerned. Then you only need to write the game logic (which is still not small task) and connect it to built database and the AJAX chat front-end.
I have still had a lot of interest in MUDs for developing small to medium indie MMORPGs. I still think that MUDs have a place in the game world, just as books still have a place in the world of movies. MUDs actually started experiencing a decline before UO was ever released. Most people assume it was the creation of graphical MMORPGs that lead to their decline, and while I am sure it had something to do with it, a big issue was the massive re-use of existing codebases. The market became flooded with people who just got a copy of DikuMUd, SMAUG, or some other codebase, threw in some pre-built, generic areas and mobs and turned on their server. MUDs competed by room count instead of room quality, and the result was that about 99%+ of these MUD's rooms were generic rooms found is many, many other games (I can't count how many times I have gone through "MUD School" in different games). The MUD playing community was divided between a gigantic amount of generic game servers, so each game seemed quite sparsely populated.
The few MUDs who actually have created proprietary engines with all unique rooms, items, NPCs and quests have done quite well. Achaea is one notable game, which started the same year that UO was released. It regularly has over 1,000 players registered with it, and is one of the oldest microtransaction games available (this is the first big game by Matt Mihaley, who is now creating Earth Eternal). Probably one of the largest successes is Gemstone IV, which is a monthly-fee supported MUD that has over 50,000 active subscribers. The game has a $14.95 a month subscription fee. That's right. 50k players playing a text-based MUD for $14.95 a month.
Bandwidth costs are also very low for MUDs, giving either more room for profit for a commercial game, or less fees to cover for free-to-play games. And of course, there is no cost of creating art assets. This gives the design team a huge amount of freedom for creating special events and new content. Content can be created very quickly, and in some cases, can even be created without bringing down the servers by allowing "builders" to create new items, rooms and NPCs through special commands. Events can be epic and far reaching due to the ease of development. For example, in one event in Achaea, giant dragons came out of a cave (this was to mark the opening of a new cavernous area) and started attacking the cities. One of the cities was damaged badly, with building being burnt down, castles towers being knocked down and other mayhem. All this could not have been done in a graphical game for a 5-day event. Every building would have to have been re-modeled in various states of destruction, and then everything would have to have been changed again for the rebuilding. This would just not be economical in a graphical game, but in a MUD, that is just a day or two of event coding.
I think a good, creative MUD could garner at least a medium-sized community today. Having it browser-based would make it that much more accessible, too. All it takes is a creative design team to break the now stale mold of MUDs, and create something truly different than the scores of bland MUD codebases that exist today. With all unique rooms, quests and NPCs, it could definitely work. In many ways, the surging popularity of graphic MMOs has only increased the amount of people interested in MUDs. However, in today's MUD world, they simply get turned off by over-simplistic game mechanics that seem archaic compared to modern MMORPGs. But that has nothing to do with them being text-based, and has everything to do with the fact that some of these codebases have had limited updates in the last 20 years. This is particularly sad considering that MUDs can be (and at several points in time, very much have been) on the bleeding edge of MMORPG gameplay due to not having the baggage that comes with graphical games.