Skip to content

federicodangelo/SpaceExplorationGame

Repository files navigation

Space Exploration Game

Build Release

Play in Browser

A 2D procedural space exploration game built entirely using AI coding agents — an experiment to test the limits of AI-assisted game development.

About This Project

This project was created as an experiment to push the boundaries of what's possible when using AI coding agents for game development. The entire codebase — rendering, procedural generation, ECS architecture, audio synthesis, UI, and gameplay — was written by Claude (Opus 4.6 and Sonnet 4.6) through iterative prompting.

v1.1.0

  • AI Models: Claude Opus 4.6 and Claude Sonnet 4.6
  • Total Development Time: ~8 days of on-and-off work
  • Lines of Code: ~28,000 (all AI-generated)
  • (Cost tracking discontinued)

v1.0.0

  • AI Model: Claude Opus 4.6
  • Total Cost: ~$50 USD in API/token usage
  • Development Time: ~4 days of on-and-off work
  • Lines of Code: ~18,000 (all AI-generated)

Features

  • Procedural Galaxy — Seed-based deterministic generation of star systems, planets, moons, asteroid belts, and space stations
  • Multiple Scales of Play — Fly your ship through solar systems, land on planets, explore surfaces on foot or by vehicle, enter stations and settlements
  • Ship, Vehicle & Avatar Customization — Upgradeable equipment slots for weapons, shields, engines, armor, and more
  • Combat — Space combat against pirates, traders, and patrols; surface combat against fauna and bandits
  • Procedural Audio — Fully synthesized music and sound effects at runtime (no audio files)
  • Procedural Pixel Art — All textures generated at runtime (sphere-shaded planets, glow stars, pixel-art sprites)
  • Mission System — Accept and complete missions from station/settlement boards
  • Mining — Mine asteroids and surface rocks for resources
  • Galaxy & System Maps — Navigate between star systems via FTL jumps

Tech Stack

  • Language: C# / .NET 10
  • Desktop Platform: SDL3 via SDL3-CS
  • Browser Platform: WebAssembly (.NET 10 WASM + Canvas 2D API via JS interop)
  • ECS: Arch ECS with Arch.System extensions
  • Audio: SDL3 built-in audio API (desktop) / Web Audio API (browser) — fully procedural synthesis (no external audio files)

Screenshots (v1.1.0)

Screenshot 1 Screenshot 2

Screenshot 3 Screenshot 4

Screenshot 5 Screenshot 6

Screenshot 7 Screenshot 8

Screenshot 9 Screenshot 10

Screenshot 11 Screenshot 12

Screenshot 13 Screenshot 14

Screenshot 15 Screenshot 16

Screenshot 17 Screenshot 18

Screenshot 19 Screenshot 20

Screenshot 21 Screenshot 22

Screenshots (v1.0.0)

See docs/SCREENSHOTS_V1.0.0.md (includes video demo).

Building & Running

Desktop (SDL3)

# Requires .NET 10 SDK
dotnet run --project Game.Sdl
# or use the convenience script:
run-sdl.bat

Browser (WebAssembly)

# Requires .NET 10 SDK + dotnet-serve
dotnet tool install -g dotnet-serve
run-web.bat         # build and serve at http://localhost:8080
watch-web.bat       # build + watch mode with auto-rebuild

Command line options

dotnet run --project Game.Sdl -- [--seed|-s <seed>] [--location|-l <location> [--sublocation|-sl <sublocation>]]
dotnet run --project Game.Sdl -- [--seed|-s <seed>] [--location|-l <location> [--sublocation|-sl <sublocation>]] [--showcase|-sc <showcase> [--star-type <type>]]
Argument Description
--help, -h, /? Show CLI usage help and exit.
--seed <seed>, -s <seed> Optional explicit seed for deterministic world generation. If omitted, a random seed is used.
--location <location>, -l <location> Target top-level start location (system, station, planet, settlement).
--sublocation <sublocation>, -sl <sublocation> Target sub-location for the selected location (see matrix below).
--showcase <showcase>, -sc <showcase> Launch a debug showcase directly (star-type, planet-type, asteroid, surface-mining).
--star-type <type> Optional star class override for --showcase star-type (default: G).

Location / sub-location matrix

--location --sublocation values
system (omit or use none)
station orbit, docked, inside
planet orbit, landed, on-foot, on-vehicle
settlement above, inside, on-foot, on-vehicle

Examples

dotnet run --project Game.Sdl
dotnet run --project Game.Sdl -- --help
dotnet run --project Game.Sdl -- --seed 12345
dotnet run --project Game.Sdl -- -s 12345
dotnet run --project Game.Sdl -- --location system
dotnet run --project Game.Sdl -- -l station -sl docked
dotnet run --project Game.Sdl -- --location station --sublocation docked
dotnet run --project Game.Sdl -- --seed 42 --location planet --sublocation on-foot
dotnet run --project Game.Sdl -- --location settlement --sublocation on-vehicle
dotnet run --project Game.Sdl -- --showcase planet-type
dotnet run --project Game.Sdl -- --showcase star-type --star-type K

Code Formatting

# Check and apply formatting locally
dotnet format SpaceExplorationGame.slnx whitespace

# CI-style check (fails if formatting changes are needed)
dotnet format SpaceExplorationGame.slnx whitespace --verify-no-changes

Pre-commit hook

# Enable repository hooks (one-time per clone)
git config core.hooksPath .githooks

The pre-commit hook validates formatting before each commit using the same whitespace check as CI.

Project Structure

See docs/ARCHITECTURE.md for a detailed breakdown of the codebase architecture, ECS components, rendering pipeline, and game state management.

License

This project is provided as-is for educational and experimental purposes.

About

Space exploration game (POC - Using AI tools)

Resources

Stars

Watchers

Forks

Contributors

Languages