Skip to main content

Questions tagged [sdl2]

SDL2 (Simple DirectMedia Layer 2) is designed to provide platform independent access to various common multimedia devices. It is the new, current and updated version of SDL and recommended for new projects over legacy SDL1.2

Filter by
Sorted by
Tagged with
1 vote
1 answer
141 views

while I was trying to optimize SDL2 rendering phase as much as possible, I reached a wall. I tried to search on the internet but I could not find any solution. So, I need help. Let me explain the ...
Binary Series's user avatar
1 vote
0 answers
179 views

I’m a beginner developing a 2D game in SDL2 using C with a visual style that uses crisp high resolution graphics (like geometry dash and Hollow Knight -- not pixel art). I want the game to scale ...
NewCoder's user avatar
0 votes
0 answers
45 views

I am a freshman cs major with an interest in game dev. I know next to nothing and am very new to this so please bare with me. TLDR; Should I use BSP for detection between moving and static objects as ...
L1ghtkage CaptainL1ghtning's user avatar
0 votes
1 answer
115 views

When drawing transparent PNG data on to the renderer, pixel data of any previous drawing (layer beneath) is replaced with the renderer's drawing color (green). I have tried setting blend mode in the ...
AntumDeluge's user avatar
0 votes
0 answers
80 views

I want to render terrain efficently using perlin nosie and a lots of rects. Should I use rects or is there another way. Following is my implementation. I use rect size = 1 which is not really ...
Syntax Error12's user avatar
0 votes
1 answer
98 views

I am trying to create a Voxel Space Engine In SDL2 C++. However the tutorial I am following reads the X and Y pixels of the heightmap image. I can't find a way to do this. I am following this tutorial:...
Nabir14's user avatar
  • 59
0 votes
1 answer
214 views

(I apologize in advance for my awful English) I'm writing a personal UI library in C++ using SDL2, and when came the moment to implement icons, I struggled to find how to render them in a unique color....
Gkcrafting's user avatar
0 votes
1 answer
173 views

Currently, the way I render my frames is as follows. I have two arrays of pixels (in SDL_PIXELFORMAT_ABGR8888) called ...
Scene's user avatar
  • 123
0 votes
3 answers
154 views

So, I've been working on a game dev library using C++ and SDL2 (to test the library out I'm making a Pong clone). And now I'm writing a Scene Manager which is going good, I can switch between scenes ...
smooll's user avatar
  • 1
0 votes
1 answer
332 views

I'm currently developing a game on Windows using the MSYS2 environment and mingw64. I've successfully installed SDL2 using the msys package manager (pacman) and using CMake, was able to get it up and ...
nz881's user avatar
  • 21
0 votes
2 answers
252 views

I am trying to set up a basic toy example of how a loading screen would work in SDL. Here is my code below. ...
lancen's user avatar
  • 33
0 votes
3 answers
953 views

I'm trying to create a scene manager system for a small framework I'm writing on top of SDL2. I have implemented a scene management system that works, but I am not sure if it is structured how it ...
Sphereishere's user avatar
1 vote
0 answers
382 views

I want to implement an isometric map with rectangular tiles similar to how it was in simcity 2000, where tiles could have different heights and tiles with different heights were connected by slopes. ...
SavedowW's user avatar
1 vote
2 answers
263 views

I've been learning C++ and SDL2 and I'm trying to improve at using composition and for the longest time I thought it was only useful for making things like players, enemies, coins, etc, and I think ...
Konjointed's user avatar
0 votes
1 answer
557 views

Is it possible to copy into a SDL_Surface what is displayed in the screen from a SDL_RendererPresent? using ...
Raffaello's user avatar
  • 125
0 votes
1 answer
440 views

I'm working on a top-down 2D RTS with C++ and SDL2, and have implemented the biome/terrain generation, tile rendering and a rudimentary camera system. I already have the skeleton code in place that ...
ireece1's user avatar
0 votes
1 answer
352 views

i am learning how to make a 2d game using sdl and c++ and am currently trying to rotate the sprite so that is always facing the cursor, my game is set up with an entity component system, i have a ...
user21746705's user avatar
0 votes
1 answer
234 views

I'm making a simple SDL2-based Rust game, on an OSX laptop. Graphics mostly involves drawing lots of colored squares to the screen. Performance is really slow for what I'm doing, so I decided to ...
sclamons's user avatar
0 votes
1 answer
239 views

I am programming a game in SDL2 and I am looking for advice on how to handle interactivity of UI components when the screen resolution and logical resolutions are different. Up to now I have been ...
lancen's user avatar
  • 33
1 vote
0 answers
81 views

My team and I released our game on Steam last year for Windows, Mac, and Linux. The game is written in C++ and uses SDL2, including SDL2_image, SDL2_ttf, and OpenGL for graphics. Around the middle of ...
Nicolas Ford's user avatar
1 vote
0 answers
128 views

I am observing strange behaviour with VSync in SDL. I have this code: ...
arminb's user avatar
  • 201
0 votes
0 answers
1k views

After a long time away, I'm coming back to SDL, using version SDL2. I have some example code that does pretty much exactly what I want it to do, but I want to change the pixel color. Ive tried ...
j0h's user avatar
  • 101
0 votes
1 answer
785 views

I am trying to make use of the Tiled Map Editor for my SDL2 projects. (By using the TMXLITE parser from Fallahn on Github) https://github.com/fallahn/tmxlite ...
I_Keep_Trying's user avatar
0 votes
0 answers
160 views

I am new to SDL but have used C++ a fair bit over the years. I'm struggling with displaying sprites with a scale. EG. Here I am trying to draw a grid of squares (ie. Tetris) but the source BMP is ...
I_Keep_Trying's user avatar
0 votes
0 answers
1k views

I am trying to get the Antialiasing (multisampling) in OpenGL with SDL to work(as shown here), but the result doesn't change and I still get jaggy edges. Before rendering I call the following ...
TheBaum's user avatar
  • 43

1
2 3 4 5
8