r/raylib

▲ 3 r/raylib

how to remove vocals from music

Hello there i am working on a karaoke game using raylib (and c) and the issue i am having right now is that vocal and lyrics doesn't match up cz usually karaoke version(or vocal-less version) of the music contain a intro that makes the lyrics maligned, so i was thinking is there a good, simple way to remove vocals from music, something that is light weight?

reddit.com
u/Tillua467 — 12 hours ago
▲ 42 r/raylib+1 crossposts

Does this sparkle your interest(early development showing game mechanics)

u/DapperAd2798 — 23 hours ago
▲ 25 r/raylib

Cellular automata simulation

Hello everyone, I've made a zero player game cellular automata simulation with C++ - Conweys game of Life.

The rule of the game is very simple:

The world is an infinite grid and A cell would be alive if it had 2-3 neighbours alive.

It can die by under and overpopulation.

That's it.

But to render and simulate I've made the world as a 100x100 grid with a torus wrap. This is a very fun way to learn and spend time.

To use this all you have to do is just open the file and run the code. By default it has an Acorn Pattern and a ready to use other two patterns.

So yeah take a look at my GitHub and give my repo a star.

GitHub: https://github.com/Radhees-Engg

u/Rude-Flan-404 — 20 hours ago
▲ 2 r/raylib

Is there any inherent problem with having a Raygui button return on pressed?

Hi peeps,

This might seem like a really dumb question, but I'm making a little activity checklist .. thingy.. as a project.

In some parts of it, I want to hold down a button and that will interpolate a progress bar over 2 seconds, once that's full then the task is marked off.

Because the buttons return on the mouse release, I was having to do checks anyway for the mouse being inside the button's area and being clicked. It seemed prudent to just change the flag in header file for this project.

But, I'll be real with you here.. It's been a hot minute since I've done anything as low level as this. A 15 year minute at that. I'm not sure if the buttons are set up like that for a specific reason that shouldn't be messed with?

Thought it best to ask before I start messing with stuff, and be aware of any issues I might be causing lol.

reddit.com
u/Opening-Bug-8328 — 24 hours ago
▲ 28 r/raylib+3 crossposts

I finally finished version 1.04 of my first larger game made with raylib + C++.

It's a fast-paced arcade game where you dodge enemies, collect powerups, survive boss fights, and unlock higher levels.

Features:

  • Boss fight system with projectile attacks
  • Multiple enemy types
  • Powerups (shield, speed boost, double points, extra life)
  • Level progression + save system
  • Gamepad support
  • Audio + UI system
  • Dynamic difficulty scaling
  • State-based game flow (menu, pause, countdown, bossfight, game over, etc.)

The whole project was built from scratch in C++ using raylib.

Working on this taught me a lot about:

  • game loops
  • collision systems
  • entity/state management
  • timers
  • balancing difficulty
  • organizing a larger codebase

Big thanks to u/leifbron for helping me normalize the player movement vector properly — movement feels much better now.

Some parts are definitely still messy, but finishing a complete playable project feels great.

Would love feedback from other raylib devs.

Link to game: https://pingponger231.itch.io/avoid-b

u/Pale-Candidate-4122 — 1 day ago
▲ 175 r/raylib+1 crossposts

Usagi Engine v1.0.0 Released - Free & Open Source Lua 2D Game Engine Powered by Raylib

I've been working on a little 2D Raylib-powered game engine called Usagi. You code your games with Lua, and your game live updates as you save your code and assets. It has single-command cross-platform export for web, Linux, macOS, and Windows. Today I released v1.0.0 after making a handful of games with it and getting feedback.

https://usagiengine.com/

Raylib was the perfect choice for the foundations of Usagi Engine, making cross-platform rendering, input, and audio playback easier than I could have imagined.

I'd love to know what you all think! The engine is coded in Rust, and you can check the source out on GitHub: https://github.com/brettchalupa/usagi

u/brettmakesgames — 2 days ago
▲ 21 r/raylib+1 crossposts

Completed my first game today with C++ and raylib

Hello fellow game devs, I just completed my first game and published it on [The Blue Rebellion by Mazarii](https://mazarii.itch.io/the-blue-rebellion) would love if y'all would check it and give any reviews. This started as part of my college course, but I expanded it a little more. I would love all the support from the community.

mazarii.itch.io
u/Niqqa-2901 — 1 day ago
▲ 3 r/raylib

How to use Raylib 6.0 with Codeblocks?

Hiii I'm a noob, I installed "raylib 6.0 Windows Installer (64bit)" directly from itch.io and now I want to use it with Code::Blocks to make stuff in C for school, but every tutorial references a mysterious "MinGW" folder that does not exist, even the official wiki which seems to be several years old.

This is all I got from the installation:

https://preview.redd.it/yangj9fhgb2h1.png?width=225&format=png&auto=webp&s=f73ba2bd095bbc911e71aea9752d8522f7574d77

So... what do I do? What's the equivalent, or what am I missing?

reddit.com
u/panda-goddess — 1 day ago
▲ 5 r/raylib

Multi backend framework Nevu-UI has been updated to version 0.7.6!

update log: https://github.com/GolemBebrov/nevu-ui/releases/tag/v0.7.6

please give a star to nevu ui github i will really appreciate it

code in the video:

import nevu_ui as ui
import pyray as rl
import random


rl.set_trace_log_level(rl.TraceLogLevel.LOG_ERROR)


FONT_PATH = "vk_font.ttf" #! CHANGE THIS TO YOUR FONT


window = ui.Window((300, 300), title = "nevu ui!", backend = ui.Backend.RayLib, ratio = ui.NvVector2(2, 1))


base_style = ui.Style(colortheme = ui.ColorThemeLibrary.github_dark, border_radius = 0, border_width = 0, font_name = FONT_PATH)
base_style_aero = base_style(gradient = ui.Gradient([(25, 255, 105, 100),(10, 230, 100, 30)], type = ui.GradientType.Radial, direction = ui.RadialPosition.TopRight), border_radius=10)
menu = ui.Menu(window, (100%ui.fill, 100%ui.fill), base_style(gradient = ui.Gradient([ui.Color.Teal, ui.Color.Blue], type = ui.GradientType.Linear, direction = ui.LinearSide.BottomRight)))


ui.nevu_object_globals.modify(size = (100%ui.gc, 100%ui.gc), style = base_style_aero)


def set_new_anims():
    ncol1 = random.choice(colors1_list)
    ncol2 = random.choice(colors2_list)
    rand_pos = ui.NvVector2(random.randint(0, 300), random.randint(0, 300))
    rand_pos2 = ui.NvVector2(random.randint(0, 300), random.randint(0, 300))
    anim_manager.add_continuous_animation("gr_color1", ui.animations.ColorAnimation(ncol1, ncol2, 8, ui.animations.ease_in_out))
    anim_manager.add_continuous_animation("gr_color2", ui.animations.ColorAnimation(ncol2, ncol1, 12, ui.animations.ease_in_out))
    anim_manager.add_continuous_animation("position", ui.animations.Vector2Animation(rand_pos, rand_pos2, 20, ui.animations.ease_in_out))


chk_group = ui.CheckBoxGroup(single_selection = True)


button = ui.Button(lambda: None, "Placeholder", size = (200%ui.gc, 50%ui.gc), style = base_style_aero(font_size = 10), single_instance = False)


layout = ui.Grid((100%ui.fill, 100%ui.fill), y = 6, x = 12, content = {
    (6.5, 1): ui.Widget((100%ui.vw, 30%ui.gc)),
    (6.5, 6): ui.Widget((100%ui.vw, 30%ui.gc)),
    (2, 2): ui.Label("Nevu UI!", style = base_style_aero(font_size = 10)),
    (6.5, 3.5): ui.Button(set_new_anims, "Reset!", size = (200%ui.gc, 50%ui.gc), style = base_style_aero(font_size = 10)),
    (2, 5): ui.Slider((200%ui.gc, 50%ui.gc),start = 0, end = 100, current_value = 50, style = base_style_aero(font_size = 10)),
    (2, 3.5): ui.Grid((200%ui.gc, 200%ui.gc), x = 4, y = 2, content = {
        (1, 2): ui.RectCheckBox((10, 20), checkbox_group=chk_group),
        (2, 1): ui.RectCheckBox((10, 20), checkbox_group=chk_group),
        (3, 2): ui.RectCheckBox((10, 20), checkbox_group=chk_group),
        (4, 1): ui.RectCheckBox((10, 20), checkbox_group=chk_group)
    }), 
    (6.5, 5): ui.Input((200%ui.gc, 150%ui.gc), placeholder = "input", multiple=True),
    (10, 2): ui.ElementSwitcher((200%ui.gc, 70%ui.gc), elements = ["Apple", "Banana", "Cherry", "Date", "Banana"], style = base_style_aero(font_size = 8)),
    (10, 4): button
    
})


colors1_list = [
    ui.Color.Teal, ui.Color.Blue, ui.Color.Black, ui.Color.Violet
]


colors2_list = [
    ui.Color.Aqua, ui.Color.Purple, ui.Color.Wheat, ui.Color.Aquamarine
]



menu.layout = layout


anim_manager = ui.animations.AnimationManager()


set_new_anims()


def create_gradient(color1, color2, position: ui.NvVector2, size: ui.NvVector2):
    #THIS IS GRADIENT ONLY FOR RAYLIB BACKEND
    normalized = position / size
    return ui.rendering.GradientRaylib([color1, color2], type = ui.GradientType.Radial, center=normalized)


c1 = None
c2 = None
pos = None


while True:
    window.begin_frame()
    rl.clear_background(ui.Color.Black)
    window.update(fps = 999999999)
    anim_manager.update()
    new_c1 = anim_manager.get_animation_value("gr_color1")
    new_c2 = anim_manager.get_animation_value("gr_color2")
    new_pos = anim_manager.get_animation_value("position")
    if c1 != new_c1 or c2 != new_c2 or pos != new_pos:
        c1 = new_c1
        c2 = new_c2
        pos = new_pos
        gradient = create_gradient(c1, c2, pos, window.original_size)
        menu.style = menu.style(gradient = gradient)
        menu._clear_surfaces()
        
    menu.update()
    menu.draw()
   # rl.draw_fps(10, 10)
    window.end_frame()import nevu_ui as ui
import pyray as rl
import random


rl.set_trace_log_level(rl.TraceLogLevel.LOG_ERROR)


FONT_PATH = "vk_font.ttf" #! CHANGE THIS TO YOUR FONT


window = ui.Window((300, 300), title = "nevu ui!", backend = ui.Backend.RayLib, ratio = ui.NvVector2(2, 1))


base_style = ui.Style(colortheme = ui.ColorThemeLibrary.github_dark, border_radius = 0, border_width = 0, font_name = FONT_PATH)
base_style_aero = base_style(gradient = ui.Gradient([(25, 255, 105, 100),(10, 230, 100, 30)], type = ui.GradientType.Radial, direction = ui.RadialPosition.TopRight), border_radius=10)
menu = ui.Menu(window, (100%ui.fill, 100%ui.fill), base_style(gradient = ui.Gradient([ui.Color.Teal, ui.Color.Blue], type = ui.GradientType.Linear, direction = ui.LinearSide.BottomRight)))


ui.nevu_object_globals.modify(size = (100%ui.gc, 100%ui.gc), style = base_style_aero)


def set_new_anims():
    ncol1 = random.choice(colors1_list)
    ncol2 = random.choice(colors2_list)
    rand_pos = ui.NvVector2(random.randint(0, 300), random.randint(0, 300))
    rand_pos2 = ui.NvVector2(random.randint(0, 300), random.randint(0, 300))
    anim_manager.add_continuous_animation("gr_color1", ui.animations.ColorAnimation(ncol1, ncol2, 8, ui.animations.ease_in_out))
    anim_manager.add_continuous_animation("gr_color2", ui.animations.ColorAnimation(ncol2, ncol1, 12, ui.animations.ease_in_out))
    anim_manager.add_continuous_animation("position", ui.animations.Vector2Animation(rand_pos, rand_pos2, 20, ui.animations.ease_in_out))


chk_group = ui.CheckBoxGroup(single_selection = True)


button = ui.Button(lambda: None, "Placeholder", size = (200%ui.gc, 50%ui.gc), style = base_style_aero(font_size = 10), single_instance = False)


layout = ui.Grid((100%ui.fill, 100%ui.fill), y = 6, x = 12, content = {
    (6.5, 1): ui.Widget((100%ui.vw, 30%ui.gc)),
    (6.5, 6): ui.Widget((100%ui.vw, 30%ui.gc)),
    (2, 2): ui.Label("Nevu UI!", style = base_style_aero(font_size = 10)),
    (6.5, 3.5): ui.Button(set_new_anims, "Reset!", size = (200%ui.gc, 50%ui.gc), style = base_style_aero(font_size = 10)),
    (2, 5): ui.Slider((200%ui.gc, 50%ui.gc),start = 0, end = 100, current_value = 50, style = base_style_aero(font_size = 10)),
    (2, 3.5): ui.Grid((200%ui.gc, 200%ui.gc), x = 4, y = 2, content = {
        (1, 2): ui.RectCheckBox((10, 20), checkbox_group=chk_group),
        (2, 1): ui.RectCheckBox((10, 20), checkbox_group=chk_group),
        (3, 2): ui.RectCheckBox((10, 20), checkbox_group=chk_group),
        (4, 1): ui.RectCheckBox((10, 20), checkbox_group=chk_group)
    }), 
    (6.5, 5): ui.Input((200%ui.gc, 150%ui.gc), placeholder = "input", multiple=True),
    (10, 2): ui.ElementSwitcher((200%ui.gc, 70%ui.gc), elements = ["Apple", "Banana", "Cherry", "Date", "Banana"], style = base_style_aero(font_size = 8)),
    (10, 4): button
    
})


colors1_list = [
    ui.Color.Teal, ui.Color.Blue, ui.Color.Black, ui.Color.Violet
]


colors2_list = [
    ui.Color.Aqua, ui.Color.Purple, ui.Color.Wheat, ui.Color.Aquamarine
]



menu.layout = layout


anim_manager = ui.animations.AnimationManager()


set_new_anims()


def create_gradient(color1, color2, position: ui.NvVector2, size: ui.NvVector2):
    #THIS IS GRADIENT ONLY FOR RAYLIB BACKEND
    normalized = position / size
    return ui.rendering.GradientRaylib([color1, color2], type = ui.GradientType.Radial, center=normalized)


c1 = None
c2 = None
pos = None


while True:
    window.begin_frame()
    rl.clear_background(ui.Color.Black)
    window.update(fps = 999999999)
    anim_manager.update()
    new_c1 = anim_manager.get_animation_value("gr_color1")
    new_c2 = anim_manager.get_animation_value("gr_color2")
    new_pos = anim_manager.get_animation_value("position")
    if c1 != new_c1 or c2 != new_c2 or pos != new_pos:
        c1 = new_c1
        c2 = new_c2
        pos = new_pos
        gradient = create_gradient(c1, c2, pos, window.original_size)
        menu.style = menu.style(gradient = gradient)
        menu._clear_surfaces()
        
    menu.update()
    menu.draw()
   # rl.draw_fps(10, 10)
    window.end_frame()
u/Due_Engineer_7647 — 2 days ago
▲ 24 r/raylib

Parody demo for Raytiles library

Raytiles is a 3D geospatial engine for raylib. I wanted to make a demo for the library and searched for areas on Earth that will look nice in while streaming them.

When I put my eyes on the Grand Canyon, I knew what I'm going to do :)
The demo app is available at the "sandbox" directory next to more examples apps.

https://github.com/ziv/raytiles

btw, this is my first video editing ever...

u/shemlokashur — 3 days ago
▲ 123 r/raylib

Built a digital clock out of tiny analog clocks

A digital clock except every digit is made out of tiny analog clocks.

The fun part was not really drawing the clocks, but figuring out a simple way to describe each number as a pattern of symbols, then mapping those symbols to hand positions. When the time changes, the hands smoothly rotate into their new positions instead of instantly snapping.

The animation feels surprisingly satisfying to watch compared to simply switching (snapping) the digits without it.

Source code: https://github.com/letsreinventthewheel/clockwork-digits
YouTube coding session: https://www.youtube.com/watch?v=CLUtwAQx51Y

UPDATE:
It turns out there is actually a Raylib example (on the official web site) that has the same project, same result. Honestly, I didn't even know about it. So even though we achieve the same result I believe I took a few different turns from original example, which might be interesting to take a look at

u/faorien — 4 days ago
▲ 18 r/raylib

Why does the window not respond?

[Issue is fixed now, thanks to everyone who helped!]

I'm a C++ beginner. I tried installing raylib and there are no errors in the output, but the window is always not responding. What could be the cause? I used the most basic project with just a window with some text.

#include "raylib.h"

int main() {
    const int screenWidth = 800;
    const int screenHeight = 450;

    InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");

    SetTargetFPS(60);
    while (!WindowShouldClose())
    {
        BeginDrawing();

            ClearBackground(RAYWHITE);

            DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);

        EndDrawing();
    }

    CloseWindow();

    return 0;
}





Output:

INFO: Initializing raylib 6.0
INFO: Platform backend: DESKTOP (GLFW)
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
INFO: DISPLAY: Device initialized successfully 
INFO:     > Display size: 1920 x 1080
INFO:     > Screen size:  800 x 450
INFO:     > Render size:  800 x 450
INFO:     > Viewport offsets: 0, 0
INFO: GLAD: OpenGL extensions loaded successfully
INFO: GL: Supported extensions count: 243
INFO: GL: OpenGL device information:
INFO:     > Vendor:   AMD
INFO:     > Renderer: AMD Radeon 680M (radeonsi, rembrandt, LLVM 20.1.2, DRM 3.64, 6.17.0-29-generic)
INFO:     > Version:  4.6 (Core Profile) Mesa 25.2.8-0ubuntu0.24.04.1
INFO:     > GLSL:     4.60
INFO: GL: VAO extension detected, VAO functions loaded successfully
INFO: GL: NPOT textures extension detected, full NPOT textures supported
INFO: GL: DXT compressed textures supported
INFO: GL: ETC2/EAC compressed textures supported
INFO: PLATFORM: DESKTOP (GLFW - X11): Initialized successfully
INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 1] Default texture loaded successfully
INFO: SHADER: [ID 1] Vertex shader compiled successfully
INFO: SHADER: [ID 2] Fragment shader compiled successfully
INFO: SHADER: [ID 3] Program shader loaded successfully
INFO: SHADER: [ID 3] Default shader loaded successfully
INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU)
INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU)
INFO: RLGL: Default OpenGL state initialized successfully
INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps)
INFO: FONT: Default font loaded successfully (224 glyphs)
INFO: SYSTEM: Working Directory: (my directory)
INFO: TIMER: Target time per frame: 16.667 milliseconds
u/Janeq404 — 5 days ago
▲ 24 r/raylib

dunk4it: demencial progress

Yo guys bequerel here,

Diabolical changes to dunk4it, C+raylib+codeberg, cause im a super cool guy btw.

NO AI was used to program this amazing code, nor asked about anything and neither asked what's the weather tomorrow.

The big leagues are calling people.

u/bequerel_ — 4 days ago
▲ 292 r/raylib+4 crossposts

My Metroidvania Maker just got a massive v0.2.0 update

I’ve been working on a Metroidvania Maker, and v0.2.0 ended up becoming much bigger than originally planned.

The game includes a full built-in editor that lets you create and play your own metroidvania worlds directly in-game.

This update adds:

  • huge editor/UI overhaul
  • logic & signal systems
  • improved local co-op
  • better custom world browsing
  • multilingual world/UI support
  • improved movement & game feel
  • lots of visual polish and usability improvements

Free demo:

https://ertud2.itch.io/silent-citadel

Still a work in progress, so feedback on both the gameplay and editor side is hugely appreciated.

u/nop4n1c_ — 8 days ago
▲ 156 r/raylib

raylib project creator (rpc) v2.0 released!

Hi! Just released rpc v2.0 (raylib project creator), a small tool to simplify raylib projects structures creation, you can choose a template project to start with, setup project properties and generate the full project structure ready to go! The tool is free and open source, you can find it on GitHub and itchio:

u/raysan5 — 7 days ago
▲ 5 r/raylib

How to fix custom font blurriness when drawing inside texture mode?

I am using font from https://poppyworks.itch.io/silver . The size should be at size 19. I tried to use https://www.raylib.com/examples/core/loader.html?name=core_window_letterbox letter box to draw my game at 640x480 resolution and then scale it up.

https://preview.redd.it/vgsbi041ug1h1.png?width=708&format=png&auto=webp&s=c7234575061291d383050b3840f848a8d725b424

I also tried using 19 pixel font in the texture drawing but it is way more blurry. I am not sure what to do. Also, I use Raylib vendor library in Odin.

package main


import "core:fmt"
import "core:math"
import "core:strings"
import rl "vendor:raylib"


font: rl.Font
big_font: rl.Font
test_sprite: rl.Texture2D


main :: proc() {
    rl.SetConfigFlags({.WINDOW_RESIZABLE, .VSYNC_HINT, .WINDOW_HIGHDPI, .MSAA_4X_HINT})
    rl.InitWindow(1280, 720, "Greed Ninja")
    rl.SetTargetFPS(60)


    target := rl.LoadRenderTexture(GAME_WIDTH, GAME_HEIGHT)
    // Load Silver fontwith
    font = rl.LoadFontEx("assets/Silver.ttf", 19, nil, 0)
    big_font = rl.LoadFontEx("assets/Silver.ttf", 19 * 2, nil, 0)
    very_big_font := rl.LoadFontEx("assets/Silver.ttf", 19 * 4, nil, 0)
    test_sprite = rl.LoadTexture("assets/victor.png")



    // Pixel art scale
    rl.SetTextureFilter(target.texture, .POINT)
    rl.SetTextureFilter(font.texture, .POINT)
    rl.SetTextureFilter(big_font.texture, .POINT)
    rl.SetTextureFilter(test_sprite, .POINT)
    rl.SetTextureFilter(very_big_font.texture, .POINT)


    for (!rl.WindowShouldClose()) {


        if (rl.IsKeyPressed(.F11)) {
            rl.ToggleFullscreen()
        }


        scale := f32(min(rl.GetScreenWidth() / GAME_WIDTH, rl.GetScreenHeight() / GAME_HEIGHT))


        rl.BeginTextureMode(target)
        rl.ClearBackground(rl.RAYWHITE)
        rl.DrawRectangle(0, 0, GAME_WIDTH / 2, GAME_HEIGHT / 2, rl.BLUE)
        // rl.DrawText("Somethign is wrong", 16, 16, 24, rl.YELLOW)
        rl.DrawTextureEx(test_sprite, {32, 16}, 0, 1, rl.WHITE)
        rl.DrawTextureEx(test_sprite, {32 * 2, 16}, 0, 2, rl.WHITE)
        rl.DrawTextEx(big_font, "Something is wrong", {20, 20}, 19*2, 1, rl.BLACK)
        rl.EndTextureMode()


        rl.BeginDrawing()
        rl.ClearBackground(rl.BLACK)
        rl.BeginBlendMode(.ALPHA_PREMULTIPLY)
        rl.DrawTexturePro(
            target.texture,
            {0, 0, f32(target.texture.width), -f32(target.texture.height)},
            {
                math.floor((f32(rl.GetScreenWidth()) - GAME_WIDTH * scale) * 0.5),
                math.floor((f32(rl.GetScreenHeight()) - GAME_HEIGHT * scale) * 0.5),
                GAME_WIDTH * scale,
                GAME_HEIGHT * scale,
            },
            {0, 0},
            0,
            rl.WHITE,
        )
        rl.EndBlendMode()
        rl.DrawTextEx(
            big_font,
            strings.clone_to_cstring(
                fmt.tprintf(
                    "Scale at %.2f, Target width %.2f Target Height %.2f",
                    scale,
                    GAME_WIDTH * scale,
                    GAME_HEIGHT * scale,
                ),
                allocator = context.temp_allocator,
            ),
            {16, 16},
            19 * 2,
            1,
            rl.WHITE,
        )
        rl.DrawTextEx(
            big_font,
            strings.clone_to_cstring(
                fmt.tprintf(
                    "Top left corner x = %.2f, y = %.2f ",
                    math.floor((f32(rl.GetScreenWidth()) - GAME_WIDTH * scale) * 0.5),
                    math.floor((f32(rl.GetScreenHeight()) - GAME_HEIGHT * scale) * 0.5),
                ),
                allocator = context.temp_allocator,
            ),
            {16, 48},
            19 * 2,
            1,
            rl.WHITE,
        )
        rl.EndDrawing()


        free_all(context.temp_allocator)
    }


    rl.UnloadRenderTexture(target)
    rl.UnloadFont(font)
    rl.UnloadFont(big_font)
    rl.CloseWindow()
}
reddit.com
u/mmknightx — 6 days ago