Skip to content

anthony-gilbert/emberbound

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Emberbound - C 2D Platform Game Developed with Raylib

Build Commands

# Build main game (Linux)
gcc main.c -o emberbound -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

# Build 2D camera example (Linux)
gcc 2d-camera.c -o 2d-camera -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

# Build (macOS)
clang main.c -o emberbound -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm

# Build (Windows/MSYS2)
gcc main.c -o emberbound.exe -lraylib -lopengl32 -lgdi32 -lwinmm

Code Style Guidelines

Naming Conventions

  • Functions: PascalCase for public functions (PlayerInit, PlayerUpdate, PlayerDraw)
  • Variables: camelCase (player, envItems, cameraOption)
  • Constants: UPPER_SNAKE_CASE (SCREEN_W, SCREEN_H, GROUND_Y)
  • Structs: PascalCase (Player, EnvItem)
  • Enums: Anonymous enums with UPPER_SNAKE_CASE values

Code Organization

  • Use static inline for small utility functions (clampf)
  • Group related constants at the top of files
  • Use typedef struct for data structures
  • Function declarations before main() when needed

Formatting

  • K&R brace style with opening brace on same line
  • 4-space indentation
  • No trailing whitespace
  • Compact struct initialization: (Vector2){ x, y }
  • Use designated initializers for clarity

Dependencies

  • Core: raylib.h, raymath.h
  • Standard: stdbool.h, math.h
  • Build system: Uses nob.h (NoBuild) for build automation

About

A 2-D Plarformer game written in C with Raylib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages