Live data from Hacker News

SDL 2.0.0 is out after many years in development

lists.libsdl.org

41–50 of 62 posts

Re: SDL 2.0.0 is out after many years in development

#42
post #4

Lately I started using SFML instead of SDL for C++ Game Development. However, I'll still use SDL on future projects I hope. It's a brilliant library, so compact and portable that the games you write will be able to be compiled to a lot of platforms, even high school graphing calculators[1]. The SDL development still impresses me and 2.0.0 is a major milestone and multiple windows, new OpenGL, touch support, Android a…

I really like SFML, I've been using for a small game project of mine as well. The API is just nice and beautiful. I was wondering how SDL 2.0 stacks up against SFML? Does anyone know much about it? I'm only doing 2D game development, so SDL's " simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes " is perfect for my needs. However it needs to support two basic thin…

There's a decent post on SO about it...

http://stackoverflow.com/questions/2842198/which-is-better-s...

Re: SDL 2.0.0 is out after many years in development

#43

Earlier quoted context omitted.

I really like SFML, I've been using for a small game project of mine as well. The API is just nice and beautiful. I was wondering how SDL 2.0 stacks up against SFML? Does anyone know much about it? I'm only doing 2D game development, so SDL's " simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes " is perfect for my needs. However it needs to support two basic thin…

Yes. SDL_RenderCopyEx and SDL_SetTextureAlphaMod is what you want.

Ah, thanks. SDL_RenderCopyEx seems like a very versatile function[1]. The 2D Accelerated Rendering doc[2] seems to cover all my basic 2D rendering needs. The wiki[3] is really nice, and I like the page listing APIs by category[4].

I think I'm going to switch to SDL, primarily for the Android/iOS support!

[1] http://wiki.libsdl.org/moin.fcg/SDL_RenderCopyEx

[2] http://wiki.libsdl.org/moin.fcg/CategoryRender

[3] http://wiki.libsdl.org/moin.fcg/

[4] http://wiki.libsdl.org/moin.fcg/APIByCategory

Re: SDL 2.0.0 is out after many years in development

#44
post #23
post #15

Earlier quoted context omitted.

That's great news, I always felt the whole SDL_main thing to be quite evil.

> That's great news, I always felt the whole SDL_main thing to be quite evil. Evil or not, it solves a practical problem that you would have to work around if SDL did not. And AFAIK, you have always had the option of not using SDL_main if you wish to solve the problem on your own. On desktop platforms the program entry point is pretty easy to solve (main vs. WinMain) with an SDL_main-style macro or command line args…

On OS X main was wrapped in a function that made it work with the Finder (manipulating an argv containing --psn).

It was annoying to me because I worked on a application that did the same thing internally and where SDL was not a hard dependency. But well, it's not that bad as I make it sound.

Re: SDL 2.0.0 is out after many years in development

#45

I remember using SDL more than a decade ago and in general it was a pleasant experience. My only gripe was that it needs to hijacked the main loop. Nevertheless, I will give it a shot again. Good work Sam!

I wrote a silly (unfinished) game about 10 years ago, and SDL portability never ceases to amaze me. The game has been ported to devices I didn't even know they existed.

It's amazing because I did it for fun and I used some data structures I would have never expect to be so portable (ie. using a double linked list of objects in static memory instead of alloc/free). I wonder if that's why it works even in very limited hardware.

My favourite, the game running on a TI-Nspire calculator: http://www.youtube.com/watch?&v=acdAqxiwG7I&t=15

Re: SDL 2.0.0 is out after many years in development

#47
post #39
post #36

Earlier quoted context omitted.

> Let me guess: it's still impossible to minimize a full screen game on Linux or alt-tab etc. You can hardly blame SDL for this, games are not really what X11 was designed for. Setting up full screen and asking for exclusive access to the keyboard will prevent the window manager from doing anything to it. My solution for this problem: use a window manager that can full screen any window and switch back. > and the joy…

> You can hardly blame SDL for this, games are not really what X11 was designed for. It's funny how the Windows version of the game usually works just fine in Wine, minimization and window switching included. > Setting up full screen and asking for exclusive access to the keyboard will prevent the window manager from doing anything to it. Then why are they asking for exclusive access to the keyboard in the first plac…

IIRC, there was a presentation by Valve where they complained that even if you don't do a keyboard grab, some window managers do it for you when you request a fullscreen window.

For an SDL2-using game, I tried BrütalLegend and alt-tab works as you'd expect when using OpenBox. I usually just run games in a separate X server with just OpenBox to isolate them from messing with my main desktop. Plus, they can't block ctrl+alt+F7.

Re: SDL 2.0.0 is out after many years in development

#49
post #14

Earlier quoted context omitted.

SDL exists, is tiny, modular and efficient. Not to mention has loads of extensions.

#include int main(void) { GLFWwindow* window; if (!glfwInit()) return -1; window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL); if (!window) { glfwTerminate(); return -1; } glfwMakeContextCurrent(window); while (!glfwWindowShouldClose(window)) { /* Render here */ glfwSwapBuffers(window); glfwPollEvents(); } glfwTerminate(); return 0; } VS #include #include /* Our program's entry point */ int main(int argc,…

That doesn't show that GLFW is simpler than SDL. It just shows that GLFW has some simple defaults. How much complexity is added to the GLFW code if you want to require a minimum GL version and depth buffer size? Or a fulllscreen window?
Post reply on HN