Page 2 of 5

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 6:24 pm
by MrGrim
Xon1 wrote:Twinsen; those download issues reminds me of the old Sip packet of death. Aka buggy network controller firmware.

Sometimes just encrypting everything to stop network gear in the middle from "helping" may be your best bet. Alternatively padding a UDP packet so it is always some minimum size may help.
This also reminded me of this fairly epic story: http://mina.naguib.ca/blog/2012/10/22/t ... uldnt.html

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 6:37 pm
by HammerPiano
Ahhhhh cant wait to 0.15 to make some music. With nuclear reactors and sound FX - i am unstoppable!

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 6:38 pm
by HunApo
Fish wrote:Wow, that looks so cool.
Great choice of song btw. Gravity Falls is awesome.
Even better with snoop dogg version :mrgreen:

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 6:39 pm
by tarou00
Why don't you use TCP to downloading the map?
You will get a higher speed for high volume transfer, and won't have to take so much care in what's between the 2 end points.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 6:39 pm
by Shaymes
we Need more sensors not recivers with limited usage :)

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 6:47 pm
by AsherMaximum
Try posting on StackOverflow.stackexhange.com - your question on NetworkEngineering was suspended for being off-topic.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 7:22 pm
by Twinsen
tarou00 wrote:Why don't you use TCP to downloading the map?
You will get a higher speed for high volume transfer, and won't have to take so much care in what's between the 2 end points.
This was answered in FFF-136
Using TCP would have three important consequences: It would force players to open TCP ports as well as UDP ports in firewalls and NAT servers, it would remove the possibility of using NAT punching now or later with MP matching server and it would cause problems with downloading from multiple players at the same time.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 7:32 pm
by sillyfly
I have posted my guess on the original thread, but I have no real way of further verifying it without the help of someone affected.

TL;DR - possible bug in one or more routers along the way when UDP checksum is 0x0000.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 8:01 pm
by hansinator
A speaker! So nice! <3

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 8:08 pm
by milo christiansen
sillyfly wrote:TL;DR - possible bug in one or more routers along the way when UDP checksum is 0x0000.
With the possible simple fix of checking outbound checksums and "fixing" the packet to make this particular one impossible. (Is this possible? I haven't worked with UDP much)

If the checksum for the problem packets is null (0) that would make it much more likely that that is the problem is with the checksum than something in the packet data.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 8:17 pm
by sillyfly
milo christiansen wrote: With the possible simple fix of checking outbound checksums and "fixing" the packet to make this particular one impossible. (Is this possible? I haven't worked with UDP much)


This would only work if the problem is in the first NAT (the one in the router of one of the players), as the checksum takes the IP addresses into account. As this problem occurs in both directions this is almost surely not the case, and so since Factorio has no sensible way of knowing the real (behind the NAT) IP address, this isn't really a feasible solution.
However, instead of a random byte they could choose to send a byte (or two) counting the number of attempts. This will have the same result of changing the checksum, but will have the added benefit of being both deterministic and informative (could possibly also help in cases of packets getting dropped for other reasons).

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 8:28 pm
by milo christiansen
That sound like a good idea, particularly just sending a resend counter would be quick and easy.

EDIT: Read, then post.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 8:40 pm
by Wonder Spaceship
Is the sound just going to be a piano? I mean, I see a dropdown box so obviously not, but what other sounds are planned? Because if you haven't thought of it, the game needs klaxons. Here is one (with an air siren) example. Klaxons, sirens and other alarms would be a great fit for a giant sprawling factory.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 8:47 pm
by bobingabout
Kinda reminds me of this old program at school called Logicator. Was a flowchart programming peice of software, and one of the things it allowed you to do was generate a tone through the PC Speaker. you know, the one on the motherboard, back from the MS-DOS Era, in this case, the PC was running Windows 3.1.

Anyway, using simply the abillity to play a tone of a specific frequency.... Someone wrote a program to play an entire symphony. one of Bethoven's I think.

Reminds me of that.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 10:02 pm
by MrDoomah
Wonder Spaceship wrote:Is the sound just going to be a piano? I mean, I see a dropdown box so obviously not, but what other sounds are planned? Because if you haven't thought of it, the game needs klaxons. Here is one (with an air siren) example. Klaxons, sirens and other alarms would be a great fit for a giant sprawling factory.
That sound isn't a claxon, its an air raid siren: https://www.youtube.com/watch?v=cURcd2_w-rg. So if its not in the base game and someone decides to mod it in, change the sprite to an actual air raid siren and not a speaker :P

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 10:08 pm
by mattj256
milo christiansen wrote: With the possible simple fix of checking outbound checksums and "fixing" the packet to make this particular one impossible. (Is this possible? I haven't worked with UDP much)


I did a quick Google search.
"UDP has a special case where 0x0000 is reserved for "no checksum computed". Thus for UDP, 0x0000 is illegal and when calculated following the standard algorithm, replaced with 0xffff."
https://ask.wireshark.org/answer_link/19845/

Here's the same information in RFC 1122:
"[T]he UDP checksum is optional; the value zero is transmitted in the checksum field of a UDP header to indicate the absence of a checksum. If the transmitter really calculates a UDP checksum of zero, it must transmit the checksum as all 1's (65535). No special action is required at the receiver, since zero and 65535 are equivalent in 1's complement arithmetic. "
http://www.freesoft.org/CIE/RFC/1122/79.htm

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 10:09 pm
by steinio
FYI the sound you hear is the intro from Gravity Falls: https://www.youtube.com/watch?v=ZtlX1pujSr4

Nice that the Factorio team likes it too.

Re: Friday Facts #175 - Programmable Speaker

Posted: Fri Jan 27, 2017 11:39 pm
by Xeteth
Always love hearing about new circuit network features. I think the speaker is a great addition - it will allow the player to create very specific and custom alerts for various things, giving us an idea of any issues straight away rather than us finding it many hours down the track.

Looking forward to hearing more about the upcoming circuit network features in a future FFF!

Re: Friday Facts #175 - Programmable Speaker

Posted: Sat Jan 28, 2017 12:52 am
by aRatNamedSammy
:o ........ speakers..... :o .....
after the super display, now the sound.. next, a gameboy playing tetris with the russian music, in factorio :lol: ...
8-) cant even imagine what creation some ppl will do.. looking foward to these futur pieces or arts :D .
no limit except imagination,.. and well, cpu capacity :D :lol: lolll

Re: Friday Facts #175 - Programmable Speaker

Posted: Sat Jan 28, 2017 2:24 am
by devilwarriors
are you gonna also add some simpler way to play sound via the lua api?
Having to create transparent explosion or vehicule to create sound in a mod is a real pain.