module
Version:
v0.0.0-...-bda8521
Opens a new window with list of versions in this module.
Published: Aug 5, 2020
License: BSD-3-Clause
Opens a new window with license information.
README
¶

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
- Install Go
- Download BearLibTerminal
- Put libBearLibTerminal.so into /usr/lib
- Move BearLibTerminal.go and BearLibterminal.h into roguelike-tutorial/bearlibterminal
go mod init roguelike
. Now you can import library using go modules import (blt "roguelike/bearlibterminal)
go build -ldflags="-X 'main.releaseDate=$(date -u +%F_%T)'"
Cross Compile on Linux for Windows
apt install gcc-mingw-w64-x86-64 gcc-multilib
- Put windows BearLibTerminal.dll and BearLibTerminal.lib into /usr/x86_64-w64-mingw32/lib
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
¶
bltClient
|
|
|
|
Click to show internal directories.
Click to hide internal directories.