Giter Site home page Giter Site logo

belka314 / passage-game Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toolness/passage-emscripten

0.0 0.0 0.0 826 KB

Jason Rohrer's game "Passage" (2007), ported to the web via Emscripten.

Home Page: http://passage.toolness.org

Shell 0.29% C++ 92.83% Makefile 0.64% C 2.50% Objective-C 1.14% Objective-C++ 0.89% Emacs Lisp 0.68% TeX 0.58% Perl 0.27% HTML 0.13% Dockerfile 0.05%

passage-game's Introduction

This is an attempt to port Jason Rohrer's Passage (2007) to the Web via Emscripten.

Very Quick Start

If you just want to play the game, you can either visit passage.toolness.org or open dist/index.html in your browser.

Quick Start

First, you will need to download and install Emscripten. You can verify everything is working by running emcc.

Then do:

cd Passage_v4_UnixSource
./runToBuild

To build with optimizations, run:

EMCC_FLAGS='-O2' ./runToBuild

Quick Start (Docker)

If you don't want to deal with installing the Emscripten toolchain on your system, you can install it via Docker and Docker Compose, though the container takes a very long time to build. Once Docker and Docker Compose are installed, run:

docker-compose build
docker-compose run em bash

At this point you will be in a bash shell in a container that has the Emscripten toolchain pre-installed. You'll be in the /usr/src/passage directory, which maps directly to the Passage_v4_UnixSource of your repository. So to build everything, you can just run ./runToBuild.

Notes

  • Emterpreter (specifically Emterpreter-Async) is used to manually control the call stack so the original code can work without too much refactoring.

  • See the history for Passage_v4_UnixSource/gamma256 for details on what was changed to support Emscripten; I tried to make sure that the commits are fairly clean and easy to understand.

  • Running emcc -v on my development environment yielded:

    emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.35.0
    clang version 3.7.0 (https://github.com/kripken/emscripten-fastcomp-clang/ dbe68fecd03d6f646bd075963c3cc0e7130e5767) (https://github.com/kripken/emscripten-fastcomp/ 4e83be90903250ec5142edc57971ed4c633c5e25)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
    Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
    Candidate multilib: .;@m64
    Selected multilib: .;@m64
    

    It is entirely possible that different versions may cause compilation to fail.

License

The original Passage has been placed in the public domain.

This port is in the public domain as well.

passage-game's People

Contributors

toolness 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.