Example project: Bitfighter - SDL 1.2 and 2.0 code running s |
D B
Guest
|
Hi,
I just thought I'd make a short post about finally completing migration to SDL 2.0 a few weeks ago in our project, Bitfighter (http://bitfighter.org); an OpenGL, 2D, space combat game. I am only posting in hopes that it may be of use to anyone wishing to see some example code. Specifically, we use the SDL input and video sub-systems for our client. Bitfighter compiles with both SDL 1.2 and 2.0 on Mac, Windows, and Linux. It runs with full functionality with both SDL versions (albeit slightly better with 2.0 and window handling on Mac and Windows.) Right now we build as default at SDL 2.0 for Mac and Windows, but 1.2 for Linux (until distros start distributing 2.0...) Our code repository is here: https://code.google.com/p/bitfighter/source/checkout Specific classes that may be of interest: zap/Event.cpp zap/Joystick.cpp zap/VideoSystem.cpp zap/Cursor.cpp Enjoy, scoff, whatever. And thanks for a good library! D _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
Re: Example project: Bitfighter - SDL 1.2 and 2.0 code runni |
RodrigoCard
|
Thanks for sharing =)
|
|||||||||||||
|
Example project: Bitfighter - SDL 1.2 and 2.0 code running s |
René Dudfield
Guest
|
Cool, thanks! This should be quite helpful. Bookmarked for later.
On Tue, Apr 24, 2012 at 6:52 AM, D B wrote:
|
|||||||||||||
|
Example project: Bitfighter - SDL 1.2 and 2.0 code running s |
umen
|
Great! thanks
do you know more examples of open source SDL2 games/apps? On Thu, Apr 26, 2012 at 10:47 AM, René Dudfield wrote:
|
|||||||||||||||
|
Example project: Bitfighter - SDL 1.2 and 2.0 code running s |
Kai Sterker
Guest
|
On Thu, Apr 26, 2012 at 9:56 AM, Meir Yanovich wrote:
Adonthell is also written to support both SDL and SDL2, preferring SDL2 when available. That's the SDL backend https://github.com/ksterker/adonthell/tree/master/src/gfx/sdl https://github.com/ksterker/adonthell/tree/master/src/input/sdl And here is SDL2 https://github.com/ksterker/adonthell/tree/master/src/gfx/sdl2 https://github.com/ksterker/adonthell/tree/master/src/input/sdl2 It's using SDL_mixer for audio, so that code is the same for both SDL and SDL2 https://github.com/ksterker/adonthell/tree/master/src/audio/sdl Kai _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Example project: Bitfighter - SDL 1.2 and 2.0 code running s |
Vittorio Giovara
Guest
|
Hedgewars engine supports SDL2 conditionally: the desktop version
still prefers sdl1.2 libraries while the sdl2 version is used on the mobile port. Have a look at http://code.google.com/p/hedgewars/source/browse/hedgewars/SDLh.pas Vittorio On Thu, Apr 26, 2012 at 11:48 AM, Kai Sterker wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
Thanks |
Manuel Montoto
|
Thank you very much for sharing it :-)
|
|||||||||||
|