SharpSteroids is a high-performance recreation of the classic arcade game Asteroids, built entirely in C# targeting .NET 10.
This project was a "side quest" challenge to build a mini-game engine abstraction capable of vector-based physics and procedural level generation, rendered purely via ASCII/Unicode characters in the system console.
- No External Game Libraries: Built without Unity, MonoGame, or SDL. Just raw .NET.
- Engine Abstraction: Implemented a custom pipelines.
- Math: Custom 2D vector physics for thrust, drag, and collision detection.
- Procedural Generation: Endless waves of asteroids with increasing difficulty.
The game runs directly in your terminal.
- Controls:
↑/W: Thrust←/→orA/D: Rotate ShipSpace: FireEsc: Quit
- Objective: Destroy all asteroids. Large asteroids break into smaller ones. Don't get hit.
The solution is built on a custom "Console Frame Buffer" approach:
- Input Loop: Asynchronous interception of keypresses.
-
Update Loop: Calculates delta time (
$dt$ ), updates position vectors, and handles torus-wrapping (screen wrap). -
Render Loop: Writes a 2D char array buffer to the Console
StdOutin a single pass to minimise flickering.
Prerequisites: .NET 10 SDK (Preview or Latest Daily Build).
- Clone the repository:
git clone repo_url
- Navigate to the directory:
cd AsteroidsGame - Run the application:
dotnet run -c Release
Note: For the best visual experience, use a terminal that supports ANSI escape codes (Windows Terminal, PowerShell Core, or iTerm2).
This project is IN PROGRESS. It was created as a specific coding challenge and is provided as-is for educational purposes. Pull requests and issues are not monitored (mainly because I cannot be bothered).
Distributed under the MIT License.