GP2X Developing A 2d Platformer


netwalker

Still Fresh
Joined
Jun 2, 2007
Messages
11
Hey All,

OK, I started a thread about 6 months ago wanting to start developing a game for the gp2x but wasn't really sure where to start. Due to life and other stuff this had to be put onto the backburner for sometime. However I'm now ready to start afresh and have another go (well I didn't get started in the first place ;)), I have the time and motivation to get coding on this cool little box. From the outset I would like to make it clear that I'm a pretty competent C/C++ programmer and have a reasonable knowledge of coding in ASM for 0x86 based processors, but I'm no ASM guru :(. This development knowledge has strictly been on DOS and Windoze based boxes. Although I recently installed a flavour of Linux (Ubuntu), I'm a first time user of this and it looks pretty cool :).

The actual game that I've got in mind will be one that I've already written its on my Windozw box. Its basically a 2D platformer, yeah right I know like the GP2X doesn't need another platformer :). Anyways as far as the algorithms go its pretty good. The game works at a good speed (on my main PC) and I'm happy with it. I just want to port it to the GP2X as an avenue to start developing for it. As a result I would also like to document the complete development process from start to finish. Maybe other newbies to the device might find the information within useful for their own projects on the GP2X. Also I love homebrew and emulation too :D.

Anyway I'm ready to get started. So lets talk dev tools:

So where to start?. Well I have been digging round and there appears to be a wealth of dev tools, so much so that I'm completely swamped in it all. This is even before I start to look at SDKs. They range from command-line compilers to fully integrated development environments. For convienence I would like to use a command-line version of a compiler.

So the first sets of questions are these:

1) Which command line compiler (and version) should I use to get started. Yes I know there is various information on official sites and what not, but I would just like to ask the opinions of you, the coders :). Which also offer good debugging tools?. Is there anything outthere that will allow me to debug my game remotely?.

2) Choice of SDK. I've been battling hard with this one!. SDL looks good and it looks a piece of cake to use but the overhead, I'm sorry but yuck!. So what other choices do I have?. Rlyeh's minimal lib?. That looks pretty cool. Has anybody around here used that before?. I've only seen a few tutorials on using it. Is it any good?. What kind of performance do you get?. What is the overhead in using it?. Could use ASM but that would mean learning ASM for a complete different CPU. As a technical challenge I would like one day to do a complete game from scratch in ASM for the device, but I'm being realistic and would like to learn to walk before I can run ;). So outside of the above mentioned what alternatives are there outthere?, if any.

3) Is there any advantage in using tools for Linux over Windows?. I know that the GP2x is a Linux box so should that make developing on a Linux box (Ubuntu) easier better than developing on a Windoze based box?.

Your thoughts and opinions are greatly appreciated.

netwalker.

p.s. @twojame: Guess what dude, I finally made it over here :D. See your game is coming along nicely too.
 

woogal

Certified Guru
Joined
May 15, 2003
Messages
1,823
Age
45
Location
Newark, UK
Website
gp32.sector808.org
The whole SDL overhead thing is pretty much a myth as far as I'm concerned. Yeah, it has a bit of overhead compared to writing your own tiny lib for your own needs, but used correctly the overhead is minimal for 99% of C based projects.
 

Daid

Member
Joined
Jun 13, 2006
Messages
267
Location
Netherlands
Website
Visit site
You should go to the hardware SDL, makes life easy for pretty low amount of overhead (not anything you will notice in a platform game anyhow)

And if you use windows to develop on then use MinGW with GCC, that gives you a huge load of linux (posix?) calls on windows. So you can easly cross develop. Ofcourse running on native linux has a few more advantages (I guess, I just use windows)
 

twojame

Member
Joined
Dec 27, 2005
Messages
120
Website
my-cognatus.co.uk
netwalker said:
Your thoughts and opinions are greatly appreciated.

netwalker.

p.s. @twojame: Guess what dude, I finally made it over here :D. See your game is coming along nicely too.

snip...
Good to see you over here chap...You'll love it here everyone is really friendly and helpful :) ... RE my game, I'm finding now that the hard bit for me is the enemy driving AI. God what a brain bender.

1,2... in terms of compiler i've just been using the CodeBlocks RC5 download on this site with SDL. Not sure of the version, but it all comes ready made and you can easily deploy to PC or GP2x with the sample projects. Before that it took me ages to even get a build ready.

3. I've found that I get along fine with windows development. My build process is like this. I build to pc using the debug line by line if need be and then say yeah that looks ok. Then I build the GP2X version.... At that point I run this script "_syncGP2X.bat"

"
del \\192.168.0.2\gp2x\mnt\nand\dev\monacoGP2X_GPL_r.gpe

copy C:\PROJECTS\_clients\jl\apps\monacoGPv2\built\monacoGP2X_GPL_r.gpe \\192.168.0.2\gp2x\mnt\nand\dev\monacoGP2X_GPL_r.gpe
"

which copies the new gp2x file onto the gp2x via my usb connection. Note I avoid copying to the SD because that seems to hang so it goes into "nand". This is all good for me because I can make changes quickly and see how they look on the gp2x.

...Hope this helps, it's late and i'm abit tired now, but I wanted to try and help out before I hit the sack.

Talk later...

J
 
Last edited by a moderator:

netwalker

Still Fresh
Joined
Jun 2, 2007
Messages
11
Afternoon Chaps,

Seasonal greets and all! :D. Right, I've spent this morning (with a damned hangover :() trying to get a compiler set up that can produce executables for my GP2x. After much swearing and keyboard bashing I've finally got it going :D. I've installed the devkitProGP2x toolchain along with the applicable SDL lib. I've got a batch file (ripped using a hacked makefile) that will allow me to do a build and send the .gpe file direct to NAND memory on my gp2x along with the applicable resources. After setting up my PC and GP2x in a little network. TwoJame, I hacked some code in that minimal batch file of yours, so thanks ;).

Ok I have now a couple of questions regrading Guyfawkes's SDL Test program. It works, but, I'm having issue with playing certain types of music files. The file types concerned are MP3 and OGG. I don't know if its something that I'm doing wrong or whether the lib doesn't as yet support them. These files when attempting to play just produce silence. However both MOD and WAV do work without problems. Are there any issues regarding SDL_Mixer, OGG and MP3 files?.
 
Top