Awesome
<p align="center"> <a href=".github/resources/animated-banner-credit.md"><img width="600" src=".github/resources/animated-banner.gif?raw=true" ></a> </p> <h1 align="center"> dotnet-console-games </h1> <p align="center"> <a href="https://github.com/dotnet/dotnet-console-games"><img src=".github/resources/github-repo-black.svg" alt="GitHub repo"></a> <a href="https://docs.microsoft.com/en-us/dotnet/csharp/"><img src=".github/resources/language-csharp.svg" alt="Language C#"></a> <a href="https://dotnet.microsoft.com/download"><img src=".github/resources/dotnet-badge.svg" alt="Target Framework"></a> <a href="https://discord.gg/4XbQbwF"><img src=".github/resources/discord-badge.svg" alt="Discord"/></a> <a href="LICENSE"><img alt="License" src=".github/resources/license-MIT-green.svg" alt="License"></a> <a href="https://github.com/ZacharyPatten/Towel"><img src="https://github.com/ZacharyPatten/Towel/blob/main/.github/Resources/UsingTowel.svg?raw=true" alt="Towel"></a> </p> <p align="center"> Game examples implemented as .NET console applications primarily for providing education and inspiration. :) </p>Recommendation<br/> Play the games, pick a game you like, and try to code the game yourself from scratch.
Game | *Weight | Notes |
---|---|---|
Guess A Number | 0 | <sub> </sub> |
Rock Paper Scissors | 0 | <sub> </sub> |
Dice Game | 0 | <sub> </sub><br/><sup>*Community Contribution</sup> |
Flash Cards | 0 | <sub> </sub> |
Quick Draw | 1 | <sub> </sub> |
Tug Of War | 1 | <sub> </sub> |
Whack A Mole | 1 | <sub> </sub> |
Tic Tac Toe | 1 | <sub> </sub> |
Simon | 1 | <sub> </sub> |
Roll And Move | 1 | <sub> </sub> |
Beep Pad | 1 | <sub></sub><br/><sup><sub><sub></sub></sub> Only Supported On Windows OS</sup> |
Draw | 1 | <sub> </sub> |
Tower Of Hanoi | 1 | <sub> </sub> |
Clicker | 1 | <sub> </sub> |
Hangman | 2 | <sub> </sub> |
Lights Out | 2 | <sub> </sub> |
Wordle | 2 | <sub> </sub> |
Memory | 2 | <sub> </sub> |
Connect 4 | 2 | <sub> </sub> |
Minesweeper | 2 | <sub> </sub> |
Wumpus World | 2 | <sub> </sub> |
Rythm | 2 | <sub> </sub> |
Type | 2 | <sub> </sub> |
Drive | 2 | <sub> </sub> |
Sliding Puzzle | 2 | <sub> </sub> |
Snake | 3 | <sub> </sub> |
Word Search | 3 | <sub> </sub> |
Hurdles | 3 | <sub> </sub> |
Pong | 3 | <sub> </sub> |
Flappy Bird | 3 | <sub> </sub> |
Oligopoly | 3 | <sub> </sub><br/><sup>*Community Contribution</sup> |
Reversi | 3 | <sub> </sub> |
Darts | 3 | <sub> </sub> |
Yahtzee | 4 | <sub> </sub> |
Tanks | 4 | <sub> </sub> |
Helicopter | 4 | <sub> </sub> |
2048 | 4 | <sub> </sub> |
Sudoku | 4 | <sub> </sub> |
Mancala | 4 | <sub> </sub> |
Bound | 4 | <sub> </sub> |
Tents | 4 | <sub> </sub> |
Battleship | 4 | <sub> </sub> |
Checkers | 4 | <sub> </sub><br/><sup>*Community Contribution</sup> |
Duck Hunt | 5 | <sub> </sub><br/><sup>*Community Contribution</sup> |
Blackjack | 5 | <sub> </sub> |
Fighter | 5 | <sub> </sub> |
Maze | 5 | <sub> </sub> |
PacMan | 5 | <sub> </sub> |
Gravity | 5 | <sub> </sub> |
Tetris | 5 | <sub> </sub><br/><sup>*Community Contribution</sup> |
Shmup | 5 | <sub> </sub><br/><sup><sub><sub></sub></sub> Only Supported On Windows OS</sup> |
Role Playing Game | 6 | <sub> </sub> |
Console Monsters | 7 | <sub> </sub><br/><sup>*Community Collaboration</sup><br/><sup><sub><sub></sub></sub> Work In Progress</sup> |
First Person Shooter | 8 | <sub> </sub><br/><sup><sub><sub></sub></sub> Only Supported On Windows OS</sup> |
<sup>*Weight: A relative rating for how advanced the source code is.</sup> <br/> <sup>*Community Contribution: Special thanks to everyone who contributed games!</sup> <br/> <sup>*Community Collaboration: Games where multiple members of the community participated in the development!</sup>
<p align="center"> You can play the games in your browser: <br /> <a href="https://dotnet.github.io/dotnet-console-games"> <sub><img height="40"src=".github/resources/play-badge.svg" alt="Play Now"></sub> </a> <br /> <sup>Hosted On GitHub Pages</sup> </p>Local Setup
Clone the repository or download the repository and unzip the contents. dotnet-console-games
should build with any .NET build process, such as one of the following:
</p> </details> <details> <summary> Visual Studio Code <sub>[Expand]</sub> </summary> <p>
Install Visual Studio if not already installed.
Open the <sub></sub>
dotnet-console-games.slnf
file in Visual Studio.Run the games with the
Debug
->Start Debugging
(default hotkeyF5
) option in the menu strip. You can switch games by right clicking the projects in the solution explorer and using theSet as Startup Project
option.Note This is optional, but here are some settings you can change in Visual Studio.
</p> </details> <details> <summary> Command Line <sub>[Expand]</sub> </summary> <p>
Install the .NET SDK if not already installed.
Install Visual Studio Code if not already installed.
Open the <sub></sub>
root folder
of the repository in Visual Studio Code.Run the games using the
Start Debugging
green triangle button (default hotkeyF5
) in theRun and Debug
tab. You can switch games in the drop down next to theStart Debugging
button.Note The following files are included in the repository:
.vscode/extensions.json
<sub>recommends Vistual Studio Code extension dependencies</sub>.vscode/launch.json
<sub>includes the configurations for debugging the examples</sub>.vscode/settings.json
<sub>automatically applies settings to the workspace</sub>.vscode/tasks.json
<sub>includes the commands to build the projects</sub>Note You will be prompted to install the necessary Visual Studio Code extensions when you open the folder:
- ms-dotnettools.csharp <sub>C# support</sub>
</p> </details>
Install the .NET SDK if not already installed.
Run the games using the
dotnet run --project <PROJECT>
command where<PROJECT>
is the file path to one of the.csproj
files. For example, running thedotnet run --project Projects/Drive/Drive.csproj
command from the root of the repository will run theDrive
game.
Relevant Articles
Beginner's Guide To Console Input In C# <sub>August 1, 2020</sub><br/>
dotnet Console Games Tips And Tricks <sub>April 7, 2022</sub>
Get Involved
Want to show support? You can star the github repository.
Have any questions? Start a new discussion.
Find a bug or have a suggestion? Open an issue.
Want to chat with the developer(s)? Join the discord server.
Want to contribute? Look for open issues you can help with.
<br /> <p align="center"> <sub>Supported by the</sub> <br /> <a href="https://dotnetfoundation.org"><img width="300" src="https://raw.githubusercontent.com/dotnet-foundation/swag/main/logo/dotnetfoundation_v4_horizontal.svg" ></a> </p>