« first day (597 days earlier)      last day (4427 days later) » 

6:00 PM
I think it's just a matchmaking service
 
first of all I guess it uses udp
 
Well... Here's that libjingle they talked about: code.google.com/apis/talk/libjingle
 
and that's what's needed for a fast paced game
 
Umm...what's udp?
 
Maybe that willl provide a starting place
User Datagram Protocol
 
6:01 PM
oh
 
As opposed to TCP (Transmission Control Protocol)
 
@AidanMueller a fast and unreliable data transmission protocol!
 
I have no idea where to start with multiplayer
I know basics
like what port-forwarding is and ips and stuff like that
 
Well, the next you learn is that
TCP == reliable, ordered, stateful
UDP == unreliable, unordered, stateless
 
I might go with source engine
 
6:05 PM
tcp is better?
 
so far my code is almost engine independent.
 
@AidanMueller Depends on what you want
Since TCP is reliable and ordered and a bunch of other stuff, it can also be slow
 
TCP == reliable, ordered, stateful <-----looks better to me
UDP == unreliable, unordered, stateless
oh
 
FPS games usually want to use UDP because they don't care too much if a packet gets dropped (under certain circumstances)
 
@JohnMcDonald it's not only "can be slow", it is slow
each tcp transmission is consist of at least 3 udp transmissions.
 
6:08 PM
would it be possible to use both somehow?
my guess would be no
 
Doesn't mean the first (and most important one) is slow
Yeah, you can mix them
 
one for actual data, one for acknowledge, and one to acknowledge acknowledgement!
 
I plan to, one day. TCP for important data, UDP for useless crap
@Gajet Actually, that depends. Usually it's just the message, then an ACK
 
@JohnMcDonald that's why I was asking
 
sorry for jumping in on your guys's multiplayer discussion
 
6:11 PM
And @Gajet, if you only use UDP for your game, you will have to implement a reliable protocol yourself
 
or you can assume reliable.
 
heh, Yeah... that won't work
 
for me I'm going to send whole gamestate each cycle.
 
but is there any point in using anything besides the euler method if you don't know the forces/acceleration in the future?
 
and that won't be more that 30kBps
even that's a large margin for me
 
Aku
6:12 PM
Would using ZMQ be cheating? zeromq.org
 
@JohnMcDonald you can also use same algorithms.
 
@Gajet Well, UDP is also unordered, so make sure you send timestamps and throw out old packets
 
already had that one in my protocol
 
Important stuff, like "I hit you", or "delete this unit" need to arrive. And if they don't you'll have a problem
 
using UDP, you can assume they'll arrive,
 
6:15 PM
Umm. Nooo
 
but they might not be received as soon as you want it to be received.
just send "I hit you" until other player respond "you hit me"
 
No, UDP is unreliable because packets get dropped
As in never ever arrive
 
how many packets are going to be dropped?
 
It's not how many.
It's the fact that there's a chance.
 
The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths. The protocol was designed by David P. Reed in 1980 and formally defined in RFC 768. UDP uses a simple transmission model without implicit handshaking dialogues for providing reliability, ordering, or data integrity...
 
6:16 PM
1 out of 2?
2 out of 3?
 
Aku
Any of the above?
 
even 4 out of 5?
 
Probably more like 1 in 100
ish
 
so sending same data more than 4 times is enough to make sure at least one of them will arrive!
 
You can never be sure.
 
6:17 PM
exactly. You can never be sure
 
@WilliamMindWorXMariager that's when you declare connection loss.
 
Read this for some fun:
In computing, the Two Generals' Problem is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. It is related to the more general Byzantine Generals' Problem (though published long before that later generalization) and appears often in introductory classes about computer networking (particularly with regard to the Transmission Control Protocol), though it can also apply to other types of communication. It is also an important concept in epistemic logic, and the importance of common knowled...
 
also as I said, you don't have to wait for ACK
you can send until you receive ACK
that's a different story than TCP. but works as well.
 
what about packet arrived "I walked off cliff" then packet dropped "but I pulled my chute"
 
first it's only "I walked off cliff" packet.
the second time you send "I walked off cliff but I pulled my chute"
you don't receive any ACK so you just repeat you message
 
6:20 PM
umm...ACK?
 
then you receive ACK for the first message so you drop first message
@AidanMueller acknowledgement for package receiving.
 
oh. ok
 
and only send "but I pulled my chute"
and so on...
 
Aku
UDP doesn't have ACKs. Am I missing something?
 
correct, UDP does not have acks
 
6:22 PM
@Aku I'm talking about ACKS that you generate yourself
 
Aku
Then you might as well use TCP?
 
well, I'm going now. byeeeeeeeeeeeeeeeeeeeeeeeeeee
 
Aku
byeeee.
 
good byeeeeeeeeeeeeee
 
it's not something that protocol provides, you are going to build TCP from scratch. but this time you end up sacrificing bandwidth for transmission speed.
 
6:24 PM
It's not transmission speed. Once you're connected, sending a TCP packet under ideal circumstances will arrive at the exact same moment a UDP packet would
 
The only difference is that under non-ideal circumstances, the TCP will take longer to arrive, and the UDP packet won't
 
check pinging your server, vs. ssh to your server
I guess valve also used same structure
 
what's your point with ping vs ssh? You talking connection times? TCP does take a lot longer to connect
 
Aku
@Gajet SSH is encrypted traffic, which takes a lot more handshaking than regular TCP. Pings are ICMP, not TCP. Maybe you should take a networks class before shouting.
 
6:29 PM
after handshaking encrypted connection is just like a normal tcp connection.
you also check load time of web pages
I mean from when you hit enter button until page title apears
 
Do you know what goes on when you connect to a webpage?
 
a UDP data transmitted to dns.
 
@JohnMcDonald Oh, I do I do, pick me, pick me!
 
UDP response from dns
and then TCP request for webserver.
TCP response from web server.
 
listening
 
6:31 PM
while pinging a web server is all those steps, but using UDP all the time
not exactly UDP but something with same behaviour
@Aku ICMP and UDP both have same transmission speed
 
There's some steps missing once you have the IP:
Client sends SYN to server
Servers sends SYNACK to client
Client sends ACK to server
Client sends HTTP request to server
Server sends reply
Client sends request after request for images and external files
Client sends SYN to ad provider
Server replies with file after file
Ad provider sends SYNACK
Client replies to Ad provider with an ACK
Client sends request(s) to Ad provider
Ad provider sends you ads
You see the website
 
I'm not saying wait before the page is completely loaded.
just seeing the page title is enough
and that eliminates every thing after server sends reply
a pinging action also does all 5 first actions except the 3th one.
 
I'm not so sure it does. I don't think your web browser will start to display anything until you have the CSS file
so that's ping *6
sorry, Round-Trip * 3
 
easier test.
just run a TCP/UDP echo servers on statlife
 
Well... what do you think TCP does that takes that much longer than UDP?! Nothing. There's a little bit of processing in there, but Nothing!
 
6:39 PM
and try echoing a message.
and check how long it takes to get a reply
 
I don't have root access to my server
 
do you have another computer near yourself?
 
nope, :/
 
you can simulate connection distance using network traffic
do you have node.js installed on statlife?
 
heh, yeah, I can consume my 25mbps line </sarcasm>
 
6:41 PM
or python?
or perl?
node.js is easiest (at least for me)
 
I don't think I have node.js
 
python?
 
how about we just whip a C# app together
or some other language
I may already have something, let me see
 
What exactly are you trying to prove?
 
I guess we are both behind NAT
so I can't connect to you, neither you can connect.
 
6:45 PM
@Gajet is trying to say that UDP is faster under ideal circumstances than TCP
 
let me see if I can forward a port
 
I have admin access to my router, you should be allowed to connect to me
 
Oh, under ideal circumstances they should be 99.9% the same, but on the Internet you will NEVER get ideal circumstances :)
You'll always be going through some router that is overloaded, or doesn't have a good route
 
yup, and under non-deal circumstances, I'm saying that TCP will slow down while the UDP counterpart will just not arrive
(or be treated the same as the TCP packet)
 
Exactly
 
6:47 PM
@Nate under ideal circumstances, TCP waits for ACK, while UDP doesn't.
 
It doesn't wait
 
so UDP should be faster.
 
No, it doesn't wat...
 
Once the receiver has the packet, it uses it
 
@JohnMcDonald it first checks if there isn't another package before the one received
 
6:48 PM
Maybe you're confused about how Slow Start works?
 
so it has to wait for ACK
 
No, each packet has a sequence number, so it instantly knows if the packet is out of order or not
IF the packet is out of order, yes, TCP will hold on to the packet until order is restored
Whereas UDP will just deliver the packet anyway
So with TCP:
Packet #1 is received, and processed *instantly*
Packet #3 arrives and is held, because it is out of order
Packet #2 arrives and is processed immediately followed by the processing of #3
 
if you've got a UDP client, try connecting to me "178.131.10.135:15338"
 
That helps when you get the "And opens his chute" message and have no idea what it means
 
I used to have a better animation for it, but there is usually no extra waiting unless there is a high level of packet loss
 
6:56 PM
yeah... I don't think I do have a UDP client
but yeah, that's not a bad demo @Nate
 
I'm pissed, I can't find this really good one I used to have a link to, that's the best one I can find.
 
@john how can I send 70 kbytes to you?
that's my server/client testing bundle
 
you talking about testing the transmission of 70kb?
 
no
testing program is almost 70kb
compressed
 
ah
jcpmcdonald@gmail.com
Is the code in there too?
 
7:00 PM
only codes
 
k
c++?
 
yep
 
k, let me find a compiler
 
actually a big part of it is a js library for later visualization of how long packet transmissions took.
 
k, and I'm assuming the TCP connection is not part of the timing?
 
7:04 PM
nope
it's only a code I've written to learn UDP
 
ah, ok. So what do we hope to learn?
 
how to bind a UDP port
how to send data, and how to respond
at least that was my motivation back then
 
no, I'm meaning from our little test here
 
I guess how much latency do we have,
and how much packets loss.
 
:( I only have C++ in VS2008, not 2010
 
7:09 PM
np
just open project files
 
that means I can't open the project files
or the solution
 
just rename them it should work
or at least there is a version number somewhere in the file
 
Conversion failed
I'm running a ping -t to you right now
 
does it work?
 
yup
so far no losses
 
7:14 PM
do I really am reliable!
what about making my own laptop a game server?
@JohnMcDonald now that I think of it, you can also create a new empty project using those files.
 
fyi, 1 packet lost so far
I'll make a project
Ok, I have your client here
 
178.131.10.135:15338
my ip and port number
port is at line 85
and ip is set at line 111
 
k, I opened the client, not the server. I'll get the server installed
 
I've run the server on my laptop
 
well the client looks different on my end then
 
7:23 PM
I guess I messed up somewhere
server doesn't accept connections from any ip other than 127.0.0.1
 
meh, I'll just add your info where I think it works
ok
well... I ran it with the new ip and port. It says "Sending a datagram to the receiver... Finished sending. Now trying to receive data back. Receiving datagrams..."
fyi, an other ping packet dropped
actually, a total of 3 so far
 
now it seems weird,
server actually accepts connections from other IPs but forcibly resets connection without responding
 
still here?
 
7:41 PM
cool
and the room has once again died out. where is everyone, coding games?
 
user4704
Playing GW2.
 
user4704
(at least I am, large beta event this weekend)
 
7:58 PM
well, that was too much minecraft....
 
@JoshPetrie so you are part of development team?
 
user4704
Yes.
 
you know that I love you right?
now hand me the beta key!
 
user4704
No. :D
 
apparently I was not selected, :(
@Gajet: Ping statistics for 178.131.10.135:
Packets: Sent = 2800, Received = 2778, Lost = 22 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 360ms, Maximum = 1949ms, Average = 458ms
 
8:04 PM
I didn't sign up. But not being a gamer means I'm a pretty poor beta tester.
 
1949ms?
 
I'd play the game for an hour and never touch it again ever.
 
how come it didn't time out!
 
@WilliamMindWorXMariager which means you'd get a key if you had signed up :P
 
Very likely. :P
 
8:07 PM
what is that ip address
pointing to?
 
to my router
 
so why is he pinging it?
 
ddos attempt :P
 
Ping statistics for 178.131.10.135:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 372ms, Maximum = 478ms, Average = 415ms
 
heh
I was pinging it to attempt to show that packets can get lost
 
8:11 PM
oh
 
22/2800 got lost
 
not bad
 
they should have taken that left turn at Albuquerque.
 
Speaking of lost data, how do you handle connection loss in your games? Do you try to reestablish a connection, or do you quit immediately when the connection is lost?
 
@JohnMcDonald and remember that my internet connection is one of the worst internet connections ever.
@WilliamMindWorXMariager depends on how long the connection is lost
if it's less than a sec, user will only experience a lag.
 
8:14 PM
Just FYI your router shouldn't be responding to ping :/
 
@Byte56 I know, that's why I was surprised.
but I'm okay with that
 
Why not?
 
@Gajet Does that matter? Packets can get lost anywhere, and the fact that packets can get lost is enough to make sure people implement reliable transmission methods for important data
 
Lets the bad guys know your there
*you're
 
let them know
 
8:16 PM
My router responds to pings.
I guess I'm not paranoid enough.
 
the point is no one can pass through the NAT
so I'm not really worried about that part
do you guys have any idea why this line doesn't work?
iResult = recvfrom(RecvSocket, RecvBuf, maxBufLen, 0, (SOCKADDR *) & SenderAddr, &SenderAddrSize);
this is how I initialize recvSocket:
`RecvAddr.sin_family = AF_INET;`
`RecvAddr.sin_port = htons(Port);`
`RecvAddr.sin_addr.s_addr = htonl(INADDR_ANY);`

`iResult = bind(RecvSocket, (SOCKADDR *) & RecvAddr, sizeof (RecvAddr));`
 
define "doesn't work"
 
Out of 1k pings one has timed out so far.
 
Ping statistics for 64.34.119.12(stackexchange.com):
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 73ms, Maximum = 210ms, Average = 120ms
 
well that's a good server.
try pinging me
 
8:25 PM
did
 
and see how a buggy connection might affect you
ping -t
 
Ping statistics for 178.131.10.135:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 372ms, Maximum = 478ms, Average = 415ms
 
Ping statistics for 178.131.10.135:
Packets: Sent = 1000, Received = 999, Lost = 1 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 397ms, Maximum = 637ms, Average = 459ms
 
heh, even nothing.com exist
 
8:30 PM
what do you think would happen if I would ping chucknorris
 
I wound't dare trying that one
 
@Gajet I almost think I went there once
@Gajet your probably right
no, you ARE right
 
@AidanMueller who knows maybe you receive a punch instead of sent packet? and who wants that one?
 
hehe
 
8:38 PM
hihi
 
I just paid for a song... shudders
 
Punch from chucknorris: ft-lbs=32 time=lightning-fast
 
I gotta take a walk... Gotta shake off the feeling...
 
I can't pay for the songs so I just download them...
it's you who banned us!
 
what?
 
8:41 PM
I'm in Iran, and so I'm in restricted zone. I can't purchase anything on internet legally, so I just take what I need.
 
you gotta do what you gotta do
c++ or java?
 
neither
 
what do you use
?
 
for gamedev C#
 
not cross plat is it?
 
8:53 PM
WP7, XBOX 360, and PC so good enough for me
 
i've never heard of wp7
 
I'm also using C#, but I don't plan to do any porting. Only PC
 
windows phone 7
but yeah its pretty rare
 
awww, not going to do this: lmgtfy.com/?q=wp7
 
considering there are only about 10 wp7 phones sold I didn't think it was warranted :)
 
8:55 PM
well I've heard of windows phone but not wp7
 
7 is the new metro ones
It was an exaggeration.
 
just makin sure
 
Point being many don't think its popular enough to be a feasible platform to develop for
 
and about that c# thing, why would you not use c++?
 
it cuts dev time
 

« first day (597 days earlier)      last day (4427 days later) »