roguelike-tutorial

module
v0.0.0-...-bda8521 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2020 License: BSD-3-Clause

README

ACTIVE YES

Roguelike-tutorial-2020

Controls
Compilation
Distribution

CONTROLS

↑ Go Ahead
↓ Go Back
← Turn Left
→ Turn Right
ALT + ← Strafe Left
ALT + → Strafe Right

COMPILATION

Compilation on Linux
  1. Install Go
  2. Download BearLibTerminal
  3. Put libBearLibTerminal.so into /usr/lib
  4. Move BearLibTerminal.go and BearLibterminal.h into roguelike-tutorial/bearlibterminal
  5. go mod init roguelike. Now you can import library using go modules import (blt "roguelike/bearlibterminal)
  6. go build -ldflags="-X 'main.releaseDate=$(date -u +%F_%T)'"
Cross Compile on Linux for Windows
  1. apt install gcc-mingw-w64-x86-64 gcc-multilib
  2. Put windows BearLibTerminal.dll and BearLibTerminal.lib into /usr/x86_64-w64-mingw32/lib
  3. GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -ldflags="-X 'main.when=$(date -u +%F_%T)'" -o roguelike.exe

Distribution

Linux

Package in the same folder

  • roguelike binary
  • libBearLibTerminal.so
  • start.sh which contains LD_LIBRARY_PATH="$(dirname "$0")" "$(dirname "$0")/roguelike"
  • assets folder

enter the folder and execute ./start `

Windows

Package in the same folder

  • roguelike.exe
  • BearLibTerminal.dll
  • assets folder

enter the folder and double click roguelike.exe

Directories

Path Synopsis
bltClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL