• 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
infernapelover

DirectX or SFML or SDL? c++

9 posts in this topic

Which is better for game dev in c++, the directx,SFML or SDL library? I'm planning to make a rpg, starting 2d and evetually becoming 3d.
I know that directX is more used, but its really advanced for me, its taking me quite a while to understand code.
So I thought, let me check out more basic libaries, this led me to SDL and SFML? Which of these two is better?
Is directX that much better than these two libraries?
wouldn't it be hard to learn SFML and then have to reprogram the whole thing in directx for the 3d version later on.
Thanks in advance for any advice.

edit: Thanks everbody, i think ill look into SFML. Edited by infernapelover
2

Share this post


Link to post
Share on other sites
SDL is not only "sitting on top of OpenGL". It have complete 2d drawing functionality by itself. I use it directly on the linux framebuffer on a embedded arm device with no graphical hardware acceleration.. The OpenGL part of it is simply a wrapper on top of SDL to simplify using OpenGL without having to deal with the Win32 API. In your tutorial website, only the Lesson 36 start talking about OpenGL.
2

Share this post


Link to post
Share on other sites
Indeed, it has software rendering abilities. However, as the OP mentioned an intention to transition from 2D to 3D at a later point of time it seemed safe to assume that OpenGL (if either of the libraries were chosen) would be used at that point.

With that in mind, I'm pointing out that SDL and SFML are going to be dishing up their more powerful graphical goodness through exposure to OpenGL, rather than DirectX. This isn't to say that you can't use DirectX with either of them, it's just that the libraries, as you said, have a wrapper specifically for interacting with OpenGL.

The tutorial site only mentions OpenGL near the end probably because it's not something most people need to know immediately when jumping feet first into learning SDL. I don't know though since I didn't write the tutorials on that site.
1

Share this post


Link to post
Share on other sites
For starting out I'd recommended SFML. It's much more accessible for a beginner having a smaller, tighter and very responsive community. The sfml-dev.org tutorials are excellent. It's also a pure C++ API whereas SDL is C. It's also always been OpenGL from the start.

SDL is in the transition to 2.0. the available tutes, althought many, are confusingly unlabelled for which version they're for. Likeways the documentation is plentiful but confusing for a beginner. It's just less accessible.
2

Share this post


Link to post
Share on other sites
I also recommend SFML. A few years back I had to choose between SDL and SFML. Tried both and found SFML a lot easier to get started with. From what I remember you had to write a whole bunch of lines of code just to get SDL running, where as SFML only needed a few. I also found SFML to be more clean and organized, and generally a lot easier to understand.

Now in regards to DirectX, whether you should use it depends on what your goals are. Do you want to make games, or do you want to understand every little thing that goes on behind the scenes. If you want to make games, I don't recommend DirectX as it will take you too long to get anything done. Pick an engine like unity, or a library like Ogre3D if you just want to make 3d games. Your knowledge from SFML will transfer over quite nicely.
2

Share this post


Link to post
Share on other sites
I advice SFML. It is not just good for beginners, but also provides flexibility and options to advanced users. That said, it's API is easy to understand, clean and object orientated. You can integrate it too OpenGL very easily as it is built from OpenGL. As a result, it is also faster than SDL because of hardware acceleration.
Both SFML and SDL are transiting to their 2.0 versions (SDL 1.2 to SDL 2.0 and from SFML 1.6 to SFML 2.0). I would advise you to use SFML 2.0 as it is in it's RC stage and it's API isn't that different from SFML 1.6 - which means that you can follow the SFML 1.6 tutorials. SFML also has quite a good forum if you need help.

P.S. I do not have any experience at all with SDL, or with it's website and forum.
2

Share this post


Link to post
Share on other sites
[quote name='TheVirtualDragon' timestamp='1346326763' post='4974759']
As a result, it is also faster than SDL because of hardware acceleration.
[/quote]

SDL also supports hardware acceleration but it's just not enabled by default. When you compare SDL's software rendering to SFML's hardware-accelerated renderinig SFML is going to blow SDL out of the water. You should find they're pretty close to each other when both are in hardware-accelerated mode.

It seems like the general consensus is to go with SFML so I'll back that. I've just had no experience on it so couldn't give an opinion on it one way or another.
1

Share this post


Link to post
Share on other sites
I haven't tried SDL but I'm a beginner too and have been using SFML. I just made the transition from 1.6 to 2.0 after making a few projects in 1.6 and nothing really major changes so I'd recommend starting with 1.6 (which has tutorials) then switching once you're familiar with it.
1

Share this post


Link to post
Share on other sites
Another vote for SFML from me. Im a beginner myself and have chosen to go with this API, for mostly the reasons described by posters above. I took a look at both of them myself too and just found SFML easier and more intuitive. I had previously made a pong clone using C++ and the win32 API and it was hard work getting even a window up and I had to write a lot of code to get something to draw. I was blown away when I checked out the tutorials for SFML and saw how easy it was to get a window up and draw something. Edited by frazchaudhry
1

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