Hi BenderB,
Which AS class version are you using? AS 1 for Flash MX or AS 2.0 for Flash MX 2004?
Thanks
Printable View
Hi BenderB,
Which AS class version are you using? AS 1 for Flash MX or AS 2.0 for Flash MX 2004?
Thanks
I'm using AS1 for Flash MX.
Thanks
BenderB.
Hi BenderB,
Thanks for finding that. I have just verified that it is indeed an ElectroServer 3 bug. It appears that it will only removed the most recently created room variable by that user.
FYI: Tomorrow I am going off for a 5 day locking-ourselves-in-a-room real-time multiplayer game design session. During that time we will be hammering the crap out of ElectroServer 3 and producing the latest build (which already has tons of minor fixes/enhancements).
I'll post something here when we release it.
No problem Jobe ;)!
Thanks for your help,
BenderB.
Hi Jobe!
Just a quick question:
When I began to work with ES3 I tried around with sending arrays attached to objects like this:
code:
var ob = new Object();
ob.test = new Array();
//fill Array
es.pluginRequest("PlugIn", "test", ob);
But it doesn't seem to work this way so I worked around the parts where I could have used an array to send stuff.
I just wanted to know if it is really imposible to send arrays and if not how can you send them??
Thanks,
BenderB
P.S.:
Hope you have fun at your "5 day locking-yourselves-in-a-room real-time multiplayer game design session" :D
Hi BenderB,
The sending of objects back and forth is 100% supported between clients. So if you and I are in a game I could send you arrays and objects and stuff.
The way that works is that the object is serialized in to XML, the XML is sent, and then on the other side the client deserializes it back into objects.
With ActionScript plug-ins we are restricted pretty much to what JavaScript can do. JavaScript has no native XML support, therefore we cannot use the same object serializatin.
So the short answer is that "no", we dont support sending arrays to plugins at this time. However, you can send variables. For instance, this function is contained in the 'simple plugin' example file installed with ElectroServer 3:
We are sending all variables found on the object. They can only be variables.Code:function askThePluginAQuestion() {
var ob = new Object();
ob.iterations = iterations;
es.pluginRequest("SimpleActionScriptPlugin", "Calculate", ob);
}
In the future we may add a differet type of serialization for this purpose. But in the mean time, you'll have to probably just send your arrays as a string with some delimiter and reconstruct on the other side. I'm sorry :(
Ah right, between clients the transmittion of arrays works.
Must be messing around with the plugins for to long...:)
It's not really a problem anyway but I just thought if there was a way to transmit arrays to the plugins I could clean up the code a bit.
thanks,
BenderB.
yeah, I agree that it would be nice to have that ability. But the thing is that we are trying to use the same API for both ActionScript plugins and Java plugins. I do have an idea of how to make it work, but wont have the time any time soon to impliment it.
Good luck!
okidoki :)
...and another quick question:
I thought that if I have a plugin at room level it is instantiated when the room is created and deleted when the room is destroyed.
But I have some trace() commands which are called with a setInterval and they keep displaying after all players have left the room??
thanks,
BenderB
BenderB,
That is a very good question. Yes, plug-ins *are* removed when the room is destroyed. However, to get setInterval to work we had to create server threads which callback to the plug-in. When the plug-in is removed the setInterval's are not.
So if a plugin is removed without removing the setIntervals, then that is a memory leak. There is like an onPluginDestroy event in the plugin (check docs). When that event is fired you must manually clear all setIntervals.
Thanks, but I'm dealing with another problem now:
I looked through the examples which came with my electroserver installation and didn't find an example which uses the pluginDestroy() event.
Then I downloaded electroserver again from your website to see if there was a newer version and indeed the version I downloaded differs from my current installation.
There is also a java plugin example in the newer package and I found the pluginDestroy() event there.
So I tried to use it in my old installation but I doesn't seem to fire.
I then configured the newer version and now the event gets fired...but now the client can't extract the variables I send to them via:code:
server.sendMessage("public", action, ob);
Until now I extracted the variables via:code:
function pluginMessageReceived(plugin, action, variables) {
var test = variables.test;
}
when I had a function like this on the server:
code:
function blablabla{
var ob = new Object();
ob.test = 10;
var action = "test";
server.sendMessage("public", action, ob);
}
But it doesn't work this way with the newer version as I get an empty variables object on the client side.
I looked through the examples but the only example which deals with this is the SimpleActionScriptPlugin.as which doesn't work eigther.
I configured the plugin and it loads and the moves are calculated and returned but I can't extract the variables sent the way I used to on the client side...:confused:
Any idea?
Thanks,
BenderB
Crap. Thanks for finding that. You are using features that not many people other than ourselves are using yet :)
Anyway, my latest class files have that issue fixed. Please give me your email address and I'll send you the latest class where it works. We had to change how the vars are passed around little bit. It should't change what you are doing.
[email protected]
I sent you an email...
Did you send it to [email protected]? I dont see it.
...and here I am again.
Could it be that the files you sent me are for flash MX 2004?
Because I get an unexpected file format error when I try to open the fla...:confused:
Its Flash 6 but saved as an mx 2004 FLA.
Just use your old FLA, but use the new class files I sent. And changed the pluginMessageReceived function to this:
Code:function pluginMessageReceived(plugin, action, variables) {
trace("+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=");
trace("Received message from "+plugin);
trace("Action = "+action)
trace("---vars in variables object---")
for (var i in variables) {
trace(i+"="+variables[i]);
trace(variables[i])
}
results2 = action+" ms";
}
It works!
Thanks for your efforts Jobe!
...one more time.
Jobe:
Alright, we finished our game (more or less as we had to finish it for our presentation)!
The only major drawback we encountered was that it runs too slow for the internet (but very nice in a LAN).
Maybe if I had had more time (we finished the game 5 hours before the presentation...) I could have rewrote a few parts to speed up some things...
Anyway all in all I'm proud that we made it as before this project I had no idea how much work a realtime multiplayer game could be...
So why do I post here?
I wanted to thank you one last time for the great help you offered without I wouldn't have come very far!
It's amazing how much I learned in that little time from your suggestions.
And to all the unsure people out there I can only suggest to use Electro Server!
Many, many thanks,
BenderB
Hi BenderB,
I'm glad things worked out for you :)
I am happy to discuss any concepts further if you want to.
Hi BenderB,
I have been talking about the next dot release of ElectroServer for a while, but we finally got it packaged up and online! You can now download ElectroServer 3.2. Every instability issue that we know about has been fixed. There are tons of ActionScript class fixes as well. All of the user variable stuff is working now.
http://www.electrotank.com/ElectroServer/downloads.aspx
These are indeed good news!
I'll check it out when I'll have more time on my hands(I should learn for one of my final exams right now instead of hanging around at flashkit...:().
And thanks for the kind words!
BenderB
Does anybody know what the requeirements are hardware vice for an ElectroTank Server?
I am not talking about minimum specifications, but, which things you should take into consideration when getting the optimal system...
Is it dual (quad) cpu?
Fast hardrives?
Huge amount of ram?
Or?
Regards
Mads
Hi M@dster,
If you are a typical user of ElectroServer then you should expect moderate numbers of users connectd at once. Probably in the range of 20 to 200. For such a small number of connections ElectroServer will run perfectly with just a simple server.
If you are going to support thousands of users simultaneously then you need to start thinking about this. ElectroServer doesn't eat much RAM, but a better processor should certainly help if you are pushing thousands of users.
ElectroServer doesn't hvae any OS preference sinces its Java.
FYI: We run ElectroServer 3, well several instances of it, on our dedicated server. Its a P3 Win2k, so nothing great, but the server CPU usage is still very low.
im getting my mums pentium computer with 32 mb ram. i hope it will run there... :rolleyes:
A 'new' multi user server will be released open source in a few. It's the 2iceMP server, based on Perl. It features already multi player games plug-ins, such as othello, connect4, tetris, and more. Small requirements for the server it is running on. The server is around since 2 years now and has grown quite since; You can check it live at: http://www.ventoline.com.
Any of you interested ?
Sure :)Quote:
Originally posted by Hasufel
A 'new' multi user server will be released open source in a few. It's the 2iceMP server, based on Perl. It features already multi player games plug-ins, such as othello, connect4, tetris, and more. Small requirements for the server it is running on. The server is around since 2 years now and has grown quite since; You can check it live at: http://www.ventoline.com.
Any of you interested ?
When can I get it?
Early March, Tonypa. Glad meeting you, btw :)
I'm very interested.. Is this socket or http based? Does it work around firewalls? I'm looking for a chat solution that could support private rooms, and will be able to go around firewalls for my game. Thanks!Quote:
Originally posted by Hasufel
A 'new' multi user server will be released open source in a few. It's the 2iceMP server, based on Perl. It features already multi player games plug-ins, such as othello, connect4, tetris, and more. Small requirements for the server it is running on. The server is around since 2 years now and has grown quite since; You can check it live at: http://www.ventoline.com.
Any of you interested ?
- Mike
yesQuote:
Originally posted by Hasufel
A 'new' multi user server will be released open source in a few. It's the 2iceMP server, based on Perl. It features already multi player games plug-ins, such as othello, connect4, tetris, and more. Small requirements for the server it is running on. The server is around since 2 years now and has grown quite since; You can check it live at: http://www.ventoline.com.
Any of you interested ?
thats from me from this thread http://www.flashkit.com/board/showth...hreadid=536346. jobe or michael know why this happens whenever i try to export my chat (and your free files too!)???Quote:
ok, i dont understand this. i have the 'tic-tac-toe' file (from electroserver) in the exact same directory as what i have my chat in rite. whenever i go to export my chat file it comes up with that stupid message
C:\Leighton\Flash\Chat\as_files\ElectroServerAS3.a s: Line 1: ';' expected
// =~=+=~=+=~=+=~=+=~=+=~=+=~=+=~=+=~=+=~=+=~=+=~=+=~
=+=~=+=~=+=~=+
so i thought to myself, what if i tried to export the tic-tac-toe file. guess what, the same message pops up and i havnt changed a thing with that file!!! but if i just drag (from where i downloaded it) into that directory (same file as the one in there b4) it works! any ideas why???
edit: and if i do put that semi-colon on the #include line, this message pops up:
Scene=Scene 1, Layer=actions, Frame=9: Line 2: Malformed #include directive
#include "as_files/ElectroServerAS3.as";
Thanks guys :D
Hi,
I understand the issue.
The problem: The *.as file was edited and saved using Flash MX 2004 which I recently learned adds a funky character to the front. On compile using Flash MX 2004 things are ok. On compile using Flash MX it gives that error.
The solution: Open it in notepad, copy the contents, open a new notepad document, paste the contents, save this new document with the old name.
That will work!
For reference, that funky character appears to be some sort of unicode indicator. I had to code a work-around for server-side plugins in ElectroServer so the server can use .as files from either MX 2004 or plain MX but I didn't look into it in detail beyond that.
u lil ripper :D
thanks soooo much jobe & michael!!!
WOOT!!!
Hello all,
I'm new to this forum so I thought I'd start out by contributing something. Here is my review of the Fortress Socket Server which my company used in it's latest project.
Application:
We used Fortress to implement a multiplayer RPG similar to Final Fantasy or other turn-based combat systems. Check out the beta version of the game at www.dojatan.com
Review:
I have not used other socket servers before, but I would certainly recommend Fortress to anyone who needs a robust socket server for use with Flash. After reading much of this thread, it sounds like Fortress has a bad rap as the complicated alternative to its competitors. Although I have not used the other servers out there, I wouldn’t consider Fortress overly complex for what it does. Any socket server solution isn’t going to be easy for someone new to programming. The main thing I liked about Fortress was that it comes with the FFDK (Fortress Flash Dev Kit) which provides a wealth of example projects and re-usable objects to get you started. In addition, the documentation is very comprehensive and straight forward. At first, I was intimidated by the complexity of the system, but after reading the documentation and picking apart the example applications, it all started to come together. It took one day to get a general understanding of the framework and a working environment setup. After one week we had a prototype of the game complete. The hardest part to understand are the Java “activities” that must be created to run the server-side logic for whatever you are making. This is the part of the documentation that could use some help. I had to reverse engineer the example projects to understand how to write the activities correctly. The only other gripe I have about the product is the lack of activity on the company’s support forums. Oh well, that’s what Flashkit is for.
Although the activity components are complex, they are the core of Fortress’ flexibility. Since the activities are Java classes, anything you can code in Java can be used to power your project. Not only are the activities flexible, but they profile excellent performance. Our project is still in beta, so we haven’t ever gotten over 20 concurrent users. However, our game logic is fairly complex and we are running the server on a shared hosting plan and still get lightning fast responses times. CPU and memory usage are also very good.
The main reasons we chose Fortress were:
50 connection development license - free
Java based – Can develop in Windows and deploy on Linux
Used in several production environments – Proven technology
Agree / Disagree ?
Hi All
Just to resume all this thing...
There are two ways:
1 polling
2 sockets
polling is slow, so, **** you, polling
And, talking about sockets, rpgcreator says:
"Last, Xadra Fortress,
HUGE learning curve. If you can dedicate time, Go for this one. I wouldnt recommend it for beginners. YOU CAN DO ANYTHING WITH THIS PUPPY!!!! Also, i would recommend reading the manuals a few times, just to get a good grip on it. VERY EXPENSIVE. Also, for the free version, you get 50 free connections at the same time, compared to 5 with electro server."
When you say expensive, are you talking about how many?
THAT is the stuff i want.I want all the people in the world plaiyng my game.
But i am a begginer and i know nothing about java.I just ave time to learn.Should i learn java first to make this thing do want i want it to do?
Anyone can show me examples of what this baby can do?
Thank you very much
ElectroServer supports 20 concurrent connections for free, not 5. That was several versions ago :)
Regarding the fact that you don't know Java, that's why ElectroServer supports you writing plugins in ActionScript (and soon some other languages too :)). Flash Comm Server does this as well.
As for price, I believe Fortress is $10 USD per each concurrent connection, but I might be wrong. I also think they have a max price for unlimited connections, but again, I might be wrong.
Whichever server you choose, don't assume you will need thousands of concurrent connections. It takes a MASSIVE player base to support that. If you have that many players, you can afford any server you want without problems. Remember too, that hardware and bandwidth are much more expensive then most server options will be. Bandwidth is generally a monthly fee as well, not a one time server license.
I personally get really frustrated with people thinking that they need 10,000 concurrent user support the day they start development. Start small and grow as needed.
Have fun!
Ok, thanks for your answer, webgeek
So, putting my feet on the ground, i am starring to think about electroserver.
The thing is, all the ideas i have always have some to do with a real time game
A real time game like, for example, a street fighter II game or a sword fight game
If it is not possible to make a real time game with any kind of sockets, it would be possible to SIMULATE one, somehow?
Comunication Server MX.
Is this thing good for multiplayer games?
(maybe i am asking something stupid, cos i have no idea what is this stuff)
Hey.
I've built my oen perl server, and tested it against other pelr scripts; even tried 2 online perl server examples...
I get my flash to connect, disconnect, send data. But data from my server is never retrieved by flash. I setup the following:
mySocket.onData=handleXML;
then tried:
mySocket.prototpe.onData=handleXML;
then:
XMLSocket.prototpe.onData=handleXML;
none of them worked at all. The server IS running on localhost, and so is flash... In same DIR, please help!
Here is the code I use to connect to my perl server.
code:
sock = new XMLSocket();
sock.onConnect = myOnConnect;
sock.connect("localhost", 8080);
sock.onXML = myOnXML;
sock.send(add_user);
function myOnXML(doc) {
//deal with data
}
Hope this helps.
:)