u/Afraid_Lie_9340

Kitra v0.2.0 - major update (renamed from Cinder, new surfaces, SDF collision, and more)

Released v0.2.0 of kitra today. fairly big update so thought it was worth posting about.

biggest change is the rename. the library was called cinder before, its now kitra. this is a breaking change so everything needs updating. KitraLoadTexture instead of CinderLoadTexture, KITRA_STATUS_OK instead of CINDER_STATUS_OK, header is kitra/kitra.h. find and replace should handle most of it.

new features. surfaces are in now, cpu side pixel buffers that you can read and write pixel by pixel and convert to a gpu texture. collision detection got reworked too, the old boolean overlap functions are replaced with signed distance functions returning a float. negative when overlapping, zero when touching, positive when separated. covers all pairs of points, rects, circles and ellipses.

also added native message box dialogs, texture rotation/flip/tint/alpha controls, screenshot to surface, a handful of new audio, timer and window functions. ci now builds on both linux and macos with separate release tarballs and sha256 checksums. docs are auto deployed to github pages.

release notes and download here: https://github.com/UniquePython/kitra/releases/tag/v0.2.0

github.com
u/Afraid_Lie_9340 — 4 days ago
▲ 61 r/gameenginedevs+2 crossposts

Made a small 2D graphics library for C

been learning C for a bit and wanted to make something visual. but SDL2 felt too involved for doing sth simple....so i made my own library..its called Cinder. sits on top of SDL2, collapses all the setup into basically nothing:

CinderInit(CINDER_SUBSYSTEM_ALL);
CinderCreateWindow(CinderDefaultWindowDesc());

while (CinderIsRunning()) {
    CinderBeginFrame();
    CinderClearBackground(CINDER_BLACK);
    CinderEndFrame();
}

covers drawing, input, audio, fonts, textures, timers, rng.. the usual stuff. there are examples in the repo (pong, snake, pendulum) if you want to see how it actually feels to use.

feedback welcome

github.com
u/Afraid_Lie_9340 — 9 days ago