Skip to content

FLAK-ZOSO/Inavjaga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inävjaga

Inävjaga is a Sista-based C++ terminal videogame.

Inävjaga banner

Installation

From release executable

You can download the latest release executable for your operative system from the releases page.

Inavjaga.Windows.instructions.mp4

This approach is unlikely to work for MacOS users for the following reasons:

  • the game is not signed, so it will be blocked by the system;
  • the game is not statically linked and that's impossible to achieve by Apple's design choices despite various attempts to do so; Thus, if you are a MacOS user, you should compile the game (and the sista library) from source as explained below.

From source

This approach allows you to customize the game (by editing constants.hpp) and access the source code.

The requisites for this approach are:

  • familiarity with the shell that your operative system provides
  • git version control system
  • g++ compiler, must support ISO C++17 or GNU C++17
  • make utility

You can potentially use just g++ and copy-paste the commands from the Makefile or from below. The same goes for git, you can download the source code as a ZIP archive, but using git is recommended for pulling updates without downloading the whole archive again.

You can clone the repository and compile the game from source as follows:

git clone https://github.com/FLAK-ZOSO/Inavjaga
cd Inavjaga
make

On Windows (MinGW/MSYS2), the Makefile can automatically vendor Sista from source into include/sista and compile it locally.

make USE_LOCAL_SISTA=1 STATIC=1

The first local build will clone FLAK-ZOSO/Sista into .deps/Sista and copy include/sista from there.

If you don't have make installed, you can copy and paste the following commands in your terminal after having manually copied `FLAK-ZOSO/Sista:/include to the right location:

git clone https://github.com/FLAK-ZOSO/Sista
cp -r Sista/include/* include/

How to do that in Bash

g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c inavjaga.cpp -o inavjaga.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/inventory.cpp -o src/inventory.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/entity.cpp -o src/entity.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/portal.cpp -o src/portal.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/player.cpp -o src/player.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/archer.cpp -o src/archer.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/worm.cpp -o src/worm.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/wall.cpp -o src/wall.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/bullet.cpp -o src/bullet.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/chest.cpp -o src/chest.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/mine.cpp -o src/mine.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c src/enemyBullet.cpp -o src/enemyBullet.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c include/sista/ANSI-Settings.cpp -o include/sista/ANSI-Settings.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c include/sista/border.cpp -o include/sista/border.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c include/sista/coordinates.cpp -o include/sista/coordinates.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c include/sista/cursor.cpp -o include/sista/cursor.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c include/sista/field.cpp -o include/sista/field.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -c include/sista/pawn.cpp -o include/sista/pawn.o
g++ -std=c++17 -Wpedantic -Wno-narrowing -g -o inavjaga inavjaga.o src/inventory.o src/entity.o src/portal.o src/player.o src/archer.o src/worm.o src/wall.o src/bullet.o src/chest.o src/mine.o src/enemyBullet.o include/sista/ANSI-Settings.o include/sista/border.o include/sista/coordinates.o include/sista/cursor.o include/sista/field.o include/sista/pawn.o -lpthread

After compiling the game, you can run it with:

# On Linux and MacOS (or other Unix-like systems)
./inavjaga
# On Windows (cmd.exe, while PowerShell goes with `.\inavjaga.exe`)
inavjaga.exe

If you compile the game from source, you will be able to customize and rebalance the game by editing the constants.hpp file and not only.

Description

Purpose

Your character is represented by the $ symbol and is surviving day by day hunting for food and protecting its home from the dangers of the tunnels.

Home area

If the enemies will reach home, no hopes will be left, so you need to defend it at all costs.

Worms

The tunnels are haunted by worms such as the one represented below.

>>>>
   v
   v>H

Vulnerable to headshots, worms leave behind clay that can be used to craft mines.

Archers

The archers are smart enemies who know well the tunnels and can move through the breaches in the walls.

A

They can shoot you from a distance, so you need to be careful when they are around. If you manage to kill them, you can harvest their arrows.

Resources

The game features various resources that you can collect:

  • Clay: can be used to craft mines; it is left behind by worms;
  • Bullets: can be fired; as such both archers' arrows and worms' scales can be used as bullets;
  • Meat: is eaten to avoid starving; it is dropped by worms and archers;

Portals

The game features portals that can be used exclusively by the player to travel between different areas of the tunnels.

&

Instructions

Controls

The controls for motion are:

  • W, A, S, D: move the character; both uppercase and lowercase letters work;

The controls for executing actions are:

  • I, J, K, L: interact with the world; both uppercase and lowercase letters work;

The controls for switching modes are:

  • c: switch to the collect mode; both uppercase and lowercase letters work;
  • b: switch to the shoot bullet mode; both uppercase and lowercase letters work;
  • m: switch to the build mine mode; both uppercase and lowercase letters work;
  • e: switch to the dump chest mode; both uppercase and lowercase letters work; lowercase q works too;

The controls for game actions are:

  • Q: quit the game; only uppercase letter works;
  • p: pause the game and force reprint of the screen; both uppercase and lowercase letters work; . works too;
  • +, -: speed up/down the game by a factor of 4; both + and - work;

About

Inälvor jagade - Sista based C++ terminal videogame

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Contributors