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.
20
votes
3answers
702 views
Multi-platform multi-threading: What are the real challenges?
While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different ...
10
votes
2answers
531 views
What should I worry about when changing OpenGL origin to upper left of screen?
For self education, I'm writing a 2D platformer engine in C++ using SDL / OpenGL. I initially began with pure SDL using the tutorials on sdltutorials.com and lazyfoo.net, but I'm now using SDL to ...
9
votes
1answer
279 views
SDL blitting multiple surfaces at once
I'm trying to write a platforming game where the sprites for the level backgrounds are broken up into 512x512 chunks. I keep 3 chunks in memory at a time and I'm trying to write code to blit all three ...
9
votes
1answer
510 views
Why does V8 not run with SDL threads?
i was able to compile and link V8 against my game and code interpretation works fine. However I want to divide my code and the game loop should exist in one thread and the scripting engine should run ...
8
votes
1answer
788 views
Getting OpenGL hardware acceleration with SDL on Linux
I'm trying to use SDL + OpenGL but I don't believe hardware acceleration is working because the framerate for around 18000 polys is about 24fps on a quad core machine but is a hopeless 1-2fps on an ...
8
votes
1answer
732 views
Separating logic/update from render/drawing code in a single thread using sleep
I've read that the speed of game objects should not be hindered by FPS but instead should be based on time. How can I seperate the update/draw code to maximize performance without limiting the drawing ...
8
votes
2answers
598 views
How to deal with OpenGL and Fullscreen on OS X
I do most of my development on OS X and for my current game project this is my target environment. However when I play games I play on Windows. As a windows gamer I am used to Alt+Tab switching from ...
7
votes
3answers
622 views
What is the contents of the buffer *after* a call to glSwapBuffers()?
(SDL_GL_SwapBuffers() in particular)
When you have drawn a scene, and you call swap-buffers, it is routine to then glClear() the scene before drawing anything; if you don't clear, what is the ...
7
votes
1answer
1k views
Turn-based JRPG battle system architecture resources
The past months I've been busy programming a 2D JRPG (Japanese-style RPG) in C++ using the SDL library. The exploration mode is more or less done. Now I'm tackling the battle mode.
I have been unable ...
7
votes
1answer
1k views
SDL2 with OpenGL — weird results, what's wrong?
I'm porting an app to iOS, and therefore need to upgrade it to SDL2 from SDL1.2 (so far I'm testing it as an on OS X desktop app only). However, when running the code with SDL2, I'm getting weird ...
7
votes
5answers
512 views
Graphics module: Am I going the right way?
I'm trying to write the graphics module of my engine. That is, this part of the code only provides an interface through which to load images, fonts, etc and draw them on the screen. It is also a ...
5
votes
3answers
881 views
What features do basic particle engines have?
I created a basic particle system for SDL in C++. It has some basic stuff like an emitter, as well as a simple particle class. It can load a image, or create a dot of a color. And that's it. What ...
5
votes
4answers
2k views
2D Platformer Collision Handling
I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font ...
5
votes
1answer
4k views
Time based movement Vs Frame rate based movement?
I'm new to Game programmming and SDL, and I have been following Lazyfoo's SDL tutorials. My question is related to time based motion and frame rate based motion, basically which is better or ...
5
votes
2answers
602 views
Custom extensible file format for 2d tiled maps
I have implemented much of my game logic right now, but still create my maps with nasty for-loops on-the-fly to be able to work with something. Now I wanted to move on and to do some research on how ...