No description
- Scheme 98%
- Makefile 1.6%
- Shell 0.4%
| .exrc | wip branch:main | |
| .gitignore | wip branch:main | |
| example.ss | wip branch:main | |
| main.ss | wip branch:main | |
| Makefile | wip branch:main | |
| nc1.sls | wip branch:main | |
| README | wip branch:main | |
| run-main.sh | wip branch:main | |
fun-game
Get basic ncurses working.
Get input working.
Get sndio wav file playing to work.
Get libev to work with ncurses.
I need to find/write some sort
of thread safe queue.
---
This is sort of like ELM.
(or how I envision ELM)
The program is a loop.
The loop iteration starts
with reading an event off of the event-queue,
and reading ncurses input with getch.
(These two inputs are conceptually similar.)
("the input")
The event-queue read will be blocking
and the getch will not. (using ncurses timeout)
Inside the iteration two things happen.
1. The state of the program is updated according
to both the ncurses input and the event-queue
input.
2. The prgram will draw itself using a cascading
draw tree of fcuntions. These functions sole
dynamic input is the state. (that was ostensibly
just updated)
notes: THere will be a "tick" event added that
is frequent and regular. This is how that app
idles even the teh event-queue call blocks.
(There will always be at minimum "tick" events
happing to drive the loop.)
The "tick" events is just a normal event.
(They will probably be unhandled.)
There is one top draw function. There will be
a pre-setup set of "windows" that will represent
parts of the screen. They will now which events
each basically provide two method calls.
1. Their specific update state function
that takes the state as input.
In step-1 above each sub-update call will
be run.
2. Their own specific draw method. They all
only take the state as their input.
* The events abd the state are some kind of
alist that is keyed off of the window that they
go with. Maybe an efficiency would be to
only pass the relevent sub-state to each window's
draw method.
Probably anything can create events. Like
the draw method might create an event.
linear drumming/ linear types.
this way a thing could move across the
screen ...
This last part is just rifffing...
---
Another option is that neither getch
or the event-queue (get) are blocking
and the loop iteration is controlled
by a timer. Like Frames per second
kind of thing.