Questions tagged [sdl]

Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
87 views

Structure for a strategy game

I am making a strategy game like Age of Empires. It's a pretty big project and I need a clear game structure. I have defined a Game_Object class with variables ...
2
votes
1answer
161 views

Making text scroll correctly with a textbox

So let me just get this right out of the way, I'm using SDL1.2 (Lispbuilder-sdl specifically, as I'm using Common Lisp), so on to the problem. I'm trying to make a scrollbar that can scroll text in an ...
2
votes
0answers
869 views

OpenGL textures make very low fps

I loaded some textures just one time before I go to my mainloop(glutMainLoop). I am using SDL for the texture loading. However, when I compile, my game is running at 6-10 fps. When I don't load the ...
1
vote
0answers
257 views

SDL C++ Flood Fill Performance

I'm using SDL and I need to quickly fill a lot of polygons (fake 3D walls, made linking calculated points with the SDL_RenderDrawLine() function, that I need to ...
1
vote
0answers
523 views

OpenGL - Texture disappears

I'm making a simple program with C++, SDL and GLEW. So far it is going great but I ran into a weird problem. One of my four textures would not show up on screen even though it used the same code as ...
1
vote
0answers
97 views

Tile Collision - subtracting a minor value to the box size

I'm having a certain problem when doing collision checks on bounding boxes that have their edges aligned with upper or right tiles. It shouldn't count as an intersection but I don't know a good ...
1
vote
1answer
72 views

Is there a way to duplicate the windows desktop zooming in SDL to make low res pixels look like stylyzed cartoon art?

When you hit the Win key and numpad plus key at the same time it opens the desktop magnifying glass and the effect of this on low res pixel art is to make it look like super cool stylized cartoon art. ...
0
votes
1answer
86 views

The A * algorithm in the map has many moving objects

I am using the A * algorithm for my game, it is a kind of Isometric map with lots of tiles. If all the game objects are trees, rocks, houses and only one game object is a moving hero, the A * ...
0
votes
0answers
36 views

Blitting multiple SDL_Surface texts on top of an empty SDL_Surface results in strange outlines

I'm trying to create a single SDL_Surface that has multiple lines of texts stacked on top of each other using SDL2. When I create a single ...
0
votes
0answers
92 views

Inverted left & right stick axes in SDL2

I've faced a weird problem with SDL2. ...
0
votes
0answers
238 views

Creating A Selectable Object in SDL/C++

I'm trying to create a clickable object. I wrote a pseudo code to try it. When I add a new member to object it works fine, that is when I hold the mouse cursor on the rectangle determined it returns ...
0
votes
1answer
310 views

OpenGL 2D Origin in Upper Left Corner

I got an OpenGL Context Working in SDL, and I'm trying to set it up so I can render with pixel coordinates of the screen. I got this trying to fill the entire screen with a white rectangle: ...
-1
votes
1answer
383 views

How can I build DOOM (SDL-Version) with MinGW?

I have recently been trying to build this source code here. I am building the original port with SDL infused, not the linuxdoom port and I’m having some issues. What I have tried first: I've ...
-1
votes
1answer
177 views

Is my frame rate being calculated correctly?

I'm having a long headache (which may not be that complicated) with this frame rate thing. I already tested several frame rate algorithms, lastly I tested this here and they all gave something strange ...
-1
votes
1answer
69 views

How can I replicate jQuery's slideDown animation in SDL?

I'd like to know how I could make a slideDown animation in C++ using SDL. How would I implement the animation in SDL?
-1
votes
1answer
55 views

Why I'm not getting any kind of output in SDL?

Here's the code that supposed to display the texture: ...
-1
votes
2answers
360 views

My 2D collision code does not work as expected. How do I fix it?

I have a simple 2D game with a tile-based map. I am new to game development, I followed the LazyFoo tutorials on SDL. The tiles are in a bmp file, but each tile inside it corresponds to an internal ...