Electrotank Multiplayer Kit (Note: Discontinued)


  • Posts: 91
[UPDATE - April 15th 2012]
I'm no longer providing support for this Kit. I encourage Stencyl users who have an interest in it to stay in contact with each other on this thread and share any changes and modifications they make. It's open-source, so feel free to copy / paste / modify any code that I worked on. It's yours, not mine.

For the past several weeks I've been working on developing a multiplayer version of the RPG Town and Dialog Kit using an Electrotank socket server. I've gotten it to the point where it has basic functionality and have decided to release it. Due to the heavy dependencies in this Kit, I will not be uploading it to the Forge. You can download it here as a zip file instead.

Here is a video demonstrating the Kit in action:

What the Electrotank Kit can do at this point:

* Create a LogIn Screen – Players can type in their user name. There is no password or authentication yet.
* Select an Actor –  The available actors are displayed. More can be added easily to the Actor Selector scene by attaching an actor with only the new CharacterSelector behavior. It can be modified in Design View to keep track of game stats.
* Grid Movement – Players can use grid movement behavior that updates their location for all players to see. It tries to reduce bandwidth by only communicating when the movement key is pressed down and released, instead of constant updates. It also does error checking each time the player comes to a stop in case they have missed their target.
* Text Chat – Players can hit ENTER, type a message and hit ENTER again and it will be displayed above their actor. There is an error right now that keeps the message stationary and may keep it permanently if the speaker leave the room before it is removed.
* Other Players – Other players appear and disappear as they log in out of the server and enter and exit the scene.

To get this running a developer needs to:

* Install ES5 on their test machine or on a server – There are some YouTube tutorials on how to do this and you can get help at Electrotank's site.
* Use the ES5 SWC files – This is included with the zip file below.
* Enter the Host URL in the Electrotank LogIn behavior – The behavior's default is set to the default ES5 instillation on a local test machine. You won't have to touch this during local testing.
* Run the server as a service if on a local test machine

« Last Edit: January 14, 2014, 01:59:01 am by Jon »


  • Posts: 47
Brilliant! Thanks for the work.This is very valuable and will lead to interesting games


  • Posts: 1059
You don't deserve your title of Expert Stencyler.

Your title should be Stencyl God.
Hail The Llama
"Play the games" ~ The Grand Llama

It's my life goal to rickroll as many people as possible


  • Posts: 91
That quote is going on my resume cover letters.  ;) Thanks.


  • Posts: 213
Just... wow...

I may use this with Allfen some time.


  • Posts: 1
Pure epicness!

This is awesome! I would have never figured out how to make a kit for multiplayer let alone a multiplayer game! Great job! I'll be using this a lot! :)


  • Posts: 17
Ive changed the IP, yet it still only connects localy, Is there somthing i am doing wrong?
If i could go back and Do it Diffrently i would'nt, I wouldent be the way i am now if i did.


  • Posts: 91
There are many possible reasons why you cannot connect to a remote server (firewall, router, etc.).

You should try using the Electrotank Connect and Login example with your remote Electroserver instance. If that works, then there may be a problem with this code I'll take a look at it.



  • Posts: 65
Hello dear sir,

I have unzipped and then copied your provided folder (the one with the libraries, etc) under the games directory, but stencylworks seems to not recognize it as a game. It does not shows up when I open Stencylworks (I have the latest 1.2 updated version). 

Do you have any idea about what might be the problem?

Thanks in advance


  • Posts: 91
This will not work with iStencyl, only Stencylworks for Flash, in case that is causing the trouble.

Have you tried loading other games? You can also try redownloading the zip file in case it was corrupted.

Since other people have been able to get it running without trouble, I suspect the problem is more a general StencylWorks issue.


  • Posts: 17
=-/ Still unable to connect from outside on this, Anything that is compiled only connects to a Local host, I cant seem to get yours Running, The firewall was disabled, and has been, The routers I know i fowwarded the ports right, and after sending a .swf to somone else a million times and then having them download a server, Then it connecting to their local host, long story short what am i doing wrong?
If i could go back and Do it Diffrently i would'nt, I wouldent be the way i am now if i did.


  • Posts: 91
Which Electrotank sample applications are you successfully able to run on your remote server?


  • Posts: 65
Hey there thanks for the answer. It was probably some problem with the machine I was working at. I chenged to another puter and all went fine (a bit laggy but I'm happy to have tested successfuly). I am now studying your code and will try implementing some stuff.

I will let you know if I succeed and share any advance made with your kit.

btw, many thanks for such an advanced and well documented material!


  • Posts: 91
Great to hear you got it working! Please post your thoughts.


  • Posts: 65
Still trying to figure how movement works, to see if it solves my lag problem. I think I will have to study some more about how electroserver works, before doing anything. But thanks anyway  ;)