500 users license
$700
|
Using ES4 to Protect Your Code
It is widely known that if something can be downloaded to a client machine, then it is hackable. Someone who is dedicated enough can rip apart the file and do things like: - Decompile the application to get at the code.
- Modify the code and recompile.
- Steal the code.
- The person can just extract assets such as images and audio.
There is nothing you can do to guarantee the protection of your file. But you can take measures to make it very difficult for people to mess with. For instance, obfuscating code makes code unreadable. With ES4 there is something else that you can do to help protect your client-side Flash application. ES4 fully supports a true binary protocol. ByteArrays can be exchanged between the client and the server. Any binary file can be represented in a ByteArray. The idea is very simple. - Put the important SWF somewhere non-web-accessible, but where ElectroServer can get at it.
- Have another Flash client (one whose code you can stand to lose) connect to ES4.
- This client then requests the SWF file from ES4. The SWF is streamed to the Flash client over binary socket as a ByteArray.
- When the load has completed, the Flash client uses the Loader.loadBytes() technique (see Flash help) to convert the bytes to an actual MovieClip.
So what does this buy you? Well, now it is is substantially more difficult for someone to grab the SWF file that you are trying to protect. This is just another layer of security. A person can still intercept the client-bound stream using some other tool and, if they understand the complex ES4 protocol, they can extract the specific SWF bytes. Obviously you can add another layer of security in here by encrypting the byte stream so that anyone just grabbing the bytes still can't do anything with them, short of knowing encryption information. Labels: flash, security
Hallmark builds Virtual World with Electrotank
Easter has pasted and HallmarkPark is starting to see more traffic. Couple weeks ago Hallmark released their first virtual world with the help from the Electrotank team, ElectroServer 4, and Electrotank Universe Platform (EUP) technologies. We are still working out some things but what we have accomplished is quite amazing, delivering a project of this magnitude in couple months. Create a character, get rare items, and play games with other players. Who knows you may make some new friends along the way. Check it out HallmarkPark-Robert Labels: flash, game
ElectroServer 4.0.4 Released!
We have been working hard on some great new features and are pleased to announce the release of ElectroServer 4.0.4! True Binary SupportElectroServer has had binary support since 4.0.0 but the client-side API didn't have it fully implemented. Now the ActionScript 3 client-side API fully supports the binary protocol giving game developers super high performance messaging! When we say true binary support we mean true binary support. Our protocol reads and writes directly from a ByteArray utilizing all appropriate data types. (We have seen how some servers actually send a huge XML string over the binary socket wrapping their overly bloated string protocol which will actually decrease performance while buying you nothing.) So what is so cool about binary? Stay-tuned for some future blog posts on this subject, but here are a few things to get you interested: - Lowest impact messaging possible in Flash. Smallest message sizes with shorter parsing times.
- The ability to send/receive binary data. You can send screen data as a private message from one user to another, or to the server to be saved, or...[insert idea here].
- Unique security ideas (future blog post plug)
To use the new binary protocol you need to have the ActionScript 3 client-side API. It won't work with ActionScript 2 because ActionScript 2 doesn't support binary socket or ByteArrays. To enable the binary protocol in a Flash client you do the following: - Import this: com.electrotank.electroserver4.entities.Protocol
- Add this line of code before creating a connection: ElectroServer.PROTOCOL = Protocol.BINARY;
- You'll also need to add a new gateway listener for binary, or modify the existing text listener for binary. (See the 'Gateways' button at the top of the web-based admin). Restart ES4 to take effect.
That's it! Nothing else changes. But now you can use the setByte/getByte and setByteArray/getByteArray methods of the EsObject in very interesting and useful ways. EsObject Additions EsObject is used all throughout ElectroServer to carry custom data between client and server, client and client, and between server extensions. While incredibly useful it is a little tough to debug sometimes. So on the ActionScript 2 and ActionScript 3 APIs we added an EsObject.toString() method that allows you to easily view the contents of the EsObject. See this post for more information. On the server-side of things some added validation has been added to EsObject. This will ensure that you don't accidentally set null values on it. In 4.0.5 expect a server-side EsObject.toString() method as well. There were some other interesting additions to this release that we'll talk about in future posts!
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: plug-in, plugin, translate, translation, transmogrification
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 } }
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: flash, game
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: update
|
|