4,995 questions
-2 votes
0 answers
41 views
How to properly manage vertical offset for ghosts oscillating between tiles in Pac-Man ghost house
I am implementing ghost behavior in a Pac-Man clone, specifically the behavior when ghosts are inside the ghost house during the waiting phase. The issue is that ghosts inside the ghost house do not ...
1 vote
1 answer
149 views
Gamepad input reading becomes sluggish when window is minimized
I’m currently working on a mouse injector for emulators project I’ve forked on github. The issue: When after some seconds the application is minimized I get sluggish gamepad inputs and input delay. ...
0 votes
1 answer
92 views
Bounds-checking SDL_Surface::pixels?
In the SDL_Surface structure, is there a way to calculate the bounds of the pixels Member? I need a quicker way of doing this, so my code doesn't catch seg-faults while running. On my Linux Laptop, ...
0 votes
0 answers
90 views
i686 compiler with GNU and SDL3 failing to claim window
I am using an i686 system, with the compiler mingw G++. I can run code that creates a GPU device and attaches it to a window fine on that machine. However, when I attempt to run it on my i686 windows ...
0 votes
1 answer
98 views
`vkGetMemoryWin32HandleKHR` tries to dereference a null address
I'm trying to create a shared texture between Vulkan and OpenGL, and as I understand the process, it's split in two parts: exporting the memory during allocation and then getting a Windows HANDLE to ...
2 votes
1 answer
266 views
Modify a SDL3 texture using a framebuffer?
I'm trying to modify a texture pixel by pixel using a framebuffer, In my code I'm trying to fill the texture with white pixels, nothing seems to work. #include <iostream> #include <SDL3/SDL....
0 votes
1 answer
230 views
Imgui can not find SDL3/SDL.h file
I am trying to learn imgui by first create a project using its library. But, first I wanted to run one of the examples found in the github repository. I am not using an IDE, only my mac terminal. ...
-1 votes
1 answer
169 views
How can I manage Memory?(SDL2)
Whenever I go to debug and run my game, the memory just climbs, As you can see, I wipe the memory after I'm done with it (so I thought) Any tips on managing memory in this state? (using Visual Studio ...
1 vote
0 answers
283 views
SDL program can't find available video device on NixOS
I'm using NixOS and trying to learn SDL, yesterday I got a code example to build and work but today it stopped working, I tried rebuilding everything in a different directory with no success. I'm ...
1 vote
0 answers
106 views
SDL2's SDL_RenderDrawLine() antialiases lines in Windows but not in Linux?
I wrote a basic program to draw a line across two corners of the screen with SDL2: // Linux build: // gcc test.c -lSDL2 -lSDL2main -o test // // Windows build (Linux VM using MinGW): // x86_64-w64-...
0 votes
0 answers
163 views
SDL3 Android Manual Build - App won't start
I'm automating the Android build process for an SDL3-based project without using Gradle. While SDL provides an Android project template, it doesn't fully cover my case, so I'm customizing it to ...
2 votes
1 answer
112 views
SDL_PollEvent() function strangely impacts rendering
I came across a behavior in SDL3 that concerns me. In SDL3, the standard position of the origin of the screen's coordinate system is in the upper left corner. I tried rendering a simple 100x100 ...
0 votes
0 answers
146 views
SDL_GL_CreateContext() fails without an error message
I'm building an OpenGL 4.6 application using SDL3 and GLAD, compiled with g++: // g++ -Wall -Ofast main.cpp include/glad/glad.c -Iinclude/SDL3 -Linclude/SDL3 -lSDL3 -lopengl32 -o build/program #define ...
13 votes
1 answer
1k views
SDL_Init() fails without returning an error?
When I try to execute this SDL3 program: // g++ -Wall -Ofast main.cpp -Iinclude -Iinclude/SDL3 -Linclude/SDL3 -lSDL3 -o build/program #define SDL_MAIN_HANDLED #include <iostream> #include <...
2 votes
1 answer
247 views
SDL3 window wont show the presented D3D11 swapchain
I've been writing my own game engine using SDL3 and DX11. I've been able to get the HWND and set it to swapChainDesc.OutputWindow and set the color to pink: #define SDL_MAIN_USE_CALLBACKS 1 #include &...