Need Advice On Learning To Code


jeebus66

Still Fresh
Joined
Jun 4, 2006
Messages
19
Location
London, UK
Website
Visit site
Hey ppl,

I'm interested in learning how to code, so I can start coding for the gp2x. Anyone got any tips or links to sites that teach how to code. I really am a beginner as I know no languages at the moment (apart from html :p ) and I havent found any kind of comprehensive guide on coding for the gp2x.
Thanks in advance :)
 
This is probably better suited to the Development / I need help forum. But anyway, I'd recommend you read Ivor Horton (of Wrox Press') Beginning C book, then once you understand how to write a simple C app and know the basics (variables, data types, casting, loops, that sort of thing) go ahead and pick up a book on SDL or alternatively SDL game programming, or check out some online tutorials (some are about as good). You want to learn the fundamentals of game operation (e.g. game loops and event handling for input, how to draw a frame and manage time/speed etc.) and you need to know how to handle graphics, audio and input via SDL. That is, if you CHOOSE to use SDL, which is the most logical for a beginner game developer.

The most important thing to remember is just that the GP2X is a tiny ARM9 computer that can run basically any SDL app. You just need to consider its actual computational power (stick with integer or fixed-point code only!), its graphical capabilities (color depth, resolution and how to use the blitter [easy]), its memory capacity and its input and custom tailor your SDL app to it. Aside from those differences .. if it runs on your PC it should run on your '2x! Good luck!
 
Shikaku posted on Jul 29 2006 at 04:39 PM said:
sam fisher posted on Jul 29 2006 at 06:36 PM said:
craigix posted on Jul 29 2006 at 10:50 PM said:
Install the compiler and piss about with the example code.
ha ha ha ha ha

It works actually...

Yes, but you won't learn too much that way. You need to at least bone up on the fundamentals of game programming and try to learn some SDL theory before you just learn from reading examples-- though that's great way to learn new techniques, features and ideas you hadn't thought of. I generally learn the core principles of whatever I am familiarizing myself with like C or SDL or the '2x hardware then use examples to expand my base of knowledge, learning as I work. I hate just studying endlessly and not getting anything done, so my projects are the means through which I learn. :)
 
Last edited by a moderator:
Shikaku posted on Jul 29 2006 at 11:39 PM said:
sam fisher posted on Jul 29 2006 at 06:36 PM said:
craigix posted on Jul 29 2006 at 10:50 PM said:
Install the compiler and piss about with the example code.
ha ha ha ha ha

It works actually...
Yess but what if he needs to do something not in the example code? He will not neccisarily know the concepts of programming. What you are suggesting is that he use a form of rote learning.
 
Last edited by a moderator:
I think learning to read code is as good of a first step as any, and messing with the examples might provide some "but how do I..." type motivation.
 
BradN posted on Jul 29 2006 at 11:32 PM said:
I think learning to read code is as good of a first step as any, and messing with the examples might provide some "but how do I..." type motivation.

C is pretty cryptic. If you just read it and memorize what commands do what, you'll be lost writing anything from scratch because you only see a small bit of the whole picture.
 
Last edited by a moderator:
No-one's mentioned Fenix yet? Okay, I'll do it:

If you know little/nothing of coding at all, perhaps remove some of the complexities of C coding from the equation to start with and give Fenix a gander. Sort out how a program (particularly a game program) works; move on to something more 'real' if and when the motivation takes you.
 
Epicenter posted on Jul 29 2006 at 11:49 PM said:
Shikaku posted on Jul 29 2006 at 04:39 PM said:
sam fisher posted on Jul 29 2006 at 06:36 PM said:
craigix posted on Jul 29 2006 at 10:50 PM said:
Install the compiler and piss about with the example code.
ha ha ha ha ha

It works actually...

Yes, but you won't learn too much that way. You need to at least bone up on the fundamentals of game programming and try to learn some SDL theory before you just learn from reading examples-- though that's great way to learn new techniques, features and ideas you hadn't thought of.

boulderdash.

I cut my teeth on other peoples code. first on the bbc micro typing up the fun games in micro magazine (my first ever was bricky nicky) and then later when I got back into it on the PC by opening up the example programs that came with div games studio, messing with some values and seeing what the difference was when I ran the program. for div, darkbasic, blitz, php, c and c++ i have -never- read a book. By the time i was onto C i just needed to update myself on the syntax as i already knew programming but what i didnt understand about C articles and tutorials online explain in a perfectly adequet fashion without needing to blow an extortionate 40+ quid that they seem to charge for a technical manual these days.

im not against books, I bought one for c# when it was brand new (because not much written online about it when it was new) and for GPU shader programming as that was also poorly documented online in the past. But things like c/c++ and SDL are so wide spread that there is a plethora of resources written perfectly for different levels of user that can often do a better job than a book and messing with example code is a complete education in itself and you can learn things the original author never even knew about by messing with values that wernt intended to change and seeing what excellent new results, or crashes, you get. Book is great for having on your lap or to brush up your skills in the bath or whatever - but theres no way its got as much as an advantage on learning possibilities over example code and online tutorials as you seem to suggest :p

< / rant>

edit:
guy above me just mentioned fenix - spirtual successor to div games studio, excellent for cutting teeth on. and as its function/process based it has alot more in common with C than a basic language does, great stepping stone.
 
Last edited by a moderator:
someone posted an SDL guide recently...and then someone who'd never programmd before made a little game from it.. any idea what that tutorial was? i'd like to have a crack at it
 
Epicenter posted on Jul 30 2006 at 10:32 AM said:
BradN posted on Jul 29 2006 at 11:32 PM said:
I think learning to read code is as good of a first step as any, and messing with the examples might provide some "but how do I..." type motivation.

C is pretty cryptic. If you just read it and memorize what commands do what, you'll be lost writing anything from scratch because you only see a small bit of the whole picture.
... Was what I meant.
 
Last edited by a moderator:
Woah, didnt expect this much response... thx guys!
Well ive got myself some C and C++ books, and borrowed a game design book of a friend. I should have alot of time to learn these as I am on holidays from uni.
So expect big things in the next few months on the gp2x scene! (lol more like years :p)
 
Back
Top