Need to know

Oct 7, 2011 at 12:49am
I have come to a point in my beginner programming career where I feel comfortable enough to start to program games. I've been trying to learn SDL but I've been having trouble since the SDL official documentation is meant for c and its the only reliable thing I could use. My main question is: is it possible to create a game( like ones you could make with SDL ) in c++ alone, if not is there any tutorials for SDL in c++?
Oct 7, 2011 at 12:53am
SDL is a C library, but everything you read about it in tutorials can be used in C++.
Oct 7, 2011 at 12:56am
Is it possible to make my own graphics library like SDL using only C++, because I think it would be a great challenge and good experience (Note: I am willing to do it even if it will take a long time).
Last edited on Oct 7, 2011 at 1:06am
Oct 7, 2011 at 4:33am
At the interface level, yes. At the implementation level, probably not, since you're bound to need to interface with the system, and said interfaces are usually in C.

SFML is a C++ library with a purpose similar to SDL's, but its design is massively different. You might want to take a look at that.
Oct 7, 2011 at 4:36am
using only C++


What do you mean by "only C++"? SDL is C (which can be considered part of C++), so in a sense using SDL is using "only C++".

If you mean to ask if you can write a graphic lib without using any other libs, then the answer is no*. There has to be some underlying API. The C++ language itself and standard libs do not offer any way to do anything with graphics or audio.


* technically it is possible, but it would be utterly ridiculous to attempt it

EDIT: doh, ninja'd
Last edited on Oct 7, 2011 at 4:36am
Topic archived. No new replies allowed.