Build 31 Released
What’s been happening with GridWorlds lately? Another three months have passed since the last update, and while I’m not trying to do quarterly releases it seems to be happening unintentionally.
This release brings a fairly major architectural change to GridWorlds, which partially explains the delay. Since the early days I had been trying to turn this into a multi-player game, so different avatars could interact and explore the same dungeons. That’s a great idea for a big client-server game with lots of powerful servers and network bandwidth (I’m talking about you, WoW), but not so practical for a small, Web-based game like this one.
As I added new features for the next release, I noticed the game becoming slower and slower, until it no longer resembled a real-time RPG so much as a tedious turn-based game. A few tests quickly showed that even a handful of gamers playing simultaneously would bring almost any server to its knees.
Therefore, I reluctantly gave up on the idea of multi-player, and switched to a much simpler single-player implementation. While this removes some of the cool features like real-time chatting with other avatars, I think it returns to the roots of games like Ultima that I have been trying to emulate all along. Not only will this speed up game play, but it has dramatically simplified the code base. This will make it much easier to build out game features more quickly, rather than wrestling with multi-player performance issues.
Besides, single-player games can be just as much fun as multi-player! Try out this new version, and let me know if you agree.
Build 31 includes the following updates:
- Stripped out all of the multi-player code, which streamlined everything considerably
- Converted worlds into groups of maps - each world has a default map so avatars always enter the world at the same location and map editors can create separate “campaigns” (unfortunately, this forced me to wipe out any existing maps people may have already created… sorry about that)
- Modified maps to support multiple tilesets (mix and match tiles on the same map!)
- Implemented spawning of random encounters (so new monsters can appear on the map over time)
- Implemented different movement patterns for inhabitants and encounters, including wandering, approaching, and avoiding
- Added a “Look” command to view info about anything on the map
- Added an “Attack” command to kill things on the map (no real combat yet - they die instantly and don’t defend themselves)
- Added a handy “edge of the map” border line on the map editor
- Implemented a much better cross-browser JS-only player for sound effects (thank you, Zwitserloot)
- Improved drawing routines to speed up maps and eliminate flicker in Firefox
- Implemented Rails single-table inheritance for denizens to handle the distinction between inhabitants and encounters more cleanly
- Added drag-and-drop in map editor to easily move portals, messages, inhabitants, and encounters (using the very slick jQuery UI library)
- Upgraded to Rails 2.0.2 to eliminate annoying JSON bugs, convert to cookie-based sessions, and take advantage of other framework improvements
- Upgraded to jQuery 1.2.5 just for the heck of it
- Moved most of the JavaScript code under a single “grid” global variable to avoid potential namespace collisions (see Global Domination blog entry for more info)
- Tracked down a major performance issue with Safari 3 and reported it to the WebKit team: rapidly swapping out dozens of background images will quickly eat up lots of memory
- Added the bundle-fu plug-in to merge JS and CSS files into bundles for much better performance
- Numerous other small bug fixes and enhancements
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply
You must be logged in to post a comment.

