500 users license
$700

Wednesday, January 30, 2008

Pig Latin?

ElectroServer's web admin interface makes it easy to set language filters, but what if we want all the public chat in a given room to be translated in some fashion?
  • Replace all words on a given list with a random string made of characters from "!@#$%^&*"
  • Expand each of the acronyms on a given list, so that "btw" becomes "by the way", etc.
  • Have a game where all chat is encrypted using a simple cipher, and an encrypted quotation is presented. First player to submit the correct decrypted quotation wins, with incorrect guesses appearing in encrypted form.
  • Have a silly room where everything anybody says is translated into Pig Latin. Eryvay illysay!
PluginPigLatin is an example extension added with ElectroServer 4.0.3. Here's how you can make your own custom translation plug-in. First, create a Java class that extends BasePlugin. Add a method to do the translation, such as String translate(String message).

Override a single method of BasePlugin:
   public ChainAction userSendPublicMessage(UserPublicMessageContext context) {
String message = context.getMessage();
String returnMessage = translate(message.trim());
context.setMessage(returnMessage);
return ChainAction.OkAndContinue;
}
Next edit (or create) the Extension.xml file to include your plugin. Copy the compiled class and new version of Extension.xml to the proper folders for ElectroServer, then reboot the server.

Finally, in the Flash client that allows the user to join a room where you want the translation plug-in to be used, add the new plug-in to the list of plug-ins for the room. Any PublicMessageRequest the user sends will be processed by userSendPublicMessage. Easy!

For more information, see the PluginPigLatin example, and the plug-in tutorial on our new wiki.

Labels: , , , ,

Sunday, January 27, 2008

Viewing an EsObject

As you probably know by now, one of the coolest ways to pass custom information between the client and the server (and server extension to server extension) is with EsObjects.

While we have been hearing great feedback from the developer community on EsObject it does make debugging a little difficult. If you are programming a Flash client and are using EsObjects in a game or other application you are undoubtedly expecting data to be structured on it in a certain way. If the data isn't there you'll get a run-time error, unless you check for each property before using it.

We just added a toString() method (available in 4.0.4 when released) on the EsObject to allow you to view the data structure at a glance to help with debugging. I can tell you from experience now that having this around for the last few days has saved me loads of time!

Here is an example EsObject and toString() output.
import com.electrotank.electroserver4.esobject.EsObject;
//
var gameMove:EsObject = new EsObject();
gameMove.setString("action", "shoot");
gameMove.setInteger("angle", 45);
gameMove.setInteger("speed", 3);
trace(gameMove);


Output:
{EsObject:
action:string = shoot
angle:int = 45
speed:int = 3
}


Here is a more complex output:
{EsObject:
action:string = saveMap
mapName:string = desert
walls:int_array =
[
32,
45,
50,
23,
89,
79
]
info:esobject = {EsObject:
createDate:string = 1/25/08
author:string = Jobe Makar
}
}

Friday, January 11, 2008

ElectroServer Games on the Wii

If you are Nintendo Wii fan then you undoubtedly know that you can browse the web with it. The Wii uses the ever-popular Opera browser. Currently this version of Opera (version 9) supports Flash Player 7 content and older.

You can develop Flash games using Flash CS3 and ActionScript 2 and set the publish settings to output to the Flash 7 player and ActionScript 2. If you make the game primarily mouse controlled then your game will likely translate to the Wii very well.

Check out this great Hot Wheels game that uses ElectroServer and is available on the Wii! Mattel is building an impressive list of Wii-ready Flash games in their Wii Games Arena.

Developing multiplayer games for the Wii using ElectroServer is just as easy as developing a mouse-based game for the PC. Users browsing from their PCs or Macs can match up against Wii gamers. Pretty much all you need to know is this:
  • Make the game mouse driven.
  • Ouput to the Flash 7 player.

Labels: ,

Monday, January 7, 2008

ElectroServer 4.0.3 Released

We have been working hard on the latest ElectroServer release - 4.0.3. You can read the full release notes here.

But here are the highlights:

  • Server restart is fully implemented through the web-based admin. Now you can fully administrate the server remotely!

  • Added the much requested Audio/Video chat example.

  • Added a very useful Audio/Video recording and playback example.

  • Vastly improved JavaDocs, ActionScript docs, and updated manual.

What did not make this release:

  • Game example. We will probably make this available before the next release via blog post or the forum.

  • Finally binary support. The server supports it, but the client hasn't been fully tested using the binary protocol yet.

Labels:

Friday, January 4, 2008

Flash Player Security Changes in FP 9,0,115,0

Adobe has just released a new update with some Flash player security changes. These changes can keep people from successfully using existing applications that load external data (applications that work with older players). Thank you Adobe.

The good news for ElectroServer 3 and ElectroServer 4 developers is that you will likely not be affected by this change. The changes in the security model take pages to explain and can be read here:
http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html

To sum it up succinctly - Policy files are always required for socket-driven applications. Since ES automatically serves up a policy file on connection, and since ES4 loads a policy file by default, then ES4 developers should be the only Flashers out there not sweating right now!

Labels: ,