💾 Archived View for gemini.ctrl-c.club › ~stack › gemlog › 2022-08-06.raylib.gmi captured on 2023-04-26 at 13:47:58. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

raylib and vector graphics

I've spent a couple of days playing around with the raylib library and cl-raylib lisp bindings.

https://github.com/raysan5/raylib

https://github.com/longlene/cl-raylib

Raylib is a pretty nice minimal library for constructing games, kind of a modernized SDL. It does not a game engine, it's just a way to construct a frame loop and an api with useful code for drawing, texture-mapping, loading shaders and whatnot.

The CL bindings in cl-raylib are buggy and possibly incomplete, but usable for the simplest of demos. I am pretty good with CFFI and debugging, so within the first day I managed to fix a couple of bugs and convert another example. Feels pretty good to enjoy coding again.

Vector Graphics

I've always loved the old, oscilloscope-like vector displays. It was probably photos of Space War that really got me into programming, and I still have a Vectrex game box sitting in storage... The real vector displays are long gone, but modern GPUs can draw a lot of vectors in a 60th of a second.

Although raylib is not specifically built for that, it draws vectors pretty well. At the end of day two I had a smoothly rotating Asteroids-like ship. And raylib suports vector strips, which are a lot like 'display lists' of 50 years ago.

raylgun

So I had this idea of putting together a little vector-display-list engine in C with a simple API, and driving it from Lisp or anything with lists of vectors to draw. Raylgun seems to be an apt name for the project.

To be continued.

index

home