Question about Verge sockets
Displaying 1-16 of 16 total.
1
Ness
|
I just saw in the v3 docs that the netcode includes sockets. I assume this is for sending data between a verge server and a verge client.
My question is, is it possible to send ints, strings, whatever from verge to a program written in c++ or java or another language using sockets?
Posted on 2004-10-25 02:36:19
|
Feyr
|
It's technically possible. The problem is that it would require finding out what port V3 uses to connect, and then emulating whatever protocol Verge uses to pass strings and ints around. The dev team hasn't released the information needed, as far as I'm aware, but if someone wanted to mess around with a packet sniffer it could be found. At the moment we just don't have the information required, but I imagine one or the other (a developer giving the info or someone with a packet sniffer deciphering it) will happen eventually.
Posted on 2004-10-25 03:19:22
|
Ness
|
All my brute force port connections paid off :p I found what port VERGE uses (45150 in case you wanted to know) and made verge send a string to java using sockets
link
Ok so the usefullness is lacking, but I had to do something with it after I spent 2 days trying every port from 0 to 45150.
Posted on 2004-10-27 01:08:42
|
Zip
|
Not by hand I hope... Oh the things we do because of lack of doccu.
Zip
Posted on 2004-10-27 01:25:40
|
Overkill
|
Hey, I at least added the Netcode section. You can credit a guy for that much. But, I have little knowledge of V3's netcode stuff (besides GetUrlText and GetUrlImage).
Port 45150... Interesting. Though I'd *rather* have VERGE connect to a port I specify, as opposed to having a client connect to a VERGE server port. Also, the addition of raw string sending and recieving would be nice. How else could I expect to make vIRC? ;__;
Posted on 2004-10-27 01:46:28
|
Ness
|
Quote:Originally posted by Zip
Not by hand I hope... Oh the things we do because of lack of doccu.
Zip
Naw, I made a server with verge, then wrote a java program to try every port from 0 to 2^16
Posted on 2004-10-27 01:53:45
|
Gayo
|
It would be nice if there were some global variable that defined what port it would talk to, yes.
Posted on 2004-10-27 03:35:37
|
zonker6666
|
I just uploaded a tiny example of v3 netcode --- just my own experiments so it really doesnt work all that well - but im hoping it can be a bit of a starting point for a little protocol to make little v3 net games.
http://www.verge-rpg.com/files/detail.php?id=551
Posted on 2004-11-03 21:00:17
|
Ness
|
I'm working on the same kind of stuff, except I'm trying to sync 2 entities and then let them run aroung and hit stuff with sticks. Sort of like multiplayer Illusion of Gaia.
Right now it runs WAY to slow to do anything usefull. Mabey I'll lookup how to do net code the right way and try again :p
Posted on 2004-11-03 21:29:44
|
zonker6666
|
I think v3 might be more suited to making turn based kind of networked stuff. Card games, strategy etc ....
With this pong thing i tried a few different approaches -- letting each player have control of the ball (and transmit its possition velocity to the other player) while it was on their side of the screen.... that didnt work out too well :)
now its the server keeping track of the ball and broadcasting to the players but that is slowish.
Posted on 2004-11-03 22:36:45
|
blues_zodiakos
|
In that kind of case, wouldn't it be easy to just to movement prediction? The ball vector would only need to be recalculated when it hit something... either the two boundries or the two paddles. The server would still take care of the broadcasting, but as long as you made periodic checks to make sure both clients are in sync (broadcasting paddle position), you could really cut down on the amount of information being sent. No data really needs to be sent while the ball is not in contact with a paddle except for paddle positions.
Posted on 2004-11-04 08:27:08
|
Zip
|
Dude, Quake ran well on a 28.8 modem. If verge can't manage pong on broadband, I'd say it's not the vc coder's problem.
Zip
Posted on 2004-11-04 15:16:44
|
vecna
|
Quake1 did not run *well* on 28.8 modem. Modern games can, because we use new fangled 'cheating' netcode. That's all fine and good, but don't be fooled by the cheating.
There's nothing particular about VERGE's netcode. It adds a small amount of header information, and passes it on through TCP with TCP_NODELAY enabled. The only real way to speed things up would be to use UDP but, UDP programming in verge (and in general) is/would be extremely painful.
Posted on 2004-11-05 21:53:46
|
Toen
|
Being able to fudge is integral to making good netcode ^_^
Posted on 2004-11-06 05:44:41
|
Sungam
|
Just out of curiosity, do you happen to know how this 'cheating' is done? Just a vague description would be fine - I've no intention of reproducing it, I'm just curious :p
Posted on 2004-11-06 06:51:08
|
blues_zodiakos
|
A combination of movement prediction and interpolation. Ever wonder why when in some games you try to shoot someone with a high ping and it doesn't register? It's because their computer disagrees with the 'predicted' position that your computer is showing... your computer has predicted, based on the last known position, vector and velocity of said player, at what position they will be at before it is able to recieve the next 'for sure' position. Since the ping is so high, those predictions are quite possibly off (you can change direction quite easily within .3 seconds, aka 300 ping). Some games handle this 'change of plan' gracefully by interpolating the last known position with the new position, and you never notice (but you might have trouble hitting them if they change direction often), and some games handle it badly (people warping; It's when the last known position is different from the new 'sure' position, and the player appears to 'warp' to this new position). Some games have an odd effect where it's a trade-off... the player seems to 'speed up' until it gets to it's new 'sure' position'. It really all depends on what you are willing to sacrifice. In a non-PvP game, it might not matter at all what the 'true' positions of each player are at all times, and for those games (and others), sometimes a player might not actually be at the position that your computer reports them at all the time.
I hope some of that made sense because I posted this right before I went to bed. :D
Posted on 2004-11-09 08:12:06
|