Open homonoidian opened 2 years ago
"OpenGL and glfw" sounds about 3 months of learning to me, so this is a hard no because I have a lot of other things to do.
The simplest solution as of now is to drop termbox2 and use SDL with some bitmap font, all built into the binary so that there are as little files to drag around as possible. Writing a fast-ish console is possible. This will allow to slowly migrate one's project from a text-based to more complex UI (e.g. by allowing to load sprites into cells, allocating multiple cells for an image, allowing to select a font for a cell/cells, etc.), have more events, etc.
Graphics/console that supports live changes (and that is certainly brewing) is too hard the way it is done now. The second I use spawn
with GUI, all shit breaks loose because now we have protocols to follow and there is always the issue of events: who and how and where would get notified about them, and how would that be handled Novika-side?
If interacting with a GUI from the terminal properly, live, is near to impossible under one binary (at least for me to implement, now), then we should make a GUI with a "terminal". Meaning something like world, with some small notepad-ish activity/playground at first, later an advanced structured editor.
It seems that I should rewrite world to make it more supportable, and use it instead of (or as) bin/novika
. The way you open e.g. Code code file.nk
, you should be able to open world: ./bin/novika files packages directories
(i.e. the same way as it is currently). I think I'd use SFML solely because it supports bitmap fonts (e.g. Cozette), and I like them so much I'd go with a different, heavier library. Plus they have easy math. SFML provides a bit more in terms of functionality, too, and we can use that later.
Idk whether I'll be able to merge something like world until 24th, but I guess I'll try. If not, this moves to 0.0.4.
Seems this thing is 0.0.10ish haha
I guess when Novika is fast enough for the following there'd need to be a cross-platform graphics library. An API similar to that of tigr would be enough, plus proper font support instead of
tigrfont
or some other utility like that. In this sense, SDL+SDL TTF is an obvious choice for Crystal because no matter how much I like CrSFML, it brings too many runtime dependencies with it. And obviously porting Tigr would be too dumb :100:Anyway, this is a TODO more than an issue, but still. Novika block viewer should be written in Novika (at least to prove its stability), so closing this will be a tiny step towards a brighter future.