Useful Links


milkshake

Advanced Member
Joined
May 18, 2009
Messages
3,748
Age
39
Location
Rotherham, UK
Hi,


In order to help those that would like to learn how to program with c++ I thought I would share the best resource I have found so far which is brilliant for people who have never coded before and a good refresher for those that have.


http://cplusplus.com/doc/tutorial/ C++ Tutorials


http://code.google.com/edu/languages/cpp/basics/index.html Googles C++ tutorials - thanks Trip


http://www.cpp-home.com/ Website dedicated to c++ has support forums (dont ask for help with homework) - thanks WizardStan


http://www.cppreference.com/wiki/ - An unofficial cpp wiki containing information and examples about nearly all cpp functions, classes, keywords, libraries, etc. (can be added as a search engine in firefox) - thanks foxblock


http://www.youtube.com/user/antiRTFM C++ video tutorials :) - thanks Ruddie


http://w1xer.at/pandora/ Also this fully-working 3D game demo code, WakeBreaker, ported to the Pandora and ready to run in case you want a sample app to base your C++ education on. - thanks torpor


You will need more than just C++ to create a game through unless you want to spend loads of time writing your own librarys.


Suggested librarys are SDL but Im gonna try using Penjin you will need the SDL libraries to successfully use Penjin. - thanks foxblock


Penjin documentation is here


http://lazyfoo.net/SDL_tutorials/ SDL tutorials - thanks Ravngr


http://sdl.beuc.net/sdl.wiki/FrontPage - SDL documentation - thanks foxblock


http://nehe.gamedev.net/ OpenGL tutorials - thanks Ravngr


The best IDE (integrated development environment) I have found is called code::blocks and I believe most devs including those that use Penjin use this so for support purposes this would probably be the best way to go, also its cross platform meaning you can get this for Windows, Mac & linux.


There is also Qt http://qt.nokia.com/ which is cross platform IDE which comes with its own UI framework (user interface library).


And you could also use Eclipse which is another IDE - thanks Ravngr


http://www.codelite.org/ - Another IDE, very similar to CodeBlocks, but more light-weight, also available for Windows, Mac and Linux - thanks foxblock


You will also need a toolchain for pandora development there are some topics in the gp32x forum which include some toolchains click here and there is also one by DJWillis as well here which was recommended to me by sebt3 and because I'm using ubuntu this is brilliant :) .


Once you have all the above installed/set-up you should be ready to go all I can say is good luck and happy programming!


I hope this topic can guide beginners into (game) programming masters :) also this guide is just info I have picked up from other people and other topics so if any other suggestions or changes are needed or if I have missed anything out please let me know so I can update the guide thanks.
 
Last edited by a moderator:
There's a heap of good SDL tutorials out there, there's also some for OpenGL in general.


Qt is also a good starting point for those learning C++. It's basically a huge library that should be compatible with the Pandora (in addition to Windows, Mac and Linux), it also comes with an IDE and a heap of demos.


I've also used Eclipse in the past for C/C++ development. It's nice enough, but it has a steep learning curve if you truly want to master it.
 
http://www.cpp-home.com/ - Not recently been updated, but still contains a lot of tutorials and code challenges. The forum is also home to some fairly intelligent individuals that are always willing to help, unless it's to do your homework. Don't ask them to do your homework for you. Saying "but it's due tomorrow!" will not win you any points.
 
Some general C++ stuff:


http://www.cppreference.com/wiki/ - An unofficial cpp wiki containing information and examples about nearly all cpp functions, classes, keywords, libraries, etc. (can be added as a search engine in firefox)


http://www.cplusplus.com/ - Also features a complete library reference, but additionally you can find tutorials, example source codes and a forum here (and more)


SDL specific:


http://sdl.beuc.net/sdl.wiki/FrontPage - SDL documentation


http://www.codelite.org/ - Another IDE, very similar to CodeBlocks, but more light-weight, also available for Windows, Mac and Linux


btw, Penjin basically is just a wrapper around SDL to ease use of it through objects, so you will need the SDL libraries to successfully use Penjin.


foxblock out
 
Don't forget the fully-working 3D game demo code, WakeBreaker, ported to the Pandora and ready to run in case you want a sample app to base your C++ education on ..


http://w1xer.at/pandora/


Bonus points: you can build WakeBreaker *on* your Pandora .. ;)
 
I've found doing cross platform development that something like CMake or Sconstruct is invaluable to simplify the build process.


CMake in particular is great, on windows it will generate VS project files and on linux it will generate makefiles.


Really cool, I've found it great as I do most of my dev on linux but like to keep compatibility with windows so this lets me do that without messing about with VS files.


Also I think boost is one of the best C++ libraries out there. I've found things like shared_pointer to be really useful in games.


Also for networking Beej's guide to berkeley sockets is amazing : Beej's guide.
 
Anyone looking for an open source(wait what? code::blocks is open-source? Man, my head is messed up. Fine...) alternative IDE should check out Geany.


At first I thought the idea of an IDE was kinda nooby, but a friend of mine wanted a 'pretty IDE to use'(groan - not his exact words!) so I went looking. I found geany, built it, ran it and switched to it. It's *great*. And the fact that it uses GTK can be a plus since wxWidgets does not need to get loaded but I guess the effects of that are negligable.
 
Last edited by a moderator:
Is there a way to code C++ and Visual Basic directly on a Pandora? I'd imagine notepad++ or something similar would suffice.
 
Last edited by a moderator:
Visual Basic, no.


C++, yes. You can use vi or emacs, or mousepad if you want some kind of gui editor. Those are just text editors though, not IDEs.
 
i use vim to code c++ (I'm learning), i've made a shellscript(my first one) to speed up things when testing :



Code:
$ cat /usr/bin/compile

#!/bin/bash

# compiles it, run it, then erase the binary file

# uses g++


filename=$1

shift 1

args="$@"


echo compiling $filename

echo args passed: $args


g++ $filename -o $filename.o $args && ./$filename.o && rm $filename.o

you use the script like this:



Code:
$ compile helloworld.cpp -lSDL_image -lSDL_ttf

# will produce a line like:

$ g++ helloworld.cpp -o helloworld.cpp.o -lSDL_image -lSDL_ttf && ./helloworld.cpp.o && rm helloworld.cpp.o

compiling helloworld.cpp

args passed: -lSDL_image -lSDL_ttf

and any error that the compiler output

the && operator on a shell assures that the next command will be executed only after the previous had success.

Inside vim you could use this script by typing:



Code:
:!compile helloworld.cpp -lSDL_image

it will do its thing and then, it comes back to vim.


helpful? to me, yes


i'm open to new ideas
 
C++, yes. You can use vi or emacs, or mousepad if you want some kind of gui editor. Those are just text editors though, not IDEs.
You can also use SciTE, it has tabs, and can operate almost like an IDE (build, run, see compiler errors/other output). /shameless plug
 
You can also use SciTE, it has tabs, and can operate almost like an IDE (build, run, see compiler errors/other output). /shameless plug

Also Jedit works, need the Java PND to go with it. This is my most used programming editor, don't have my Pandora yet to see how well it works.
 
I tried setting up Code::Block (codeblocks-10.05mingw-setup.exe) with SDL as instructed http://wiki.codeblocks.org/index.php?title=Using_SDL_with_Code::Blocks (the "Good" method) on Windows 7 but I can't get it to work.


I downloaded and unpacked SDL-devel-1.2.14-mingw32.tar.gz and copied


* sdl.dll to /CodeBlocks/MinGW/bin/


* the contents of /lib to /CodeBlocks/MinGW/lib/


* the folder SDL to /CodeBlocks/MinGW/include/.


Now in Code::Blocks when I click File -> New... -> Project -> SDL project -> Go -> I get to "please select SDL's location". Now no matter which directory I enter (I thought it would be /CodeBlocks/MinGW/) I get either the error "The path you entered seems valid, but this wizard can't locate the following SDL's include file: SDL.h in it." or that it can't find the include directory or that there needs to be an include and a lib directory. What am I doing wrong?
 
Back
Top