plbrault / youre-the-os

A game where you are a computer's OS and you have to manage processes, memory and I/O events.
https://plbrault.github.io/youre-the-os/
GNU General Public License v3.0
1.81k stars 69 forks source link

keyboard support #63

Closed jbrokamp closed 1 year ago

jbrokamp commented 1 year ago

Thank you for making a creative and fun game.

It could be nice to have some key bindings, like:

i'm not sure what would be a good way to bind the processes, however.

smiba commented 1 year ago

I feel like if this game got keyboard support we could start to see some real intense gameplay

plbrault commented 1 year ago

Mapping the I/O event button to a key (I'm thinking the spacebar) would be the easiest.

As for mapping numeric keys to CPU's, the only problem I see is that the game allows up to 16 CPU's.

jbrokamp commented 1 year ago

Thanks for taking it in consideration :) I also thought about it a bit more, so additional key suggestions:

plbrault commented 1 year ago

Using SHIFT for CPU's 9-16 is an interesting idea!

As for using WASD for selecting idle processes, I also thought about it but I'm not sure how that would be more efficient than using the mouse.

plbrault commented 1 year ago

Key bindings are now implemented.

For now, CPUs 1-9 are mapped to keys 1-9, CPU 10 is mapped to key 0, and CPUS 11-16 are mapped to Shift+1-6. I did not put CPUs on 2 rows as suggested because that would require reworking the whole interface, and I'm not sure a lot of people play the game with so many CPUs.

wviana commented 1 year ago

This feature was awesome. Got even cooler to play this