In the past, I showed you how to keep yourself company with some virtual pets while coding in VS Code.
This time, I’ll show you something different: how to play games like Snake, Sudoku, or Tetris directly in VS Code.
This is possible because VS Code is built on web technologies like Electron. This means that anything that runs in a browser (HTML, CSS, and JavaScript) can run in VS Code, too, including games.
Let’s get started! 🕹️
📹 Prefer the video version of this article instead? Grab some popcorn and have fun! 🍿
Snake 🐍
I’ll start with probably one of the most well-known types of games of all time: Snake.
The snake game genre started with the release of the arcade game Blockade, developed by Gremlin and launched in 1976.

Blockade inspired hundreds of similar games, including the famous Snake game released by Nokia in 1998.
Games you can play in VS Code are actually extensions and are fun recreations, not real emulations of the original games.
That being said, let’s install the Visual Snake Code and see how we can play it.
To run the game, press CTRL
+ SHIFT
+ P
(or CMD
+ SHIFT
+ P
on macOS) and then run the Visual Snake Code command. Control the snake using W
, A
, S
, and D
keys.
When the game is over and you want to restart, make sure to place the caret outside the lines/text generated by the game, such as line 25
in my case.

Chrome Dinosaur Game 🦖
Let’s move on to a very popular game among Chrome users who suddenly lost internet access: Dinosaur Game.
It was developed by Google in 2014, and in 2018, it was revealed that about 270 million games were played monthly.
To play this game, you don’t need VS Code. You can either disconnect from the internet or, more easily, use a Chromium-based browser and go to chrome://dino
.
But since we’re talking about VS Code, you can install the Chrome Dinosaur Game extension.
After that, click the dinosaur icon in the Activity Bar, and then press the Start button.

Sudoku 🔢
Next up is Sudoku, a logic-based number puzzle where you fill a grid so that each row, column, and region contains the digits (usually 1 – 9), without repeating.
This game is so captivating for some that, in June 2008, an Australian drug-related jury trial costing over A$1 million was aborted when it was discovered that some of the twelve jurors had been playing Sudoku instead of listening to the evidence ⚖️
To play this game, you can install the Sudoku Game extension.
After that, click the Sudoku icon in the Activity Bar and have fun!

Tetris 🟪
Another game that is very well-known and is still played by millions of people in various shapes and forms is Tetris.
Tetris was created by Alexey Leonidovich Pajitnov in 1985, and it was inspired by the pentomino puzzle games.
To play this game, you can install the Tetris Game extension by Xiaofeng or the Tetris extension by HarryHopkinson. For this example, I’ll go with the first one.
After installation, click the Tetris icon in the Activity Bar and press the Start button.

Escape the Maze 🐤
Next up on the list is the Escape the Maze by Ivan Mota.
To play this game, you can install the Escape The Maze – VS Code Game extension.
Then open the Explorer and ESCAPE THE MAZE
should be the last tab on the left menu.
You are playing as a chicken, and you have to traverse a series of randomly generated mazes. You have to drag to visualize the force that will be applied to the chicken, and then release the mouse to apply the force. The arrow button at the bottom right of the screen marks the exit.

Doom 🔥
Last but not least, the sixth and final game on the list is Doom.
Because why not? If you can run Doom in Notepad, why shouldn’t you be able to run it in VS Code too?
To play Doom, you can install the vscode-doom extension.
Then press CTRL
+ SHIFT
+ P
(or CMD
+ SHIFT
+ P
on macOS) and execute the Open Doom
command.
As I mentioned at the beginning of the article, the games are not running through an emulator. In Doom’s case, it runs using WebAssembly.

I hope this article sparked your curiosity to explore using VS Code for more than just coding. Thanks for sticking around and sharing a bit of that old-school nostalgia with me 💜
Let me know what you think about this article in the comments section below.
If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.