• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Greemaxc

Start with SFML or SDL?

12 posts in this topic

Hey
I have been programing c++. I would like to start programming games and I heard that SFML and SDL would be good to start and to do great games, but witch one should I use. I also would like to ask for good tutorials for SDL and SFML.
Thanks.
0

Share this post


Link to post
Share on other sites
To be honest I started a project with C++ and SDL, was going perfectly until sprite rotation. SDL isnt friendly with sprites to be honest, and as it uses the CPU only and not the GPU it isnt very good to do the rotation on the fly, as it could cause major lag on many machines, If you want to create a quite simple basic game or program I would say go for SDL as it is nearly supported by everything, If you want something that uses the GPU and doesnt cause a huge amount of process to the CPU go for SFML. I converted all my SDL project to SFML in a very short time, and as I have worked with SDL before I feel that SFML is much easier and well...just easier to understand.

Canvas
1

Share this post


Link to post
Share on other sites
SDL 1.3 (now named 2) runs on OpenGL behind the scenes, so it's the same as SFML regarding that.

I'd still go for SFML because it's easier to use, and the things that SDL supports and SFML doesn't (like multiple windows) are generally not needed.
2

Share this post


Link to post
Share on other sites
[url="http://lazyfoo.net/SDL_tutorials/index.php"]Lazy Foo's SDL tutorials[/url] are very popular if you wanted to go the SDL path.


Both APIs are very capable, and the core functionality is very similar (and as noted above, the latest version of SDL does use hardware rendering like SFML where possible) although you'll probably find that due to it's age there are more add-ons for SDL ('though due to [i]their[/i] age some of them may not be currently maintained! [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img]). Both APIs are very popular and have active and helpful communities. The documentation provided for SFML is fairly detailed and provides plenty of information to get started, but you'll probably find -- again due to the maturity of SDL -- that although SDL doesn't have quite as comprehensive official documentation there are quite a few more third party tutorials, articles and code samples available online; Lazy Foo's tutorials (linked above) are often suggested as a starting point for SDL, whilst SFML beginners simply start with the official documentation.

It mostly comes down to personal preference: I'd recommend taking a look at some of the tutorials and reference materials available for each API and choosing whichever makes more sense and looks like a better style [i]to you[/i].


All that being said, if you would like our suggested preferences, I personally prefer SFML -- I just felt the topic was a bit one-sided thus far and that SDL should also be properly presented as a viable choice, as both are capable APIs that you should be able to learn without undue difficulty. It's worth quickly noting also that due to the similarity of these (and other similar) APIs, if you learn either of them in detail you should find it relatively easy to learn the other at a later stage should you choose to do so.


Hope that's helpful! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
2

Share this post


Link to post
Share on other sites
[quote name='Canvas' timestamp='1341183738' post='4954679']
To be honest I started a project with C++ and SDL, was going perfectly until sprite rotation. SDL isnt friendly with sprites to be honest, and as it uses the CPU only and not the GPU it isnt very good to do the rotation on the fly, as it could cause major lag on many machines, If you want to create a quite simple basic game or program I would say go for SDL as it is nearly supported by everything, If you want something that uses the GPU and doesnt cause a huge amount of process to the CPU go for SFML. I converted all my SDL project to SFML in a very short time, and as I have worked with SDL before I feel that SFML is much easier and well...just easier to understand.

Canvas
[/quote]

Actually, you can mix OpenGL and SDL for hardware acceleration. (Someone correct me if I'm wrong). Basically you would use SDL_opengl.h for SDL's OpenGL functions.

Anyway, for simplicity and moderate portability, go SFML.

For massive portability and moderate difficulty, go SDL.

I haven't really used SFML, I just really found out about it yesterday in fact. It's really simple, or maybe I say that because I've been working with OpenGL and SDL for a while now. I personally strongly recommend SDL, as it's well matured and it has great portability. It's also a great starting point for understanding how some of the behind the scenes magic works. To me, SFML's weakness is its simplicity. That's just my personal opinion, I like being able to see what I'm working with and make it work for what I want it to.

I may not be the best guy to get an opinion from as I did just find out about SFML yesterday, but I did test it and got it to work no problem. Edited by Spirrwell
1

Share this post


Link to post
Share on other sites
There is a C variant of SFML if you dig around on the SFML-dev.org website, so you're not forced into incorporating C++ code into your project if that's your intent. Edited by radioteeth
1

Share this post


Link to post
Share on other sites
[quote name='radioteeth' timestamp='1341197295' post='4954740']
There is a C variant of SFML if you dig around on the SFML-dev.org website, so you're not forced into incorporating C++ code into your project if that's your intent.
[/quote]
Pretty unlikely given the OP specifically mentioned C++ and hasn't made mention of C...
1

Share this post


Link to post
Share on other sites
I've used SDL for a few games and found it easy enough to get along with. After picking up C++ again, I was building SDL games in a matter of weeks thanks to Lazy Foo. I've posted a few articles over at [url="http://sednihp.wordpress.com/"]my blog[/url] about some different things I've come across whilst developing my SDL apps, which might come in helpful, along with the sourcecode to the games to download as well if you want to have a look at what kind of code SDL produces.

I've found it remarkably easy to use SDL, the only thing I've come across that it doesn't do (so far) is rotation. I'm sure if I played around with the OpenGL side though I could nail that down. Lazy Foo has a tutorial for everything that you could need and each one has working sourcecode that you can run and see working and interrogate to make changes and see how they impact the output. I really can't praise the man enough.
1

Share this post


Link to post
Share on other sites
Thank u guys, very helpfull. I started with C before C++ and im still practicing object oriented programming with c++ but ill go with SFML then.
0

Share this post


Link to post
Share on other sites
[quote name='Zoomulator' timestamp='1341218802' post='4954832']
I'd say SDL because it's just there silently in the background.
[/quote]
I just thought I'd quickly note that you can also use SFML in the same way -- and in the C++ spirit of "only paying for what you use" it's typically built as a series of separate components (some of which rely on each other) so that you can choose to only link against the functionality you're actually using.

[b]@Greemax:[/b]
Great, glad we could be of help making your decision, good luck with it!
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0