Skip to content

tyfkda/galangua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

96073b7 · Jan 11, 2024
Jan 11, 2024
Dec 7, 2020
Sep 9, 2020
Jan 11, 2024
Mar 31, 2023
Mar 20, 2023
Mar 31, 2023
Sep 17, 2020
Mar 19, 2020
Jan 24, 2022
Sep 13, 2020
Jan 24, 2022
Sep 17, 2020

Repository files navigation

Galangua

2D shoot 'em up game, written in Rust.

screenshot

Play in browser

How to play (Control)

  • Arrow key : Move left or right
  • Space key : Shoot a bullet

Requirement

  • Rust, Cargo
  • SDL2

MacOS

  • brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer
  • Set SDL2, SDL2_image, SDL2_mixer lib paths to LIBRARY_PATH environment variable.
SDL2=/opt/homebrew/Cellar/sdl2/2.0.X
SDL2_IMAGE=/opt/homebrew/Cellar/sdl2_image/2.0.X
SDL2_MIXER=/opt/homebrew/Cellar/sdl2_mixer/2.0.X
export LIBRARY_PATH="$LIBRARY_PATH:$SDL2/lib:$SDL2_IMAGE/LIB:$SDL2_MIXER/lib"

Windows : Install SDL2 libraries

  • Download SDL2-devel-2.0.x-VC.zip from SDL2, SDL2_image-devel-2.0.x-VC.zip from SDL2_image, and SDL2_mixer-devel-2.0.x-VC.zip from SDL2_mixer libraries
  • Unpack zip files and copy libraries into C:\Users\{Your Username}\.rustup\toolchains\{current toolchain}\lib\rustlib\{current toolchain}\lib

Build

$ cargo build --release

Run

$ cargo run --release

Command-line options

  • -s : Specify window scale (default: 3)
  • -f : Use fullscreen
  • --oo : Run object-oriented version

Browser version

Requirement

Build

$ cd galangua-wasm
$ make  # wasm-pack build
$ make start-server  # Start local server on port 8080

Release build

$ cd www
$ npm install
$ npm run build

Files are generated in galangua-wasm/www/dist

Assets