Skip to content

ManuLinares/c3-asteroids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asteroids

Asteroids clone written in C3. Software-rendered. Window and input via RGFW. Audio via miniaudio.

Asteroids gameplay
🚀 Click here to play in the browser! 🚀

Dependencies

  • C3 compiler (c3c in PATH)
  • Linux: gcc, clang, wayland-scanner, git, and dev libraries for X11/Wayland.
  • MacOS: Xcode Command Line Tools
  • Windows cross-compilation: mingw-w64 and MSVC SDK (via c3c fetch-sdk windows).
  • Web: Emscripten.

Build and Run

Before the first build on any platform, you must prepare the C dependencies (RGFW and miniaudio):

1. Build Dependencies

Choose your target platform:

# For Linux
c3c build linux-deps --trust=full

# For macOS
c3c build macos-deps --trust=full

# For Windows (cross-compile from Linux)
c3c build windows-deps --trust=full

2. Build the Game

# Linux
c3c run linux

# macOS
c3c run macos

# Windows
c3c build windows

# Web (WASM)
c3c build web --trust=full
# This target handles dependencies and linking in one step.
# Serve the build/ directory using any local web server.

Controls

Key Action
WASD/Arrow Keys Thrust, Rotate, Brake
Space Fire
E Hyperspace
Escape Quit
P Pause
C Cheat mode

Tip

Use --trust=full when running/building to allow the project.json to execute the dependency build scripts.

About

Asteroids game made with the C3 language

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages