GP2X Sdl Question


shubox357

Still Fresh
Joined
Nov 9, 2005
Messages
37
I've been trying to learn C++ recently and plan on learning for a long time. Eventually I want to program games for the GP2X. I understand that to develope games for the GP2X I'll have to use SDL. Can I program normal C++ code into an SDL type program. A tutorial i saw for "Hello World" used commands i wasn't aware of, and that were different to those that I've learned in C++ so far. Do i have to learn an SDL language too to develop GP2X games?
 
SDL isn't a language. It's a library for things like graphics and audio. Your entire game is coded in C++, you just use SDL too.
 
SDL is a library of functions that you call from your C or C++ code. The SDL library itself is written in C. There is plenty of documentation and tutorials out there for using SDL.
 
c (or c++) actually only consists of things like if/while statements and other structural components. The 'commands' (actually functions) you are used to using like printf, fopen etc come from external libraries (when you include things like stdio.h and stdlib.h at the top of your program) and aren't really part of c. SDL is just another set of libraries which provide extra functions. Where the usual libraries give you things like console output, file loading etc, SDL gives you things like setting up a graphical screen, displaying sprites, sound output etc.
 
The SDL docs are really helpful too. Maybe not for examples but once you get the hang of it the docs will be your best friend :)
 
Back
Top