Simple 2d library

I need some library to display image as it’s been rendered (on a desktop machine).

I don’t want to have ‘game loop’, but I want some way to keep image on screen (updated from libraries internal buffer on screen redraws, etc) with some way to ‘draw this’.

The best library insofar I found was ‘turtle’, which handles all low-level details and allowing me to say 'start drawing on window 800x600, go there and add a line, etc". Unfortunately, it’s not that good for pixel-based drawing, so I’m trying to find a faster replacement.

Basically, I want a ‘2d canvas’ to draw on, without thinking on low-level details.

Can you suggest something?

How high-level a library are you looking for?

  • If you just want an easy way to push pixels into a buffer and get them on the screen, minifb is pretty nice.
  • If you want stuff like textures and shapes, a game framework like ggez or quicksilver might be a good option (they have a game loop, but it’s fairly minimal).
  • There’s also nannou, a ‘creative coding’ framework for Rust, which is designed to be extremely low-friction - here’s a drawing example.

Hopefully that points you in the right direction.

Thank you!

My goal is to play with simple 2D screen as I played with ZX-Spectrum in the past. Minimal setup, plus ability to draw dots in minimal amount of efforts.

I’ll report back after playing with both minifb and nannou.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.