Skip to content

A small top‑down 2D, tile‑based game re‑released with SDL2 for cross‑platform builds; uses plain‑text maps and XPM sprites.

Notifications You must be signed in to change notification settings

nands93/and_goodbye

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

And Goodbye — College Game Re-release (SDL2)

Game Screenshot

A small top‑down game originally built for college coursework, now re-released using SDL2 for portability.

  • Rendering, input, and windowing are implemented with SDL2 and SDL2_image.
  • Maps are plain-text grids validated at load time.
  • Assets are simple XPM bitmaps.

Repository Layout

Build

Prerequisites:

  • Linux/macOS: SDL2 + SDL2_image development packages
    • Debian/Ubuntu: sudo apt install libsdl2-dev libsdl2-image-dev
    • Fedora: sudo dnf install SDL2-devel SDL2_image-devel
    • macOS (Homebrew): brew install sdl2 sdl2_image
  • Windows: MinGW-w64 (or MSYS2/mingw), uses bundled DLLs in lib/ and bin/

Commands:

  • Build (release): make
  • Build (debug): make debug
  • Clean objects: make clean

The output binary is and_goodbye (Linux/macOS) or and_goodbye.exe (Windows).

Run

  • Linux/macOS:

    • ./and_goodbye maps/map.ber
  • Windows:

    • and_goodbye.exe maps\map.ber
    • Ensure SDL2.dll and SDL2_image.dll are on PATH or next to the executable (see bin/).

    Game Screenshot

Usage

  • The game expects a .ber map file path as the first argument.
  • Close the window or use the platform’s standard close action to quit.
  • Keyboard handling is implemented in src/movement.c.

Maps

Game Screenshot

Troubleshooting

  • "ERROR: FILE NOT FOUND" — the provided map path is wrong or unreadable.
  • "ERROR: EMPTY MAP" — the file has no content.
  • "Error\nMAP SHOULD BE A RECTANGLE" — inconsistent line lengths.
  • "Error\nMAP MUST BE SURROUNDED BY WALLS 1" — outer border is not walls.

On Linux/macOS, missing libraries at link/runtime usually means SDL2/SDL2_image dev/runtime packages aren’t installed.

Notes

  • Assets are XPM files referenced in include/and_goodbye.h (e.g., character and environment sprites under img/).
  • Windows build uses -I\include\SDL2 -L\lib from the Makefile and links -lmingw32 -lSDL2main -lSDL2 -lSDL2_image.

License

This project depends on SDL2 and SDL2_image; see their respective licenses in the SDL distributions. Project source and assets are provided for educational

About

A small top‑down 2D, tile‑based game re‑released with SDL2 for cross‑platform builds; uses plain‑text maps and XPM sprites.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages