Beginner Programmer Lol


G Morgan

Still Fresh
Joined
Jan 31, 2006
Messages
65
Age
39
Location
South Wales
Website
Visit site
I'm on the verge of buying a GP2X and I'm wondering about writing games for it. I've done some basic C (Function, Pointers, Files, Simple stuff really) but the stupid text book I have doesn't go into any detail about how to make that stuff useful (unless I want to play with command lines only).

Is there a compiler to build C programs in a GP2X format first of all? If so can somebody provide me a link to an online intermediate guide to C preferable including how to get some kind of graphics on screen rather than dealing with text all the time.

If not which lanuages does the GP2X support and where can I get hold of the relevant software (Compilers, IDE (will KDeveloper do the job) and a guide).

Crucially does anybody have some idea of what games I could clone (something simple like pong, tetris, space invaders. Somebody say GTA3 and I may lose it completely) as a learning aid.

A link to any info about how to design the game to work in GP2X would be nice as well.

Finally (having read the similar Emu thread) if anyone wants to call me stupid please feel welcome. Being Welsh I've had it all my life and by now am completely immune :) . Also to any one English on here, your lot are on the end of a slamming this saturday of course :D .

Cheers in advance.
 
I'm on the verge of buying a GP2X and I'm wondering about writing games for it. I've done some basic C (Function, Pointers, Files, Simple stuff really) but the stupid text book I have doesn't go into any detail about how to make that stuff useful (unless I want to play with command lines only).

Is there a compiler to build C programs in a GP2X format first of all? If so can somebody provide me a link to an online intermediate guide to C preferable including how to get some kind of graphics on screen rather than dealing with text all the time.

If not which lanuages does the GP2X support and where can I get hold of the relevant software (Compilers, IDE (will KDeveloper do the job) and a guide).

Crucially does anybody have some idea of what games I could clone (something simple like pong, tetris, space invaders. Somebody say GTA3 and I may lose it completely) as a learning aid.

A link to any info about how to design the game to work in GP2X would be nice as well.

Finally (having read the similar Emu thread) if anyone wants to call me stupid please feel welcome. Being Welsh I've had it all my life and by now am completely immune :) . Also to any one English on here, your lot are on the end of a slamming this saturday of course :D .

Cheers in advance.
I know your feeling exactly I need a fecking personal tutor.

Edit: haha, he is welsh. nm guys. ;)
 
Last edited by a moderator:
If you ever get it :( . On this website it suggests 24 hour delivery. I haven't put my order in yet, if I did it now when can I expect to receive it.

It's probably a bad idea starting to learn now with the 6N starting and all. Most periods of lucidity will be spent eating I imagine.
 
Yes, you can program in c for the gp2x. For graphics, sound, and key input I would recommend learning SDL (I'm currently doing this) as it makes it much easier.

THIS website has some nice tutorials (they're what I'm following), but they are all in c++..... the site has c++ tutorials as well if you would like to learn that.
 
6N? <_<


Me being stupid. 6N refers to the annual 6 Nations rugby union tournument between (in the order they finished last year) Wales, France, Ireland, England, Scotland and Italy.

Generally in Wales it means every man gets drunk and either bawls like a little girl or struts around like a jock depending on the result against England (the game which happens this saturday).

Anyway good stuff on the programming so far. C++ works as well then, or am I just being stupid.
 
Last edited by a moderator:
6N? <_<


Me being stupid. 6N refers to the annual 6 Nations rugby union tournument between (in the order they finished last year) Wales, France, Ireland, England, Scotland and Italy.

Generally in Wales it means every man gets drunk and either bawls like a little girl or struts around like a jock depending on the result against England (the game which happens this saturday).

Anyway good stuff on the programming so far. C++ works as well then, or am I just being stupid.
Yep C++ works as well, as the guy said, those SDL tutorials will help you get some proper games and such working if you follow them out.
 
Last edited by a moderator:
Generally in Wales it means every man gets drunk and either bawls like a little girl or struts around like a jock depending on the result against England (the game which happens this saturday).

judging by previous results, you welsh are going to stampede us :(

come back jonny.. come back... :ph34r:
 
Last edited by a moderator:
Generally in Wales it means every man gets drunk and either bawls like a little girl or struts around like a jock depending on the result against England (the game which happens this saturday).

judging by previous results, you welsh are going to stampede us :(

come back jonny.. come back... :ph34r:

I'm not so sure about that. Depends on how Wales hanndle the set piece and how both 12's play. I can assure you the Welsh 12 is not the best tackler on the planet (to mimic you come back Henson ahhhhhhhhhh). Will be interesting anyway, hardest game to call for a long time considering our injury problems and the posibility that Tindle may actually catch the ball for your lot come saturday.

As for the programming, I have Borland C++ Builder how would I add the gp2x development files to that. Theres a guide for MS Visual C++ but since its MS I'd prefer not to. Doesn't seem to be a guide on getting it to work with Kdevelop either. Will have a mess around, if all goes to hell theres always the uninstaller.
 
Last edited by a moderator:
Hi there,

I'm a first timer too, feel free to grab the source for my first game from
Whacky Penguin
It's pieced together from tutorials and lots of poking at it to see how it works.
It's almost finshed but it mostly playable.

The code is not going to be great to learn from but it will probably point you in the right direction if used as a "what not to do" guide :)

Chimpoid
 
C++ and C are your best bet for programming on the 2X.
You are best off learning C/C++ from a text-book first, just so you get used to the syntax.

Once that is all done and you think you can handle something a little more game related you can start looking into SDL. SDL is a very nice little media/input library that allows you to access the hardware will little fuss, while still giving you the most control over the actuall program itself.

Try Sol's tutorials for SDL, they start off with graphics and then move onto making a Monkey-Ball clone.
[http]http://sol.gfxile.net/gp/[/http]

When you start learning SDL, it is probably best to do it all on a PC for the time being, until you think you have the hang of it. Once you think you got it and you become more familliar with the 2X, then you can try porting over your game to the 2X.

As for a compiler for the 2X, well... for a beginner (i would know I am one ;)) it is a little complicated. You need a development toolchain, like DevKitGP2X or the GPH SDK, which can output binaries in gp2x (ARM) format.

DevKitGP2X for Windows:
[http][/http]
GPH SDK for Windows:
[http][/http]

Depending on your Skill and OS, you may want to try making your own Toolchain using the DevKitGP2X-Buildscript for Linux.

After you have the toolchain you will need some libraries, you can find them on the wiki or in the file archive... or again.. if your brave, you can compile your own.

Phew... almost done... If you are using an IDE you will need to set it up to use the gp2x toolchain (compiler) so that your binaries are in GP2X-Compatible format. Again the wiki is has alot of helpfull information on setting up the toolchain with Dev-C++ and MSVC++

Hopefully that helps. It take a bit of work... but once you see your own creation running on the 2X you will smile with absolute happiness and it will all seem worth it.

Good Luck.

NOTE: as for porting games for learner experience... try some small SDL games like "Linux Lunar Lander" or "cRacers". They are fairly straight forward... and they use SDL.
 
Set up IDE (Devcpp, didn't want to screw with Borland when theres a perfectly good guide to Devcpp, lazy but works for now) with SDL. Prints tutorial, grabs coffee and paracetemol. Gets to work.

Hopefully I'll have something to show before the men in white coats come for me. Will have to learn C++ now as well. All good I suppose.

Thanks to everyone who helped.
 
@ G Morgan : I think you missunderstand the difference between C and C++. There really isn't one as far a syntax goes. If you know how to write C code then C++ is easy. It is identical. The main difference between the two is the way they attack similar problems, also C++ is largely Object Oriented, but still works with linear code.
 
I kind of knew that but had intended on learning the differences. Bound to be of help even if most the C stuff will still work.

Have ordered my GP2X anyway. It says 24 hour delivery so will expect it on Thursday sometime given that I ordered it at 2.30 in the morning.
 
Does anybody have a working piece of code for SDL. I've followed tutorial 1 as far as I can and I'm finding the nice colourful screen simply doesn't come up when I run the code. I've checked it over 5 times line by line in comparison to whats in the tutorial and still find it doesn't work. Working code for that tutorial isn't on the site so I couldn't find anything there. My thinking is if I try something that definately works and it doesn't work on my machine then it's likely that the code isn't the problem but that something about my setup is.
 
Back
Top