Advertisement

so i took one look at the sdl source code...

Started by October 18, 2013 11:01 PM
2 comments, last by kop0113 11 years, 3 months ago

So i was looking at the SDL source code and my mind was blown. How long would it ever take a newb to be able write that type of code???

Don't worry about how long it will take to get you there; just take small steps. Before you know it, the source to SDL isn't daunting anymore.
Advertisement

Libraries like that are grown over time - someone didn't set out to code specifically what now exists, but it has grown from version to version, and with each new platform that gets supported. smile.png

If you come from a C++ background, have a look at the SFML source code - created mostly by a single person much more recently in history.

Also, what exactly do you mean by "that type of code"? Are you impressed by the number of lines or files? If so, that's not a good measurements for determining the quality of the code. wink.png

Because SDL is written in the C programming language, if you use C++ you shouldn't try to mimic the style of the C code, because C++ has different coding styles and recommended guidelines for quality code.

Take comfort in the knowledge that SDL is already written (and open-source) for you to always use rather than having to rewrite something similar yourself.

Also, using SDL with C and C++ is easy. Just like using .NET (C#) is easy whereas if you look through the source code of Mono (or shared source (rotar) versions of Microsoft's .NET) it is incredibly complex.

I tried porting Microsoft's .NET to a modern version of FreeBSD (it originally was created for Windows XP and FreeBSD 4.7). I got as far as the PAL abstraction layer before I started to get the shakes. Now I am writing games until I recover from the experience haha.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

This topic is closed to new replies.

Advertisement