Skip to content

Instantly share code, notes, and snippets.

@zeroflag
Last active November 15, 2023 18:05
Show Gist options
  • Save zeroflag/a32bda5b8e04c1b05e9c047d93d23344 to your computer and use it in GitHub Desktop.
Save zeroflag/a32bda5b8e04c1b05e9c047d93d23344 to your computer and use it in GitHub Desktop.
;; title: game title
;; author: game developer, email, etc.
;; desc: short description
;; site: website link
;; license: MIT License (change this to your license of choice)
;; version: 0.1
;; script: fennel
(fn player [px py]
(var x px)
(var y py)
{
:draw (fn []
(spr 1 x y -1 1 0 0 2 2))
:move (fn [px py]
(set x px)
(set y py))
})
(fn _G.TIC []
(cls 0)
(local p (player 50 50))
(p.draw)
(p:move 100 200)
(p:draw))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment