Fennel fantasy console

selfsame 345a955856 readme 1 year ago
files 345a955856 readme 1 year ago
src 345a955856 readme 1 year ago
.gitignore cbcb45217c initial commit 1 year ago
Cargo.lock e1f3c15020 work towards reloading with multiple apps 1 year ago
Cargo.toml e1f3c15020 work towards reloading with multiple apps 1 year ago
HelvetiPixel.ttf b014f17bf1 progress on sprites, text, internals 1 year ago
JOURNAL.md b68180bd25 journal update 1 year ago
README.md 345a955856 readme 1 year ago
consola.ttf b014f17bf1 progress on sprites, text, internals 1 year ago
coure.fon b014f17bf1 progress on sprites, text, internals 1 year ago
fennel.lua 118133a43b work on app working directory 1 year ago
reloader.fnl 345a955856 readme 1 year ago

README.md

TODO

basics

  • lua bindings
    • print to console (this was just lua 'print')
    • draw pixel
    • [/] draw primitives
    • draw font
    • newlines
    • clear screen
    • blit texture

systems

  • 'application' struct
    • inject bindings
    • load fennel and loaders
    • folder 'app' structure
    • run lua from 'app' cwd
    • app.fnl, can require other files normally
    • watch files, live reload (https://docs.rs/notify/latest/notify/)
    • error handling (at least just print the error and recover)

OS

  • 'app' processes, focused app
  • input and update routing
  • [/] "operating system" is just a fennel app that can manage window draw_targets, focus

  • [x] img section blitting

  • [ ] pattern fill

  • [ ] post processing that enforces 2 bit color

  • [ ] fen2 user storage

    • windows, linux, localStorage
  • [ ] sandbox filesystem access

API

(load_img "img/foo.png")
(draw_img x y "img/foo.png")
(draw_sprite x y sx sy w h "img/foo.png")
(draw_text "HELLO" x y true)

(draw_rect x y w h false)
(draw_rect_lines x y w h thickness true)

(load_sound "bar.wav")
(play_sound "bar.wav" false 0.2)

(mouse_pos)
(mouse_down 0)
(mouse_pressed 0)

(key_down "tab")
(key_pressed "q")
(key_released "x")

(list_files "dir/")
(quit)