https://github.com/lettier/lambda-lantern
🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
https://github.com/lettier/lambda-lantern
bindings cpp cpp11 desktop-app functional functional-language functional-programming functional-reactive-programming game game-development game-engine gamedev haskell indiegame native native-apps panda3d purescript purescript-native video-game
Last synced: 3 months ago
JSON representation
🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
- Host: GitHub
- URL: https://github.com/lettier/lambda-lantern
- Owner: lettier
- License: bsd-3-clause
- Created: 2018-12-01T20:15:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T05:09:36.000Z (about 6 years ago)
- Last Synced: 2025-03-22T06:31:37.422Z (3 months ago)
- Topics: bindings, cpp, cpp11, desktop-app, functional, functional-language, functional-programming, functional-reactive-programming, game, game-development, game-engine, gamedev, haskell, indiegame, native, native-apps, panda3d, purescript, purescript-native, video-game
- Language: PureScript
- Homepage: https://medium.com/@lettier/how-to-create-3d-games-with-purescript-and-cpp-faabf8f27fe6
- Size: 13 MB
- Stars: 165
- Watchers: 7
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Lambda Lantern :smiley:

# What is Lambda Lantern? :thinking:

Lambda Lantern is a game made with PureScript, PureScript Native, and Panda3D.
The premise of the game involves collecting and using functional programming patterns
to solve puzzles and ultimately escape a dungeon.One of the purposes of Lambda Lantern is to demonstrate binding PureScript to C++.
Lambda Lantern originally started as a [GitHub Game Off submission](https://itch.io/jam/game-off-2018/rate/338096).
# How do I build and run Lambda Lantern? :hammer:

```bash
# Install Git.
# Install nvm (https://github.com/creationix/nvm).
# Install Panda3D (https://www.panda3d.org/download/sdk-1-10-1/).
# Install Haskell Stack (https://docs.haskellstack.org/en/stable/README/).cd
# Install PureScript Native (https://github.com/andyarvanitis/purescript-native).
git clone https://github.com/andyarvanitis/purescript-native.git
cd purescript-native
git checkout aa857adec6aa40edac91bcacfe4c3b7c5f1c3f2d
stack installcd
# Update path for PureScript Native compiler pscpp.
export PATH="${PATH}:${HOME}/.local/bin"
# Download and install the FFI exports.
git clone https://github.com/lettier/purescript-native-ffi.git
cd purescript-native-ffi
git checkout lambda-lanterncd
git clone https://github.com/lettier/lambda-lantern.git
# Note the trailing dot.
cp -nr purescript-native-ffi/. lambda-lantern/ffi/cd lambda-lantern
# Install Node.js.
nvm install `cat .nvmrc` && nvm use
# Install PureScript and psc-package.
npm install -g [email protected] [email protected]
# Install the PureScript dependencies.
psc-package install# Build Lambda Lantern.
# Double check the include and lib paths.
# You may need additional flags for your platform.make \
CXXFLAGS=" \
-fmax-errors=1 \
-I/usr/include/python \
-I/usr/include/panda3d \
-I/usr/include/freetype2" \
LDFLAGS=" \
-L/usr/lib/panda3d \
-lp3framework \
-lpanda \
-lpandafx \
-lpandaexpress \
-lp3dtoolconfig \
-lp3dtool \
-lp3pystub \
-lp3direct \
-pthread \
-lpthread"# Run Lambda Lantern.
LAMBDA_LANTERN_ASSETS_PATH="./assets" ./output/bin/lambda-lantern
```# What is the license? :scroll:

For license information, see [LICENSE](LICENSE).
# Who wrote Lambda Lantern? :copyright:

(C) 2018 David Lettier
[lettier.com](https://lettier.com)