Rock, Paper, and Scissors online multiplayer minigame project to put into practice some SvelteKit and socket.io knowledge π
β¬οΈβ‘οΈβ¬οΈβ¬ οΈ - Move
β
βSPACEβ
β - Change charπ±οΈ - Challenge players
ποΈ - Record messages
β
βESCβ
β - Close modals
You can open two tabs to see it in action if nobody is there. Use arrow keys to walk, press space to change char and esc to close modals.
The chat/recording system uses Web Speech API.
Works better on Chrome (to see the API in action using Firefox, you have to change some flags under about:config) π
It is possible to give some commands using that API, but I did not go too deep in that. You can test it by saying "alerta".
/blob/master/src/lib/components/Chat.svelte #46
let isCommand = (text: string) => {
if (text === "alerta") {
alert("Exemplo de comando")
return true
}
return false
}
Deploy: