2D game library help

Started by
11 comments, last by Servant of the Lord 9 years, 3 months ago

hello guys. I am totally new to Game programming.. I have basics knowldge of C++. and have started learning SDL tutorial from lazyfoo.net and finding it interesting. but when I searched about SDL, it seemed to me that nowadays people hardly use SDL SFML etc 2D libraries, rather than they use OpenGL, DeirectX etc. so is it good to begin game prograaming with SDL or I should move to 3D libraries or any other 2D libraries before going deep into SDL. one more thing is it good to use a Engine? or should I continue learning developing games manually? I need help plz. and lazyfoo's tutorial is good but sometimes it's not so clear. do you guys have any other resources or Books? if yes then please suggest me. Thanks in advance !

Plenty of people use SDL and SFML. For 2D graphics, those are usually what you want to use.

OpenGL and DirectX are for 3D graphics - though they can do 2D just fine as well, they are more complicated because they're more general purpose. SDL and SFML provide wrappers around DirectX or OpenGL to intentionally simplify things in a good way, without dumbing things down or slowing things down.

I've used SDL and SFML extensively, and currently am using SFML (and other libraries).

About engines: No, I'd suggest you do things "manually" for learning purposes, when working on 2D games. I advocate, in general, against engines for 2D games and for engines for 3D games. I've pontificated about it in other threads that I could dig up if you care about the why's, but in short, my advice would be to forget the word "engine" at this point of the learning process, and instead focus on making small 2D games "from scratch" using 3rd party libraries like SDL or SFML, and using other 3rd party libraries as needed.

As for books, I definitely recommend getting two C++ books - one that's a heavy textbook teaching modern C++11/C++14 practices, written within the last two years. And another that's just a fun smaller book you can flip-through on the couch for fun or use as a reference. I don't have any specific recommendations here, since the ones I used are now obsolete.

However, I don't recommend getting any library-specific books, like SDL or SFML books. SDL and SFML are simple enough you can read online tutorials, google when you have questions, and post here on GameDev or on the SDL or SFML forums when you really get stuck. wink.png

After programming for a year or two, there are more heavy duty C++ or general programming books that can improve your programming abilities further - but for now, it sounds like you're probably at the "syntax and features" level of learning, and those kind of books would be more confusing than anything.

When learning a more complex library like OpenGL or DirectX, it may be worthwhile getting some books, but I'd hold off on that for now - it'd be a waste of money, because by the time you are really ready for them, those library-specific books will be (mostly) outdated. wacko.png

And don't forget to check your library to see if they have any recent programming books... but don't read language-specific or library-specific books that are more than two years old. Older general programming concept books are fine though.

Hope that helps! Good luck on your programming journey. smile.png

Advertisement

hello guys. I am totally new to Game programming.. I have basics knowldge of C++. and have started learning SDL tutorial from lazyfoo.net and finding it interesting. but when I searched about SDL, it seemed to me that nowadays people hardly use SDL SFML etc 2D libraries, rather than they use OpenGL, DeirectX etc. so is it good to begin game prograaming with SDL or I should move to 3D libraries or any other 2D libraries before going deep into SDL. one more thing is it good to use a Engine? or should I continue learning developing games manually? I need help plz. and lazyfoo's tutorial is good but sometimes it's not so clear. do you guys have any other resources or Books? if yes then please suggest me. Thanks in advance !

Plenty of people use SDL and SFML. For 2D graphics, those are usually what you want to use.

OpenGL and DirectX are for 3D graphics - though they can do 2D just fine as well, they are more complicated because they're more general purpose. SDL and SFML provide wrappers around DirectX or OpenGL to intentionally simplify things in a good way, without dumbing things down or slowing things down.

I've used SDL and SFML extensively, and currently am using SFML (and other libraries).

About engines: No, I'd suggest you do things "manually" for learning purposes, when working on 2D games. I advocate, in general, against engines for 2D games and for engines for 3D games. I've pontificated about it in other threads that I could dig up if you care about the why's, but in short, my advice would be to forget the word "engine" at this point of the learning process, and instead focus on making small 2D games "from scratch" using 3rd party libraries like SDL or SFML, and using other 3rd party libraries as needed.

As for books, I definitely recommend getting two C++ books - one that's a heavy textbook teaching modern C++11/C++14 practices, written within the last two years. And another that's just a fun smaller book you can flip-through on the couch for fun or use as a reference. I don't have any specific recommendations here, since the ones I used are now obsolete.

However, I don't recommend getting any library-specific books, like SDL or SFML books. SDL and SFML are simple enough you can read online tutorials, google when you have questions, and post here on GameDev or on the SDL or SFML forums when you really get stuck. wink.png

After programming for a year or two, there are more heavy duty C++ or general programming books that can improve your programming abilities further - but for now, it sounds like you're probably at the "syntax and features" level of learning, and those kind of books would be more confusing than anything.

When learning a more complex library like OpenGL or DirectX, it may be worthwhile getting some books, but I'd hold off on that for now - it'd be a waste of money, because by the time you are really ready for them, those library-specific books will be (mostly) outdated. wacko.png

And don't forget to check your library to see if they have any recent programming books... but don't read language-specific or library-specific books that are more than two years old. Older general programming concept books are fine though.

Hope that helps! Good luck on your programming journey. smile.png


thanks Sir for you answer. it was really appreciable :) and yeah I am really learning SDL from scratch. I am following Tut from youtube and from lazyfoo.net they are good by the way :) and I have one book named "SDL game developemnt" (forgot the author name, something starts with R, and publisher is PACKT i think) which I will follow after I grasp all the general knowledge of SDL. and for C++ I have books also. C++ is not a problem for me. because I know it well. and about C++14 features I will definitely catch them (thanks for the info, I did not know that C++14 even exists now :P ) actual reason for this post was to know if SDL is better than SFML and Allegro. and also if learning 2D libraries is wise decision or not when we see 3D games eveywhere. Well now I know to make 3D game, I must have knowldge of 2D game :) thanks for it :)

actual reason for this post was to know if SDL is better than SFML and Allegro.

SDL is fine. SDL and SFML have different design goals, but both are perfectly suitable for 2D game development.

I've tried Allegro before, and personally didn't like it. I'd stick with SDL.

This topic is closed to new replies.

Advertisement