Ramblings of a Flash game programmer

Archive for the ‘multiplayer’ Category

Creating a chat in Flash is easy using ElectroServer and MXML. If you are interested in creating multiplayer games, then first creating a simple chat application can help you learn the basic API calls used to communicate with ElectroServer. After building something like this you will have enough confidence to take the next step toward making a multilayer game!

After many months of hard work by the team at Electrotank, I’m pleased to say that ElectroServer 5 (ES5) is out the door and ready to power tons of new multiplayer games and MMOs! It is available now for download and comes with a free 25 concurrent user license (with no other restrictions). In addition to the great new features with the 5.0 release, we have a ton of additional features that we’ll be adding and releasing over time.

Over ElectroServer’s 8+ year life it has primarily been used for Flash applications. We’ve now introduced APIs across several languages keeping them as similar as possible. You can now have players play against each other across a multitude of platforms. The supported languages and platforms are,

AS2 and AS3 – Flash, AIR

C# – Unity3D, .Net, and XNA

Objective-C – iOS

Java – for any Java enabled client

UDP

For the fastest and most light weight message transfer, ElectroServer 5 provides the option for UDP messaging. UDP is needed for first-person shooters and racing games.

Message encryption is just one extremely effective means in which ES5 secures client-server communications. ES5 also supports cryptographically hashing passwords used to log onto the system.

Full-featured Sleek Admin

ElectroServer’s admin tool has been completely revamped to be more user-friendly (and attractive!). With it you can configure every aspect of the server. In addition, there are new reporting features built right in. You can view and configure graphs showing up-time, bandwidth usage, CPU usage, and more. There is also the ability to browse snapshots of the server to inspect which rooms exists and who is in them.

Extensive Documentation & Tons of Examples

We invested a lot of time in creating thorough documentation for every server feature. There are tutorials and more than 30 examples! ES5 also comes with a handful of complete multiplayer games.

Screenshot of ES5 game example

Screenshot of Es5 game example

I hope to post more on ES5 and multiplayer game development in the near future.

If you use sockets in Flash for games, virtual worlds, or streaming video you can run into a nasty problem in IE7. The open socket will not close until the entire browser is closed. Closing a tab or refreshing the page won’t do it. Luckily IE8 has been out for a while and fixes this. (Though, according to w3schools ~16% users are using IE7 and ~14% are using IE6 at the time of this post.)

The behavior that we had to deal with in our multiplayer applications is what would be viewed as ‘stuck users’. Someone comes to a game and logs in with their account information. The socket server knows that the user is logged in and allows him to chat and play games. The user refreshes the page for whatever reason, or browses away and comes back, and the socket doesn’t die. When the user comes back and tries to login via Flash it fails because the server believes the users is already logged in.

We worked around it by having the server force close the first socket if the same user tried to login a 2nd time.

I recently finished writing ActionScript for Multiplayer Games and Virtual Worlds, my first book since Flash 8! With the help of some amazing contributors I think this is the most useful and geeky-fun book I’ve ever been a part of. According to Amazon (shameless link) it hits shelves in 8/3/2009.

So what’s it about? If the title of the book doesn’t give it away, it is a book that focuses on multiplayer concepts and applies them to games and virtual worlds via ActionScript. Some of the coolest topics are those on dead reckoning, real-time movement and time synchronization, loads of information on avatar rendering, and other useful topics like thorough coverage of isometric concepts.

While there are many examples throughout the book, there are 3 major examples. In one chapter we build a real-time multiplayer tank game (top down). In another chapter a cooperative multiplayer games is created, and its a fun one! Then over the course of several chapters we dig into various major topics on virtual worlds to build a complete world.

Here are some screenshots, and I hope some of you check it out and find it useful 🙂

We just wrapped up another crazy week on the road. This week we attended the Flashforward conference in Boston to catch some amazing sessions and to present ElectroServer 4, our Flash streaming media and MMO server. Thanks to the attendees for the tremendous interest. It is always great to hear what innovative applications everyone is working on!

More than a year ago we started working on version 4 of our socket-server product called ElectroServer. To truly evolve ElectroServer we went back to the drawing board and spared no expense to do everything right.

I am proud to say that ElectroServer 4 has been load tested to 200,000 simultaneous users! And it supports streaming Video & Audio! ElectroServer is used by one of the largest MMOGs online, Webkinz World. It is also used to power games for VH1, Comedy Central, and Mattel.

Today we made our first official public announcement of ElectroServer 4 on the site. Check out our streaming demo (Night of the Living Dead) and real-time tank battle demo on our site.VideoReal-time Tank Battle

I’ll be blogging countless entries on multiplayer programming techniques. It has been hard to *not* post on multiplayer concepts up till now. Consider the flood gates open…well, a little open. They’ll finish opening upon our release in September.

As some of you may know, my company Electrotank sells a very popular multiplayer server called ElectroServer. Mattel has been using ElectroServer for a year or two now to power their Barbie Chat and Rebellion Racer, a real-time racing game.

Today they released a new fun and addictive multiplayer card game called Finish Line Card Race (programmed by Alan Donnelly of Mattel). Players control their cars by playing cards to try to get to the finish line first. The terrain can change based on a card that is played, and cards played move your car based on the current terrain and the value of the card. It is a simple and fun game.