r/raylib • • 15h ago

Moiré Fractal with C, Raylib and GLSL

25 Upvotes

I created a simple moiré fractal using C, raylib and GLSL shaders.

The idea is quite simple: start with two nearby centers and generate concentric circles around each one, gradually increasing their radius.

Then, using the radius as input to a sin function, I generate alternating light and dark values. By applying this to the colors, the two circle patterns interact and produce the characteristic moiré effect.

Complete coding session:

https://youtu.be/7MmUcDiOJDc

Source code:

https://github.com/FractalCodeRicardo/hangover-programming/tree/main/moire-shaders


r/raylib • • 19h ago

Zombie game made with raylib and the programming language C

Thumbnail
gallery
15 Upvotes

**Disclaimer: The project is vibecoded*

The game has 40 000+ lines of code, everything is procedullary generated. Using only 200mb of ram and vram. It is developed on linux and i plan to port it to windows, mac and mobile. A prototype windows port revealed that the full game (folder including exe) only take up 2mb, which baffles me.

The game has it's own level/model/zombie editor, local coop.

I will not talk around the bush, the game is AI coded. It is a kind of passion project of mine, exploring the possibilities of AI, my creativity and how well one can optimize a game.

My favourite part is the gore and gibs system, reminds me of the pipebomb/zombie horde explosion of l4d2.

All screenshots got taken on an lenovo t14s 16gb of ram, ryzen 5 5650, vega 7 igpu, debian 13 gnome.

Game name got redacted because it is not final, yet.

I'm curious for your feedback!

Greetings from germany.


r/raylib • • 17h ago

Aspect - A library based on raylib for creating energy-efficient GUIs in Zig.

9 Upvotes

I got bored, so I decided to write a small library on Zig for creating simple and energy-efficient graphical apps in retained-mode. I used raylib as a base (it’s sufficient for now, and later I might try rewriting it for Vulkan).

Aspect LineChart component demo

You can read more in repository.

At the time of this post, the library is very crude and not suitable for large projects. I only started writing in Zig in September 2026, so the code quality may be poor. In simple terms, library is in early stage of development.

Main goals

I don’t plan to make this anything serious, but I do adhere to a few points:

  • Energy-efficient: A graphics app should use resources only when absolutely necessary, and use them as little as possible. This is why I chose retained-mode, as it significantly reduces CPU load without slowing down the app.
  • Flexibility: The library should allow the developer to customize it as they wish.
  • Lightweight: A minimal graphical app in Aspect can weight ~68KiB.

Built-in components

The library provides a small set of built-in components, some of the most basic ones: Button, TextField (which still doesn’t function as expected, lol), Selection, ColumnChart, Toggler, and so on.

Interesting

This library divides the entire app into several parts (model and functions: reveal, update, build, reflect), allowing for systematization of all app events and flexible interface control.

Supported Zig versions

The library currently relies on Zig 0.17.0.

Supported OS

The library has been successfully tested on Debian Linux and Windows 11.

What’s next In the near future

I’ll try to implement relative positioning, which will reduce the need to worry about setting absolute positions for each component. Naturally, over time I will add/improve the built-in components.

This post has been translated into English using Google Translate. Text was originally in Russian.


r/raylib • • 6h ago

Desktop weather station in Raylib/C

Post image
1 Upvotes