A barebones MMO

My econ-sim project has been dormant now for about three years, but I’ve had a sudden urge to continue development. I had originally considered using third-party MMO middleware to allow a multiplayer version, where human agents did most of the work and AI took a backseat. The few I looked at didn’t offer all features I wanted, though (such as persistent destruction and construction), and so I abandoned that path. This weekend I started again, from scratch. I learned socket programming, which I had never used before. I learned SDL 2.0, which was easy enough given my familiarity with SDL 1.2. I made some sacrifices—modularity, hardcoding, prettiness, user-friendliness—at the altar of prototyping time, and I am now cleaning them all up. The result was a mininmally functional MMO:

  • The server can connect to and maintain information about multiple clients
  • Client information is identified by raw Winsock SOCKET handles
  • Clients can send ‘move’ requests which are handled by the server, and the new location is sent to all clients
  • Each client can send a message to the server
  • The server can send a message to a single client, or broadcast one to all clients

Server and clients To use:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: