There are a lot of (excellent) libraries to static vector graphics. A lot of them have functionality to play the graphics back as gif or animations.
I want to make a real-time simulation. Perhaps think of it as a game dev project? With sprites interacting as per a certain rules, with a certain amount of user interaction to be needed.
I have considered GLMakie but it’s a very heavy library and a little slow. I might be doing things inefficiently but just for the sake of knowing… Are there any better libraries than Makie? I don’t want there to be ugly plot axes laying around. A good time control (frame by frame animations kinda thing?) Stable fps. High speed.
I have had some moderate success using Cairo.jl, which is better suited to low level graphics operations than Makie. I recall figuring out a way to get it to render frames in real-time to a Gtk window in real-time using Gtk.jl, with user interaction (like clicks), although I don’t recall the exact details. I might be able to dig up my old code if you’re interested.
I also have used Layered.jl which is an interesting approach to 2D rendering, adding vector graphics to 2D layers and composing them together (based on Cairo I believe?). Not sure it’s got real-time capabilities, however.
Hehe funny to see Layered.jl mentioned, that’s what I was doing before Makie. Haven’t looked at it in ages but got some nice graphics out of it at the time. Was less meant for plotting, more for artsy things
Layered.jl… hmmmm My first idea was something similar… using Luxor to creat svgs and stack them on top of each other. Never figured out how to do that. (yes I know I’m a noob, I have used Julia for a very short amount of time. Hoping to learn :))
Hey btw… this might be a totally dumb question and forgive me but…
Is Cairo capable of making videos or just static images?
Like in pretty much all the libraries I’ve seen that create animation, Cairo is used to create the images. And then they are stacked into a video using FFMPEG.
Which is almost all I want except I don’t want to do it as a pretender. But a real time one!
That is probably the case… I’ve mentioned the thing I’m doing in a reply above. But also, I am really confused with how to time things with a clock in Makie. The Minecraft thing blew my mind off though! JEEZ!
On second thought… Can I actually use Plots.jl without the axes on the screen? How do I turn them off?
I figured Makie uses it under the hood anyway. Wouldn’t it be better? And again… How then do I make Real-time Simulation out of it… Say of a bunch of particles moving around (While experiencing gravity doe to one another)
By any chance mate, do you (or anyone else?) know how they even create these windows to preview images? Can’t I simply use native Julia code to create a window or something and put information into the buffer (No idea what that is… just some gibberish I saw online)