sdl

pyGame within a pyGTK application

What is the best way to use PyGame (SDL) within a PyGTK application? I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events. ...

Linux/X11 input library without creating a window

Is there a good library to use for gathering user input in Linux from the mouse/keyboard/joystick that doesn't force you to create a visible window to do so? SDL lets you get user input in a reasonable way, but seems to force you to create a window, which is troublesome if you have abstracted control so the control machine doesn't have ...

How do I draw text using OpenGL, SDL and C++?

I heard about SDL_TFF which I read about here but I don't understand how am I supposed to connect the TrueType2 library. Maybe there is something better out there? ...

Making a game in C++ using parallel processing

I wanted to "emulate" a popular flash game, Chrontron, in C++ and needed some help getting started. (NOTE: Not for release, just practicing for myself) Basics: Player has a time machine. On each iteration of using the time machine, a parallel state is created, co-existing with a previous state. One of the states must complete all the o...

How to statically compile an SDL game on Windows

I have been trying to produce a statically linked "single binary" version of my game for windows. I want to link with sdl, sdl_image and sdl_mixer which in turn pull in a few support libraries. Unfortunately I haven't found a way to get them all to compile and link using cygwin/mingw/gcc. As far as I can tell all existing public versions...

How do I use Qt and SDL together?

I am building a physics simulation engine and editor in Windows. I want to build the editor part using Qt and I want to run the engine using SDL with OpenGL. My first idea was to build the editor using only Qt and share as much code with the engine (the resource manager, the renderer, the maths). But, I would also like to be able to run...

ubuntu trouble with SDL

I'm trying to learn to use SDL for a little game I'm writing , but I have a problem . One single application can play sound at a given time on my system . If for example I have amarok or kaffeine ( or even firefox while playing a flash video ) , no other application can play sound . The only solution I've found is to run just an applicat...

Best 2D animation library/tech for "iPhone" style animation on WIN32?

All, I have built a nifty demo application that displays data about our internal systems as a full-screen "billboard" style display. You could think of this as something like an application displaying the national deficit - rapidly increasing numbers, animating very quickly, all day. The problem is that the demo works really well and t...

Is there an acceptable limit for memory leaks?

I've just started experimenting with SDL in C++, and I thought checking for memory leaks regularly may be a good habit to form early on. With this in mind, I've been running my 'Hello world' programs through Valgrind to catch any leaks, and although I've removed everything except the most basic SDL_Init() and SDL_Quit() statements, Val...

Is Python and pygame a good way to learn SDL?

If I want to move to C++ and SDL in the future, is Python and pygame a good way to learn SDL? ...

No SDL Keypress events being detected

I am completely stumped as to why this code does not get any SDL keypress events. The other SDL events (removed for clarity) work fine. It does not work on my XP or Vista machines. No compile/link errors, just never recieve a keydown event. #include "SDL/SDL.h" // Yes SDL.lib and SDLmain.lib are linked Uint32 TimeLeft(void) { stati...

Maximize SDL window

How should I tell SDL to maximize the application window? I'm creating the window with these flags: SDL_OPENGL | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE. Thanks for your replies ...

SDL_event KEYDOWN behavior problem

Here is the problem, I have written an event loop to detect keydown and keyup events. The problem I am running into is that a keydown event is generating a keydown and a keyup event when the key is pressed and held down. I am using the arrow keys to move an object and then to stop moving when the key is released(keyup). Any help would...

Proper way to scale an SDL Surface without clipping?

what is the proper way to scale an SDL Surface? I found one explanation online but it required redrawing the Surface pixel by pixel. It seems like there should be some way of doing this natively through SDL rather than redrawing the image like that. I haven't been able to find anything in the SDL documentation that covers this. I am able...

Need a client-side interactive 2D world map: best map package? Or best C++ graphics/canvas library to make one?

I need a 2d political map of the world on which I will draw icons, text, and lines that move around. Users will interact with the map, placing and moving the icons, and they will zoom in and out of the map. The Google Maps interface isn't very far from what I need, but this is NOT web related; it's a Windows MFC application and I want ...

Segmentation fault using SDL with C++, trying to Blit images

OK - I have an interesting one here. I'm working on a tetris clone (basically to "level-up" my skills). I was trying to refactor my code to get it abstracted the way I wanted it. While it was working just fine before, now I get a segmentation fault before any images can be blitted. I've tried debugging it to no avail. I have posted ...

Problem with SDL_DisplayFormatAlpha (c++)

As I stated in this question, I am using SDL for a small game I'm developing. Now I am having problems with SDL_DisplayFormatAlpha. I am trying to create a surface with an alpha channel from a PNG image. It was working before, but now that I've done some slight refactoring something got broken. I've narrowed it down to this construct...

SDL Event Debug Problem

I am currently trying to get SDL events to work, but problem is that the program is not working. When I ran the program; it open and closes very quickly, and the debug gave these errors: The thread 'Win32 Thread' (0xb60) has exited with code 1 (0x1). The thread 'Win32 Thread' (0xe00) has exited with code 1 (0x1). The thread 'Win32 Thr...

SDL Window Close Problem

I am experimenting SDL Events and i came into a problem. For some reason, I am unable to press the "X" or close bottom on the top right of the window application. Now I am currently unsure if that is related to the SDL coding, or it's a problem of window browser. Does anyone know if it's either a SDL problem or a Window problem? ...

How to convert an OpenCV IplImage to an SDL_Surface?

Hey all, I'm trying to write a program which takes an SDL_Surface, converts it to an IplImage, uses the cvBlobsLib to find blobs, paints the blobs as spots back over the image, then converts the output IplImage back to an SDL_Surface. I'm almost done: only converting the IplImage back to an SDL_Surface hasn't been done yet. This IplIma...