-
Thanks Jobe!
I wouldn't go so far and say there's a bug with the user variables it's just that they aren't described in the documentation and when I use them the same way I create room variables it doesn't work....
And of course I have another question:
I played around with room variables and room attributes for the last couple of hours and I'm not shure if I got the difference between these right.
Is a room attribute only modifiable through the person who created the room or can any client modify them?
I assume that room variables can be modified by any client and in addition the roomVariablesUpdated event is fired.
Is that correct?
Thanks,
BenderB
-
Don't leave Coldfusion out!
-T
-
Jobem, i just downloaded ES 3 and im thinking of making a multiplayer game. the first game ill make is my racing game, and im thinking of testing everything in the game, end just send the x and y variables (ok, maybe rotation too) to the serveronce a sec. then it sends it on to the other user, who tweens it from the previous position. at the end of the race both players will send their time to the server so it can check who won. im not planning to have any server side sripting for this, but is that a good idea? and another thing. ive downloaded the ES 3 (as i said) but if i want it on my new server, do i need to upload everything or just the star, stop, settings and stuff? and since i have the free version im only allowed to have 20 people at the same time, but in the xml file (configuration.xml) cant i just change that number from 20 to 2000?
-
Hi BenderB,
Yes, there is a bug with the ElectroServer class file with user variables. The server handles it properly, but the class doesn't. I'll be uploading a fix in the next week and will let you know.
Room variables can be created by anyone in the room. But there are attributs to a room variable, such as locked = true or false. If locked=true, then the room variable can not be changed, but it can be deleted and recreated. If locked = false, then it can be changed by anyone. If deleteOnExit = true, then the room variable will be deleted when the user that created it leaves the room. If deleteOnExit is false, then the variable will not be deleted when the user leaves the room.
All room variables are deleted when a room is removed. A room is removed when no more people are in it (unless it was a persistent room).
Room attributes can be changed by anyone in that room.
-
Electroserver
Hmm... Loadsa stoopid questions:
Tested out electroserver locally, it works great, impressive stuff...
I put in my 'global' IP address into all the neccessary places and the server doesn't start properly...
I was wondering if this was because:
a) I have a router with inbuilt firewall.
b) I have to change the port number.
All I wanna do is get the chat example supplied with ES up and running and I will be more than happy!
When I want others to be able to connect do I just run ES from my desktop and wait?
Thanks for helping a total noob.
w.
-
Hi problems4me,
Glad you like ElectroServer 3!
Ok, so you say you changed the IP everywhere. Is this the IP of the computer from which the server is running? It sounds like you are running it from your own PC. If so, then the IP must be the IP of your PC.
Once you answer that I can try to help further.
-
i tried the game and i also tried to modifie it into my own game, but i had one problem. this line
Code:
es.sendMove("all", ob);
sends all of the variables in ob, but what if i only want to send some? like the _x and _y and _rotation? and can u please write a book or tutorial on electro server (yes, i have visited the website).
p.s. great book. looked through it at my book store. top of the list for chirstmas :D
-
Ihos,
The complete object is serialized and sent. The trick is to only put in it what you want to send.
For instance, if you have lots of variables stored in myObj but you only want to send 3 of them, then you should do this before you send:
sendObj = new Object()
sendObj.x = myObj.x
sendObj.y = myObj.y
sendObj.rotation = myObj.rotation
es.sendMove("all", sendObj)
Good luck
-
thanx.
how fast is ES? as in, how often should i send data in a real itme game?
-
Ihoss,
It screams. ElectroServer 3 appears to be just as fast as any socket server around, including what ever servers they use for games like Quake and Half Life. The main latency factor is in network latency, which has nothing to do with ElectroServer 3.
There is no simple answer for how frequenlty you need to send data in a real-time game. Real-time games are extremely custom--they depend on tons of factors to be done correctly.
If you have never created a multiplayer game before then I extremely encourage you to start with a turn-based game.
FYI: If you are going to be at Flashforward 2004 in San Francisco this year then come to my session. I am doing one on real-time gaming in Flash.
-
can u just send all of the stuff u do there to norway, real time ( u should know how to :D )
yeah, ill probably start with turnbased. i got a great idea though:
at the beggining of the game player one (the one that challenged the other or the first one to join the game) sends all the data about all of the characters on screen to the server which passes it on to player two. when player two recieves it he parses it and sends the new data back to the server and to player one and so on.
-
Yeah - trying to run it off this computer, but it is networked, would it be easier to run it off the computer directly plugged into the modem, or does it make a difference?
The IP I need is the one that is shown when you go to whatismyip.com right?
I have all sorts of IPs, gateway IPs, subnet mask IPs, Connection IPs.. which 1 is it!?
The 1 I tried was the one you get shown at whatismyip.com, but as I said, electroserve was just laughing at me!
W.
-
Hi problems4me,
I definately am no network expert, but here is what I do know:
- The IP points to your network
- Internally on your network, all computers have an internal IP
- You must do what is called "port forwarding" on the network. So when an external request comes to your network on port 9875, the network router knows where to forward the request.
Most (if not all) routers have the ability to do port forwarding. You would configure the router to forward all requests that come to the network on port 9875 to a specific internal IP.
-
ok, I set my IP in the configuration file to 217.44.**.*** (my IP as seen by others on the net)
I then forwarded 9874-9876 and 8079-8081 to 192.168.*.** (Internal IP of this computer)
I open up StartElectroServer and get this:
http://www.stylishdesign.co.uk/sses.gif
:(
Such a simple thing to do, yet I can't do it :(
-
Hi problems4me,
Ok, I *think* the problem is that you are trying to bind ElectroServer 3 to an IP that it can't see, because it is inside the network. I think that you must bind it to your internal network address.
So, if your internal IP of that computer is like 101.102.103, then you'd bind it to that IP and the normal port that you are interested in using. Then you should hopefully be ok.
In order for someone external to connect to ElectroServer 3, they'd have to use the IP of the network itself.
Give that a shot, shouldn't take you abut 30 seconds to change.
-
im trying to test es on my network too, but i get the same as Problems. i also noticed that theres a chatServer and a webServer, which one should i change?
ive used my ip on the network but i get the same error as Problems. in the network properties (win XP) theres something called network mask (translated from norwegian windows). could that have something to do with it?
i also tried to make a realtime game the way i described it above and it worked on my comp (only one way though, cuz i havent been able to fix the turn taking :D )
-
Hello, I'm another Electrotank lackey coming out of the wood work. Jobe is right. The issue is simply that you are telling the server to bind an IP address that isn't available to it. You can tell what your IP address is by clicking:
start --> run
then typing in "command" and pressing enter. At the prompt, type "ipconfig" and press enter. This will work on Windows 95 and up through XP Pro. If you are on Linux/Unix, then you wouldn't need these directions. If you are on OSX then I am not sure how you find the IP. The results from "ipconfig" will look something like this:
C:\DOCUME~1\MIKE>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : abc.xyz.com
IP Address. . . . . . . . . . . . : 192.168.1.105
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
C:\DOCUME~1\MIKE>
The "IP Address" listed is what you should be using for both the chat and web server setting in the configuration file. Make certain that you use different ports for each. I recomend you disable the web server if you're not using it.
If your computer is connected directly to a cable/dsl modem without any sort of software/hardware firewall, then you are done. If you have a linkSys or other router/firewall or a software firewall then you are half way.
To open a firewall you need to specify a rule that allows for any external IP inbound access to the IP/port number you specified in the config file. The specific way to do this depends on the software/hardware in question.
To let people through your router/firewall combination you will most likely need to use port forwarding. It is sometimes called other things by the various vendors (consult your documentation). The idea is that you have an external IP address that everyone on the Internet sees pointing at your router/firewall box and then you have internal addresses that only your network can see also pointing at the router/firewall box. This is done for security reasons. Rather then get into the technical details, suffice it to say that you need to tell the router/firewall box to "forward" all requests to it's external address to an internal network address. In my Linksys router, it says something to the effect of "external port", "internal port", "protocol" (either UDP or TCP) and "IP Address". Based on what the "ipconfig" command told us and my own ElectroServer configuration, I put in this:
External Port: 9875
Internal Port: 9875
Protocol: Only TCP
IP Address: 192.168.1.105
That's pretty much it. The black art of opening ports up :)
Have fun!
Mike Grundvig
Electrotank, Inc.
-
oki doki
When I put the IP address in that you speak of, the server loads up correctly on my computer...
I test it by putting in the same IP into the chat thingy, it works fine then...
Then I go to putting in my 'global' IP, and it just laughs at me.
I have poked holes in my firewall as so:
http://www.stylishdesign.co.uk/multiplayer/ports.gif
Is there any way to test if this poking has been successful?
If you want to stare at the chat swf trying to connect go here:
http://www.stylishdesign.co.uk/multiplayer/Chat.html
This is how you say it works right?:
Global IP in chat.swf > IP shown in ipconfig (thanks to port forwarding) > ES > SUCCESS
W.
-
problems4me,
In this HTML page http://www.stylishdesign.co.uk/multiplayer/Chat.html
edit the HTML so that it embeds the Chat.swf by using the IP.
So, if your IP is 206.33.104.63, then the HTML page embeds this SWF file:
http://206.33.104.63/multiplayer/Chat.swf
-
problems4me,
Actually, I was assuming that the IP of your domain is also the IP of your computer. Is that not correct? If they are different, then there are only 2 ways that a SWF can connect to your computer's IP.
1) The SWF must be loaded from your computer's IP.
or
2) The SWF can be loaded from your domain, but your computer has to serve up a policy XML file that gives the domain access to your computer.
I probably just confused you more, but I hope you follow :)