Giter VIP home page Giter VIP logo

adventureawaits's Introduction

NAME

Adventure Awaits - a friendly text adventure game

SYNOPSIS

This is an archive of a game I made a long time ago. It's a text adventure in the style of a modern point and click adventure. It's not in development or anything, but its ideas may be of interest. I intend to write about it at some point.

The primary version of this game with some additional bugfixes patched in after the fact is available at https://askmeaboutlo0m.github.io/adventure/

There's also compiled versions of the Lua port in the releases section.

DESCRIPTION

This repository contains three parts to the game:

  • adv - the scripts that generate most of the content.
  • haxe - the original Haxe version, which ran in Flash Player and is also the basis of the primary web version.
  • lua - a port to a newer engine, which runs natively and can compile to WebAssembly.

More about these pieces in the following sections.

adv

This is a set of scripts that generate a bunch of lookup tables for the game. This is probably the most interesting part. It's one of those domain-specific languages.

The game-related scripts are in the .pl files. For example, bootstrap.pl contains the core verbs and actions. Rooms like temple.pl contain all the definitions for the stuff in that room.

The generator code is in the lib directory. It basically does some sanity checking, some formatting and then spits out big lookup tables so that the game can handle the respective inputs.

You need Perl and Carton to set this up. Run carton install to install the dependencies, then carton exec ./adv.pl to run the generator. It'll spit out Data.hx and Thing.hx, in the current directory, which should look mostly the same as haxe/adventure/src/adv/Data.hx and haxe/adventure/src/adv/Thing.hx.

Some parts of the game, like room descriptions, initial inventory, some boss fight handlers etc. are in the engine instead.

haxe

Really old code that I don't remember how to make run anymore. It's written in Haxe, which is some obscure cross-platform language thing that I really only used because I wanted to compile stuff to SWF. I wouldn't use this anymore.

I don't recall what you need to do to make this build, but there's a project.xml file that lists the dependencies, one of those being "soul".

This is also what I compiled to JavaScript at some point to make the website version, but I don't have that anymore. But I recall it not being very exciting, basically ripping out all the scene stuff and replaced it with some DOM manipulation.

lua

This is a port of the compiled code to Lua, which can run as a native application. I just ported the generated code directly, since it's basically just some lookup tables, so there's no Lua version of the adv generator.

The engine that this uses is rouse, which is written in C and Lua. Windows and WebAssembly versions are in the releases section. On Linux, you have to build from source, the scripts in the repository should be usable. Don't know or care about macOS.

The WebAssembly version of this is not the primary browser version linked above, it's the native application running in the browser and rendering to an OpenGL canvas.

LICENSE

MIT, see the LICENSE file for details.

adventureawaits's People

Contributors

askmeaboutlo0m avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.