~alect/jaydate

Janet bindings for the Playdate C SDK
remove extra rogue closing paren
c8f79e1e — alectroemel 8 months ago
format once more
91555640 — alectroemel 8 months ago
update readme

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~alect/jaydate
read/write
git@git.sr.ht:~alect/jaydate

You can also use your local clone with git send-email.

Janet bindings to the Playdate C SDK. The bindings are faithful to the original C API, but function names have been "lispified" (kebab case, question marks instead of the word "Is", etc.).

#Install

  1. You'll need the Playdate SDK installed, it can be found here. Be sure to go through the readme within the sdk download!
  2. [sudo] jpm install https://git.sr.ht/~alect/jaydate

#What Usage should look like

NOTE: THIS MAY OR MAY NOT WORK...

  1. clone this repo
  2. Create pdxinfo in your source dir, something like
    name=Hello Janet
    author=Alec T
    description=Janet on the playdate, wwaaaatt?!
    bundleID=com.alect.hellojanet
    imagePath=
    
  3. create a project.janet
    (declare-project
     :name "Hello World"
     :description "a playdate game"
     :dependencies []
     :source ["source/main.janet"]
     :author "Alec T"
     :url ""
     :repo "")
    
    (declare-source
     :source @["source/main.janet"])
    
  4. create main.janet in your source dir
    (use jaydate)
    
    (var pd (dyn :pd))
    
    (defn update []
      (gfx/clear pd :white)
      (gfx/draw-line pd 100 100 200 100 3 :black))
    
  5. run the simulator as described here? https://sdk.play.date/2.0.1/Inside%20Playdate%20with%20C.html#_cmake
  6. TODO: get it running on real hardware