Skip to content
/ bttext2 Public

Action Text Advicure Engine - reimplementaiton of bttext

Notifications You must be signed in to change notification settings

neosam/bttext2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

    /\  /\   |\ |-- |\           |\        ___ |\ o      |\  |  __ |   |--
   /  \/  \  |< |-  |/ |\/| |  | | | /\     |  |/ |  /\  | \ | /   |   |-
  /____\___\ |/ |-- |\ |  |  \/  |/ /--\    |  |\ | /--\ |  \| \_\ \__ |-- 2
 <-Textversion-------------The future depends on you---------------Readme->

 /\\ Content:

 /1\\   What is Bermuda Triangle

 A game I plan to finish for about 15 years :).


 /1.1\\  What is bttext

It is the text based engine of the game which can and will also be used for
other games.


/1.2\\  Status

The first version of the engine was written in python.  Since I don't like the
code anymore I decided to rewrite it in Ocaml.  This version has a much clearer
MVC architecture which has for example the opportunity to compile a web based
version by replacing some modules.


/1.3\\  Ingame

There is no ingame yet.  The first example game will be "Story of Lalala" which
is a stpid made up game to test the engine.


/1.4\\  License

GPLv2.  Free Software FTW!!!



/2\\  Getting started

/2.1\\  Compile

You will need the ocaml compiler and its the curses bindings to compile it.  
Then you can run ./compile.sh and you should get a ./lalala file.


/2.2\\  Run

Run ./lalala


/2.3\\  Controls

q exits the game :)



/3\\  Internal structure
/3.0\\  About the code :)

Maybe you might think that the code is a bit unconsistent and breaks some
best practices in Ocaml.  Yes, and I don't disagree.  That's because this
project is my first Ocaml project and I started it with nearly no knowledge
of this language.  Now you might thing I could have read some best practices
before I start?  I absolutely agree:  I could.  But I didn't :P


/3.1\\  Layers

In the current state, the engine has three layers:
 * Ingame layer
 * Interpretation
 * IO

 
 /3.1.1\\ Ingame layer

Contains the main game logic and stores the map, persons, triggers and all
actions.

Current modules part of this layer:
 * btgame


/3.1.2\\  Interpretation layer

Is connected to the game layer, reads data like current state and action 
and pushes new actions like user input to it.  This data will be used and
the IO layer will be used to display it.

Current modules part of this layer:
 * btdisplay
 * btmessages
 * btmap

/3.1.3\\  IO Layer

This layer provides input and output functionalities for the interpretation
layer.
 * btio

/3.1.4\\  Why these layers?

The current implementation for curses is done in the btio module in the
IO layer.  What, if we want to create a web version of this game.   Then
we simply have to replace this single module and the whole game will
operate on a terminal simulation on the browser.

But what if we don't want a simple terminal but real html elements?  Then
we can create a html interpretation layer which observes the game will
become a full html5 game.

It can also be used to create a berrier-free version of the game.  The
interpretation layer can also act as a socket communication.  A server
can do the game logic and the client just visualizes it and sends the
user input.  

Anyway, it will be difficult to switch the interpretation layer since for
example the ascii art will make no sense in graphical games.

About

Action Text Advicure Engine - reimplementaiton of bttext

Resources

Stars

Watchers

Forks

Packages

No packages published