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> |
Rock Paper Scissors | 0 | <sub> |
Dice Game | 0 | <sub> |
Flash Cards | 0 | <sub> |
Quick Draw | 1 | <sub> |
Tug Of War | 1 | <sub> |
Whack A Mole | 1 | <sub> |
Tic Tac Toe | 1 | <sub> |
Simon | 1 | <sub> |
Roll And Move | 1 | <sub> |
Beep Pad | 1 | <sub> |
Draw | 1 | <sub> |
Tower Of Hanoi | 1 | <sub> |
Clicker | 1 | <sub> |
Hangman | 2 | <sub> |
Lights Out | 2 | <sub> |
Wordle | 2 | <sub> |
Memory | 2 | <sub> |
Connect 4 | 2 | <sub> |
Minesweeper | 2 | <sub> |
Wumpus World | 2 | <sub> |
Rythm | 2 | <sub> |
Type | 2 | <sub> |
Drive | 2 | <sub> |
Sliding Puzzle | 2 | <sub> |
Snake | 3 | <sub> |
Word Search | 3 | <sub> |
Hurdles | 3 | <sub> |
Pong | 3 | <sub> |
Flappy Bird | 3 | <sub> |
Oligopoly | 3 | <sub> |
Reversi | 3 | <sub> |
Darts | 3 | <sub> |
Yahtzee | 4 | <sub> |
Tanks | 4 | <sub> |
Helicopter | 4 | <sub> |
2048 | 4 | <sub> |
Sudoku | 4 | <sub> |
Mancala | 4 | <sub> |
Bound | 4 | <sub> |
Tents | 4 | <sub> |
Battleship | 4 | <sub> |
Checkers | 4 | <sub> |
Duck Hunt | 5 | <sub> |
Blackjack | 5 | <sub> |
Fighter | 5 | <sub> |
Maze | 5 | <sub> |
PacMan | 5 | <sub> |
Gravity | 5 | <sub> |
Tetris | 5 | <sub> |
Shmup | 5 | <sub> |
Role Playing Game | 6 | <sub> |
Console Monsters | 7 | <sub> |
First Person Shooter | 8 | <sub> |
<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>