Skip to content

Oakamoore/keywords

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

A terminal based typing game, inspired by wspeed and typespeed. It uses FTXUI to handle rendering in the terminal, and miniaudio to play audio files - which were generated using AutoTracker.

demo.mp4

Unmute to hear game audio

A terminal emulator that supports a 256 colour palette and ANSI escape codes is required for this program to function as expected

Choose between three different difficulties, that scale with each word that is typed, and aim for highscores to enter your name in the local leaderboard.

Installation

A C++20 compatible compiler is required for this program to function as expected

  1. Clone this project
git clone https://github.com/Oakamoore/keywords.git
  1. Step into the repository
cd keywords

Standard Build (Native)

  • Build the project using CMake
# Configure the build
cmake -S . -B build

# Build project binaries
cmake --build build

WebAssembly Build

# Configure the build (in a separate directory)
emcmake cmake -S . -B bulid.em

# Build project binaries
cmake --build build.em

Emscripten does not support Visual Studio's CMake Generator, it is recommended to use either the MinGW Makefiles or Ninja generators.

To explicitly specify a generator use CMake's -G option followed by said generator's name, during the build configuration stage, i.e. -G "MinGW Makefiles".

A build configuration type (Debug, Release etc.) can also be specified, in both the native and WebAssembly builds.

Usage

Standard Build (Native)

Once the project is built, navigate to the keywords/build/ directory, locate the executable, then run the game using:

# Run the executable
./keywords

WebAssembly Build

Once the project is build, navigate to the keywords/build.em/ directory, then run the following:

# Start a local server
emrun keywords.html

Disabling Audio

In-game audio is enabled by default, though can only be disabled in native builds. To do so, append no-audio to the above native build command.

Testing

Catch2

By default, tests are disabled in native builds (and unavailable in WebAssembly builds). To build them alongside the program append -D ENABLE_TESTING=1 to the above build configuration command.

Once the project is built navigate to keywords/build/tests/, locate the testing executable, then run the tests using:

./keywords-tests

Planned Features and Contributions

There are plans to add support for different languages, and game modes.

This project is currently not open to contributions, though you are of course free to fork it and extend it in any way you deem fit. If you encounter any bugs, feel free to create an issue.