Skip to content

Sid-Bhatia-0/SimpleTextAdventure.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleTextAdventure.jl

A simple game engine to create text adventure games.

Stories are configured in yaml files. See examples/story.yaml for how to create a story. It is essentially a list of scenes with each scene having a name, some text, and a list of choices, where each choice has a text and a next_scene corresponding to that choice.

The engine simply runs the state machine where each state is a scene and the actions are the choices that the player can make in that scene. Selecting a choice will take you to its corresponding next scene.

Getting started

To play the demo game

  1. Clone the repository
git clone https://github.com/Sid-Bhatia-0/SimpleTextAdventure.jl.git
  1. Go to the examples directory and run the julia REPL
julia --project=.
  1. Instantiate the project after going into Pkg mode by pressing ]
(examples) pkg> instantiate
  1. Exit the REPL and run the following command in the examples directory
julia --project=. play.jl story.yaml

This will start the game inside the terminal.

Compile the app

To compile the engine into a standalone executable (for your OS)

  1. Clone the repository
git clone https://github.com/Sid-Bhatia-0/SimpleTextAdventure.jl.git
  1. Go to the compile directory and run the following
julia --project=.
  1. Instantiate the project after going into Pkg mode by pressing ]
(compile) pkg> instantiate
  1. Exit the REPL and run the following command in the compile directory
julia --project=. compile.jl

This will create a directory called SimpleTextAdventureAppCompiled inside the compile directory.

To run the example game with the compiled app, go to SimpleTextAdventureAppCompiled/bin and run the following:

./SimpleTextAdventureApp ../../../examples/story.yaml

Releases

No releases published

Packages

No packages published

Languages