Friday Facts #175 - Programmable Speaker

Regular reports on Factorio development.
User avatar
MrGrim
Fast Inserter
Fast Inserter
Posts: 241
Joined: Sat Apr 09, 2016 7:58 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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
HammerPiano
Fast Inserter
Fast Inserter
Posts: 232
Joined: Thu Dec 31, 2015 7:36 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post by HammerPiano »

Ahhhhh cant wait to 0.15 to make some music. With nuclear reactors and sound FX - i am unstoppable!
HunApo
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Jan 27, 2017 6:32 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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:
tarou00
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Jan 27, 2017 6:32 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
Last edited by tarou00 on Fri Jan 27, 2017 6:39 pm, edited 1 time in total.
Shaymes
Fast Inserter
Fast Inserter
Posts: 215
Joined: Thu May 22, 2014 8:06 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post by Shaymes »

we Need more sensors not recivers with limited usage :)
Mining Drill Operator
AsherMaximum
Burner Inserter
Burner Inserter
Posts: 17
Joined: Tue Mar 08, 2016 12:44 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post by AsherMaximum »

Try posting on StackOverflow.stackexhange.com - your question on NetworkEngineering was suspended for being off-topic.
Twinsen
Factorio Staff
Factorio Staff
Posts: 1354
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
User avatar
hansinator
Fast Inserter
Fast Inserter
Posts: 160
Joined: Sat Sep 10, 2016 10:42 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post by hansinator »

A speaker! So nice! <3
milo christiansen
Fast Inserter
Fast Inserter
Posts: 106
Joined: Thu Jul 30, 2015 7:11 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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).
milo christiansen
Fast Inserter
Fast Inserter
Posts: 106
Joined: Thu Jul 30, 2015 7:11 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post by milo christiansen »

That sound like a good idea, particularly just sending a resend counter would be quick and easy.

EDIT: Read, then post.
Wonder Spaceship
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Jul 04, 2016 5:05 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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
mattj256
Fast Inserter
Fast Inserter
Posts: 203
Joined: Sun Mar 27, 2016 7:25 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
Image

Transport Belt Repair Man

View unread Posts
Xeteth
Fast Inserter
Fast Inserter
Posts: 158
Joined: Tue Feb 17, 2015 6:06 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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!
User avatar
aRatNamedSammy
Fast Inserter
Fast Inserter
Posts: 216
Joined: Tue Jul 08, 2014 4:26 pm
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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
Teeth for Two (so sorry my bad english)
devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: Friday Facts #175 - Programmable Speaker

Post 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.
Post Reply

Return to “News”