Skip to content

internethandwerker/SnakeGame

Repository files navigation

🐍 Retro Snake (Spectre & MonoGame Edition)

License Net Status

The Snake experience you didn't know you needed.

Beschreibung

Forget 4K textures and Raytracing. Wait, actually... we have graphical pixels now! This is Retro Snake, a fully modular, over-engineered, SOLID-compliant implementation of the Nokia classic, running in your Windows Console OR as a graphical window. Powered by .NET 10, Spectre.Console and now MonoGame.

🚀 Why this isn't just "another Snake clone"

We didn't just write a while(true) loop and call it a day. We built an engine.

  • 🏗️ Architecture First: Built with Strategy Pattern for levels, Dependency Injection for services, and a Render Abstraction Layer that separates logic from the pixels. It's clean code you can eat off of.
  • 🎮 Dual Frontends:
    • TUI (Spectre.Console): Text-based, double-buffered ANSI magic for buttery smooth console gaming.
    • GUI (MonoGame): A shiny new graphical window with splash screens, smooth scaling and actual colored pixels.
  • 🔊 Audio: Yes, it beeps. (Using NAudio for that authentic retro crunch).

Beschreibung

🎮 Features & Levels

1. Level 1: Classic Mode 🍏

The vanilla experience. Eat red apples, get longer, don't hit the wall. A timeless masterpiece.

2. Level 2: Gluttony & Speed ⚡

Things get spicy.

  • Faster Base Speed.
  • Golden Apples: They appear rarely. Eating one gives you a Slow-Motion Matrix Effect but makes you grow ENORMOUSLY (+8 segments!). Risk vs. Reward at its finest.

3. Level 3: SNAKETRIS 🧱

Wait, what?

  • It's Snake.
  • It's Tetris.
  • It's Chaos.
  • Standard Tetrominoes (I, O, T, L, J) fall from the sky.
  • Rules: If a block hits your HEAD, you die. If it hits your body, it passes through like a ghost. Dodge the rain!

4. Level 4: Tron Mode (Remote AI) 🤖

  • gRPC Integration: Connects to a separate server process.
  • Smart(ish) AI: An opponent snake that tries to survive.
  • Trap it to win: Outlast the AI or force it to crash.

🔥 Difficulty Settings

Choose your pain tolerance in the Settings menu:

  • 👟 Schnürsenkel (Easy): For a relaxed Sunday drive. (Base 130ms)
  • 💦 Gartenschlauch (Medium): The intended experience. (Base 80ms)
  • ☠️ Gefahrnudel (Hard): Reflexes required. Only for the true Internet Handwerker. (Base 50ms)

🛠️ Installation & How to Run

👾 For Gamers (No Code Required)

Just want to play? Easy.

  1. Go to the Releases page on GitHub.
  2. Download the latest .zip file.
  3. Extract the zip file completely.
  4. Important: Start the SnakeGame.Server.exe first (keep it running in the background).
  5. Start SnakeGame.exe.
  6. Enjoy the Danger Noodle.

💻 For Coders (The Source Way)

You want to tinker? You need the bleeding edge .NET 10 SDK.

  1. Clone this repo.
  2. Open your terminal in the folder.
  3. Run the server (separate terminal, optional for local levels but required for Tron Mode):
    dotnet run --project SnakeGame.Server
  4. Run the game:
    dotnet run --project SnakeGame
  5. Navigate the menu to Settings -> Frontend to switch between TUI and MonoGame.
  6. Control the danger noodle with your Arrow Keys (or WASD in MonoGame).

🧠 For the Nerds (Architecture)

Beschreibung

We take our fun seriously.
  • GameEngine.cs: A passive, frontend-agnostic state orchestrator.
  • Logic/LevelStrategies.cs: Contains the LevelManager state machine.
  • Infrastructure/MonoGame: The new graphical frontend implementation with PixelFont rendering and state management.
  • Infrastructure/SpectreConsoleRenderer.cs: Translates the GameState into Canvas pixels for the terminal.
  • Models/GameState.cs: Pure data container (Record types where possible).

👋 "Hi. It's me..."

Hi. It's me, the Internethandwerker.

This project was (so far) completely vibe-coded using the Gemini CLI Preview and Gemini 3.

It's obviously a fun project, but for me, this wasn't really about writing a game. It was about answering a question: How well does raw vibe-coding actually work for me? How does it feel? What are the pitfalls? How do you fix bugs when you aren't writing the code line-by-line? How do you prompt effectively?

I'll publish my findings elsewhere (though by the time you read this, it's probably yesterday's news). But TL;DR: It was fun. It surprised me positively. And yes, it frustrated the hell out of me at times (dead ends are real).

Either way, I hope this "remix" of my ideas, AI generation, and ASCII characters makes sense to you. Maybe you'll have fun just running it. Or breaking it. Or making it better.

Take care. Happy coding.

Der Internethandwerker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors