Saturday, May 13, 2006

Random Map Creation

This weekend's project was a better random map generator. Last time, I just generated random points, and then for each system, went through a list of it's "neighboring" star systems, giving it a random chance to be connected to each system. That random chance declined, the more systems the first system became connected to.
random map
In the new version, I'm using an algorithm much closer to one used to generate random mazes. I generate three-dimensional points weighted towards the center (in a "Gaussian" or "Normal distribution") so that the core of the galaxy is much more dense. Then, I walk from a random star near the core outward like a tree to systems with no* star lane connections. Here's an image of a map generated by this new method. Notice the star lanes are much less tangled than the old emperor map..
The big thing left to consider is home world placement. I was previously going to add new clusters of stars to the map for each empire so I wouldn't have to risk choosing them a crappy home world, but that makes for a crappy map. This way I can lay out a nice huge galaxy, but I need to figure out my rules for home world placement...
* And by "no connections" I mean "a low number of connections" that's weighted so that a system with 0 connections has "no connections" 100% of the time, and the chance for other systems to have "no connections" falls off sharply the more connections they actually do have. Tweaking this weight allows for the average number of connections per system to go up without having systems connected to almost every other nearby system.

Saturday, May 6, 2006

Senate-like bodies in Emperor

I've been thinking about the Senate from the original Emperor, and about some of my initial questions on how to model it in Emperor 2. Originally, everyone was a member of the Galactic Senate (though Matt left the senate towards the end to join the NPC alliance called The Conclave), and I was unsure of how to handle new additions or departures.

Instead, voting bodies will be player-created. There will be no initial voting body, but two or more players may opt to form a Concord, which will allow them to hold votes amongst members, invite other players, etc. I'm debating making Alliances between players merely an advanced form of Concord, so that you could have multiple players in an Alliance that vote on actions of that Alliance, but I'm leaning towards making alliances simpler than that. (The same effect could be achieved by having all players who want to be an allied group form a Concord, and also all sign treaties of alliance with each other..)

Player-created Concords would allow for huge multi-player democratic galactic states, which makes me really really hot.

Tuesday, May 2, 2006

EVE!

So I've been sans-MMO for a while now, ever since I stopped playing WoW several months ago. Until, that is, I got back into playing EVE Online.
I have to say, I tried the 2-week trial once before, and never really got into it. But EVE is different than most MMO's.. it's got a bit of a steeper learning curve, which means it doesn't grab you right off the bat like some other MMOs do. But that initial learning curve is the cost of the beautifully rich and detailed world. I've been playing for a month now, and I am hooked.
Do any of y'all play EVE? I've formed a small corporation (like a guild, but better.. it really is an in-game corporation that can own/buy/sell things and have shares, alliances, and corporate wars) with Tom, (and fraxl's almost gotten into it..) and it totally adds a whole extra level to the gameplay. So if you play, come join us! We're usually around the Oursalert system in the Gallente Federation.

Using Jabber and XMPP in Games

This entry will be slightly technical. I give it a rating of 2 out of 5 monospaced-font stars: **

Introduction

Jabber is an XML-based communication and presence1 protocol originally created to be an open-standards instant messaging network. (Google Talk is a Jabber chat service.) Jabber was later formalized into the XMPP protocol by the IETF.
I think XMPP has a huge number of applications just waiting to be discovered, and could be used for a unified system of data communication, publishing and delivery. I also think many game developers reinvent the wheel for chat systems in online games. I see two huge applications for Jabber in game development: as an in-game chat system and as a high-level inter-server communication channel and administration control interface.

In-Game Chat and Beyond

Imagine that, as a player of an online game, you could chat easily with people not only on your own server cluster but on any server cluster for that game. Imagine that people outside the game could chat with people logged into the game. Imagine that, from your desktop IM client, you could see your in-game contact list, see who was logged into just the chat network, and who was actually logged in from inside the game. Now, imagine being a game developer and having to do very little work to implement that chat system.
Using Jabber as a chat server for an online game, the developer would merely have to use some of the XMPP libraries already available as the back-end for their in-game chat interface. Exposing this client to connections from the outside internet would allow players to log in with standard Jabber clients. Server-to-server restrictions would have to apply, of course, to cut down on chat spam and other undesirable behavior.

Server-to-Server and Administration Channel

In a server cluster, different servers need to discover each other, accept administrative commands, and report their status to each other and to the administrator. All of this is possible with XMPP (as well as the XMPP Service Discovery protocol, described in JEP-0030). Servers could register themselves with a central (internal) Jabber server when they come online, and discover all other existing servers in that cluster (as well as what types of servers they are) using service discovery. Servers would then simply implement message handlers for different types of XMPP messages, depending on what their communication needs are. Administrative commands would be handled in the exact same fashion.
1 Think of presence basically as an enumeration of possible status states for a particular entity. In instant-messaging applications, this is used as a user's status: available, away, idle, offline, etc. It seems simplistic, but the helpful thing about presence in a communication protocol is that it's event-based. If you come online, I get alerted - I don't have to continuously ask if you're around.

Monday, May 1, 2006

Social gaming, et al...

So I'm sitting here, waiting for a build to finish, and I wanted to get the following ideas out, that started brewing once I started working on Emperor again. I believe Emperor could be well-received beyond just my group of friends, if I focus more on several things, which I already see as strong points in Emperor:

Social gaming: One of the reasons WoW and other MMOs are so popular is that they're drawing on a customer base that wouldn't normally play a fantasy RPG. That customer base is made up of people who like WoW for its social nature. It's the MUD/MUSH addiction factor, but with a much lower bar for entry, because it's graphical, simple, and more rewarding with less imagination effort on the player's part. This is key. Multi-player games should be social. I'm not talking social as in "you can group up with your friends and chat in-game while you quest", I'm talking social as in "you can find and meet people and use the game as a new medium for communication".

Out-of-game information: I don't think this avenue has been fully explored, but I think it's something important, something that can hook people and/or help keep their interest in the game high. I'm talking about in-game information being available to you out-of-game, and in some cases, vice-versa. For persistent games like MMOs, or long-running games like Emperor, this has a lot of meaning. In all but the rarest of cases, players in long-running games won't be playing the game 24/7. Having some way of monitoring their in-game status when they're not playing (web pages, email or SMS notifications, etc) both provide them with information they want, and keep the game fresh in their mind.

I aim to have several event notification options in Emperor, and a couple (email and SMS for cingular phones) are already implemented. The game was very social when it was a PBEM game, and I'd like to find a way to keep that feeling, instead of making it another turn-based strategy game. This is something I'll have to ponder. Suggestions, of course, are always welcome.

Still to come: a post about using Jabber and XMPP as an inter-server RPC