Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Regular reports on Factorio development.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by daniel34 »

Cutemine wrote:
BlueTemplar wrote:At the risk of repeating what I said on Discord, IMHO you should do the right thing™,
and set "Undo" to the scan-code for "whatever is the bottom left letter key"
(Z for QWERTY, Y for QWERTZ, W for AZERTY, Я for JCUKEN...)
...
There is no well defined "Right Thing" in this case. For example CRTL-Z is still widely used on german Keyboards, but you hit the actual Z key and not the y Key where it would be on US Layouts. Users got used to it over the years I guess. Basically any program I know of uses the KeyCode for this. Sometimes there is some magic going on in the background where it displays it as "HIT CONTROL Y" or the likes but works with your actual Z key.
I completely agree. On a German keyboard CTRL+Z is the default keybinding for the undo function in virtually all applications you will encounter, and the one time it was actually bound to CTRL+Y it was very surprising to me and I mistakenly pressed CTRL+Z several times trying to use the undo function (which, incidentally, was mapped to redo instead).

In fact, this is so widespread that some keyboards actually have keys that display their alternative functions, and on your average German keyboard it might look like this:
DSC_0665.JPG
DSC_0665.JPG (185.59 KiB) Viewed 7966 times
The Strg (Control) key has a diamond on it, and several other letters (S, F, Z, X, C, V, B, P) have indicators to show what happens when you press the CTRL key at the same time as that letter, in this case Z being Rückg (Rückgängig / Undo).

I like that the devs decided that it should always be CTRL+Z, however I also understand that this is an easy decision to make for people who use a German keyboard, but vastly harder to make for someone using AZERTY instead. I think Factorio should follow how other major applications handle this issue and use the same keybindings as they do.
quick links: log file | graphical issues | wiki

porcupine
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Oct 15, 2016 4:58 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by porcupine »

I hope we can see a few new types of enemies for 0.17.

I didn't see it on the road-map, but for all of us who need an adversary to feel the game-play has purpose, the very limited biter options leaves one wanting.

I'd love to see a flying enemy of some sort (of even if worms puked up something that flew), that way water/rivers/cliffs weren't inherently safe, etc.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2420
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by BlueTemplar »

Mine is pretty similar :
Image
(Sorry for the dusty keyboard.)
It's still wrong - as the empty space next to XCV hints at.
BobDiggity (mod-scenario-pack)

Demongornot
Inserter
Inserter
Posts: 21
Joined: Fri Oct 07, 2016 9:29 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by Demongornot »

I just hope it won't mess up with programmable keyboard/keypad as someone who play with a Logitech G13...

User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 595
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by Gergely »

My keyboard looks like this:

Code: Select all

0 1 2 3 4 5 6 7 8 9 Ö Ü Ó
   Q W E R T Z U I O P Ő Ú
    A S D F G H J K L É Á Ű
   Í Y X C V B N M , . -
I also have Z and Y swapped and yes, their functions are also swapped. I do use Ctrl+Z to undo.
Hope it helps.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by daniel34 »

BlueTemplar wrote:I partially agree : it should be Ctrl+"the bottom left letter key" when that letter is not Z ! :P
BlueTemplar wrote:It's still wrong - as the empty space next to XCV hints at.
Why do you consider it wrong? Obviously the CTRL+Z keyboard combination was picked because the Z key (on US keyboards) was in the bottom row and close to the CTRL key.
As I mentioned earlier the predominant way of undoing the last action is CTRL+Z, on US, UK, German and French keyboards (as confirmed by your Photoshop screenshot and keyboard picture). However changing the undo key to the bottom left letter (W in France, Y in Germany) isn't going to solve the issue. People won't understand why that specific key was chosen, nor will they understand (if they ever look it up) that this is the physical key the US used when introducing the undo function. I can't speak for France, but the keyboard picture you uploaded tells me that CTRL+Z is as universally understood in France as it is in German speaking countries.

I understand that you want to change global thinking to have CTRL+bottom-left-letter-key to act as an undo function, not only in Factorio but also in other applications. But at least to my mind (and I'm sure a lot of other Germans) using CTRL+Z for undo is pretty much wired into our brains and we would never consider to use CTRL+Y instead. It is possible that at some point CTRL+Y (on German keyboards) will be understood to mean undo like CTRL+Z is doing in the US/UK, but I don't see Factorio taking part in that development. Instead, people would rebind their keys (or use a mod to do so) if Factorio were to use the physical key on the left of X to undo.
quick links: log file | graphical issues | wiki

Dry Hairy Tree
Filter Inserter
Filter Inserter
Posts: 319
Joined: Wed Jun 08, 2016 10:51 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by Dry Hairy Tree »

If those worms are now 'tunnelers' rather than completely stationary...

How about underground migration where only the worms are capable of this stealth approach. A very slow migration and radar can detect them within range. Turrets etc can shoot them if they are detected, otherwise they're capable of going under walls. These could be from medium worms up, so one might start without the threat but some predetermined point (of pollution perhaps) gives rise to them. They'd have better armor underground but can't fight back unless within very short range (pop up and fire). I see a small mound forming, trees if present would fall to the sides, dust and dirt cloud the surrounding air which seems to shimmer as the worm erupts. Silent bar a slight rumbling if not under attack, raging if attacked. They might surface and blow dust, like a land whale.

Or something like that. It would be very cool also if you had a biter class these worms consume. Currently the aliens are rather dull in behavior merely walking or attacking. And making them ugly and aggro has already been achieved... Worms popping up and taking small biters would look very cool, worms popping up where you forgot your radar would be very cool.

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by Oktokolo »

So will these new worms actually use their shiny tunneling tools to change locations?

RamsesIV.
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Apr 29, 2017 7:19 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by RamsesIV. »

You guys have so nice keyboards. Mine has lot of letters unreadable. Especially WASD all most around there are damaged :D

luziferius
Inserter
Inserter
Posts: 35
Joined: Thu Jun 01, 2017 12:59 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by luziferius »

There are quite some different keyboard layouts out there … The scan code based approach looks reasonable. I use the german »neo2« layout, so my keyboard looks like this:
Image
(Ignore the bottom row. The image is a low resolution render of a print sheet, those icons there are meant to optionally replace the omnipresent Windows logo key.)


Normally, when I start factorio, I load my map (optionally replace this step with a five-minute MP map download), try to move and notice that it won’t work. Then exit factorio again, use the KDE keyboard layout manager to move QWERTZ to the top in the layout list and start factorio again. (Remember that map download? It has to be re-done :? ) If i switch back to neo2 (while it being not the primary layout), I can use the normal QWERTZ keyboard bindings (and shortcuts like [Ctrl]+[C] using the default QWERZ [C] key location), while still typing with neo2 in the chat window.

That is my default approach to all games, because some seem to dislike the neo2-equivalent keyboard bindings in one way or another.(Don’t accept keys, or accept them in the editor, but not in the actual game, fail to display it properly in binding help texts or overlays …)

Keyboard layouts are a great way to drive developers insane, just like time zones … :lol:

porcupine
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Oct 15, 2016 4:58 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by porcupine »

Dry Hairy Tree wrote:If those worms are now 'tunnelers' rather than completely stationary...

How about underground migration where only the worms are capable of this stealth approach. A very slow migration and radar can detect them within range. Turrets etc can shoot them if they are detected, otherwise they're capable of going under walls. These could be from medium worms up, so one might start without the threat but some predetermined point (of pollution perhaps) gives rise to them. They'd have better armor underground but can't fight back unless within very short range (pop up and fire). I see a small mound forming, trees if present would fall to the sides, dust and dirt cloud the surrounding air which seems to shimmer as the worm erupts. Silent bar a slight rumbling if not under attack, raging if attacked. They might surface and blow dust, like a land whale.

Or something like that. It would be very cool also if you had a biter class these worms consume. Currently the aliens are rather dull in behavior merely walking or attacking. And making them ugly and aggro has already been achieved... Worms popping up and taking small biters would look very cool, worms popping up where you forgot your radar would be very cool.
That would be killer, but would be a lot of work I suspect.

Having worms actually tunnel, and make tunnels the other aliens can path-through, that would need to be collapsed with explosive firepower/concentrated firepower/something to form a breach (as noted, with radar being able to spot the tunnels/potentially kill 'em before they breach your walls) would be awesome. That'd definitely add a lot of variety, but also wouldn't be a "cheap" integration I suspect.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2420
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by BlueTemplar »

daniel34 wrote:However changing the undo key to the bottom left letter (W in France, Y in Germany) isn't going to solve the issue.
Well, besides being """right""", it's going to solve the issue raised by the FFF :
posila wrote:there is another catch. It is completely reasonable for player to walk north, and Ctrl+click some entities. Remember AZERTY keyboard? Player keeps Z pressed down to walk north and presses Ctrl to start control clicking. Well, I tested this and it doesn’t trigger undo, but still stops player from walking. So it is not completely destructive, rather annoying. I am not sure how or if we’ll solve this, perhaps people with these layouts that create these kind of collisions will need resolve them by changing controls options manually.
daniel34 wrote:I understand that you want to change global thinking to have CTRL+bottom-left-letter-key to act as an undo function, not only in Factorio but also in other applications.
Well, it's not so much "global", as it's for the countries that don't have Z on the bottom left...
It might even be limited to only some of the latin alphabet countries, as the countries with other alphabets might already be used to whatever the bottom left letter is (any Russian keyboard users here?).
daniel34 wrote:Instead, people would rebind their keys (or use a mod to do so) if Factorio were to use the physical key on the left of X to undo.
As already mentioned, rebinding is what - the people with keyboards that have Z (and I guess XCV...?) on the usual spots where QWERTY's WASD is - will have to do as things currently stand for ... 0.17 ?

----

Whoa, luziferius, that's fancy !
I was eying something like :
this :
sDrVhkQ.jpg
sDrVhkQ.jpg (744.57 KiB) Viewed 7753 times
or like :
this :
Image
(hopefully in color soon)
(but I'll have to research these "neo" keyboard layouts too!)
BobDiggity (mod-scenario-pack)

rkfg
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Thu Jan 15, 2015 11:11 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by rkfg »

BlueTemplar wrote:
rkfg wrote:Forcing undo as Ctrl+key-right-to-left-shift works for the opposite, increasing the number of people who will rebind.
What makes you think that?

Because under the current proposition for Ctrl+Z, it's the AZERTY users that will be forced to rebind (away from it), due to the issue raised in the FFF !
Yeah, for AZERTY this is an unfortunate clash between the shortcuts and controls, not much can be done about it. Either change the controls or the shortcuts, the solution is up to the devs. However, the people in this thread mostly confirmed my statement: habits > effectiveness, because these habits ARE effective already. Playing the game you don't think "I should press W to move forward/up, let's do it". You want to go forward and your fingers do the required movements. For undo it's the same, you want to undo, your fingers go to Ctrl and Z positions automatically, relearning the new positions just for one game is totally not worth it no matter how short that new distance now is.

BlackRece
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Sep 07, 2018 10:43 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by BlackRece »

Please tell me why worm spits follows a player and not travel in a straight line!?

I could understand slight variances in wind direction as plausible reasoning.

But when I zig zag like a mad man in my buggy and can see the spit swerving to hit me from "stoopid" angles....
I've lost cars because of it. any chance this could be fixed to make sence?

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by 5thHorseman »

BlackRece wrote:Please tell me why worm spits follows a player and not travel in a straight line!?
So you can't cheese the aim, by zig-zagging like crazy. If they shoot they hit. Your bullets to the same to them so it's fair.

Anther reason probably is that combat is not the focus of the game and this was easier than programming the AI to lead their shots.

User avatar
KoblerMan
Fast Inserter
Fast Inserter
Posts: 184
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by KoblerMan »

ske wrote:Do the new enemies correlate with terrain and/or resources?

Would there be strong uranium-themed worms/biters living on/near uranium fields?

Do the sand-worms differ from land-worms or water-worms?

Do worms living close to the water or in shallow water snatch fishes if they swim too close?
I really like all of these points, I think they would make for a richer experience. It would also be cool if worms could burrow underground and re-emerge somewhere else; I had always wondered why something called a "Worm" is more of a base defense structure than an actual mobile enemy.

Make the sand worms look like the sandworms from Dune! The spice must flow!
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD

DaemosDaen
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat May 16, 2015 4:39 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by DaemosDaen »

*Looks at the new worm"
KILL IT!!!!! KILL IT WITH FIRE!!!!!!!

As for the keyboard stuff, it all sounds cool.

gnemonix
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Apr 27, 2014 10:06 pm
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by gnemonix »

Unfortunately, the scancode change will probable break Factorio on my computer (until I remap the keybinds) as I use a mechanical Dvorak keyboard that fakes the scancodes as QWERTY. The reason is because there is a button on the keyboard that enables fast switching between Dvorak and QWERY.

This is my keyboard: http://matias.ca/dvorak/
Keyboard with layout selection switch
On Linux I used the program showkey (sudo showkey) to test the keycode for the same key (QWERTY [Z]) on both Dvorak and Qwerty using the switch-layout button on the keyboard:

Dvorak [;] -> 39
Qwerty [Z] -> 44

Actual output:

Code: Select all

press any key (program terminates 10s after last keypress)...
keycode  28 release
;keycode  39 press
keycode  39 release
zkeycode  44 press
keycode  44 release
Same physical key, two unique codes.


So although I may have to remap all my keys (again) in the near future, I'm still looking forward to all the neat changes coming to Factorio. Keep up the great work!

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by Koub »

Best layout ever
Also, as a French, I confirm we use Z, Q, S, D instead of W, A, S, D (same key locations), but most "handling" shortcuts are based on the char, not the key location :
Ctrl-C for copy, Ctrl-V for paste, Ctrl X for cut, Ctrl-Z for undo, Ctrl-W for close tab, Ctrl-A for select all, Ctrl-S for save, Ctrl-F for find, and Ctrl-Y for redo (less universal, some apps have other keybinds, but it's the one I'm used to).
Koub - Please consider English is not my native language.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Friday Facts #259 - Scan-codes, Prototype IDs, HR worm

Post by eradicator »

What interests me most is: Will it have mod support?
I.e. will mods be able to specify scancodes for custom hotkeys, or is all the magic hidden in the backend?

Also the worm still looks a bit plain, i.e. lacking detail/grittyness. Maybe that's because of the shiny red color?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “News”