Shades is a sample game for the Haskell SpriteKit binding. It also serves as a running example in the paper Haskell SpriteKit — Transforming an Imperative Object-oriented API into a Purely Functional One.
The repo includes a subdirectory ShadesApp
with an Xcode project that includes a simple Swift wrapper, which turns the Haskell for Mac SpriteKit project into a standalone Mac app. The Xcode project contains two custom build phases running the shell scripts BuildHaskell.sh
and CopyHaskellDynlibs.sh
, which compile the Haskell code into a dynamic library and copy all dependencies, respectively. Moreover, ViewController.swift
loads the Haskell scene and presents it in an SKView
.
NB: You need to fix the reference to HaskellSpriteKit.framework
inside the Xcode project to point to your local build of Haskell Spritekit.