Otherwise, the game runs as a normal(ish) game of Tetris. Then, the game (running locally on the user's computer) connects to the websocket server and listens for commands. The websocket server simply broadcasts any message it receives to everything it is connected to. When a valid command is entered into Twitch Chat, it is forwarded on to the websocket server. How I built itĪn Azure VM runs two scripts, one of which connects to the Twitch Chat via IRC, and the other runs a websocket server. The game is also controllable via the arrow keys and the "c" key, if the game is opened directly in a browser. Players type commands such as "l" and "r" in to chat, and those directly control the game of Tetris shown on the stream. In the past, concepts such as "Twitch Plays Pokémon" have become rather popular, and so I decided to try to make my own version of a "Twitch Plays" game.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |