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

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

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

Post by daniel34 » Fri Sep 07, 2018 5:26 pm

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 1137 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.

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

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

Post by porcupine » Fri Sep 07, 2018 5:34 pm

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
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 08, 2018 2:16 pm

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

Post by BlueTemplar » Fri Sep 07, 2018 5:43 pm

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

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

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

Post by Demongornot » Fri Sep 07, 2018 6:00 pm

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: 448
Joined: Sun Apr 10, 2016 8:31 pm

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

Post by Gergely » Fri Sep 07, 2018 6:03 pm

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: 2757
Joined: Thu Dec 25, 2014 7:30 am

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

Post by daniel34 » Fri Sep 07, 2018 6:38 pm

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.

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

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

Post by Dry Hairy Tree » Fri Sep 07, 2018 6:56 pm

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: 414
Joined: Wed Jul 12, 2017 5:45 pm

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

Post by Oktokolo » Fri Sep 07, 2018 7:26 pm

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

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

Post by RamsesIV. » Fri Sep 07, 2018 7:48 pm

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

luziferius
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Jun 01, 2017 12:59 pm

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

Post by luziferius » Fri Sep 07, 2018 8:38 pm

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: 54
Joined: Sat Oct 15, 2016 4:58 am

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

Post by porcupine » Fri Sep 07, 2018 9:04 pm

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
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 08, 2018 2:16 pm

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

Post by BlueTemplar » Fri Sep 07, 2018 9:37 pm

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 924 times
or like :
this :
Image
(hopefully in color soon)
(but I'll have to research these "neo" keyboard layouts too!)

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

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

Post by rkfg » Fri Sep 07, 2018 9:52 pm

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

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

Post by BlackRece » Fri Sep 07, 2018 10:48 pm

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
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jun 10, 2016 11:21 pm

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

Post by 5thHorseman » Fri Sep 07, 2018 11:42 pm

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.
"So you completed the game with a spaghetti factory? Well I hand crafted a rocket and threw it into space with my bare hands!"

User avatar
KoblerMan
Long Handed Inserter
Long Handed Inserter
Posts: 84
Joined: Sat Mar 05, 2016 12:59 am

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

Post by KoblerMan » Sat Sep 08, 2018 12:50 am

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!
Image[url=steam://friends/add/'.76561198068170153.']Image[/url]
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD FX 8350 (@~4.0 gHz)
GPU: Nvidia GTX 770
RAM: Corsair 32GB DDR3 (@~5200 MHz)
DRIVES: Kingston 256GB SSD, WD Black 6TB HDD

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

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

Post by DaemosDaen » Sat Sep 08, 2018 2:46 am

*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: 12
Joined: Sun Apr 27, 2014 10:06 pm

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

Post by gnemonix » Sat Sep 08, 2018 4:59 am

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: 3876
Joined: Fri May 30, 2014 8:54 am

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

Post by Koub » Sat Sep 08, 2018 6:05 am

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: 2604
Joined: Tue Jul 12, 2016 9:03 am

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

Post by eradicator » Sat Sep 08, 2018 8:22 am

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: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

Post Reply

Return to “News”