Sdl Games


thelamer

ARRR I'm A Pirate
Joined
Dec 9, 2005
Messages
393
Age
40
Location
Lake Zurich IL USA
Website
www.skankpost.com
LINKAGE

Minus the ones with incomplete source codes and commercial games . And the ones that are to cpu intensive . But besides that isn't an sdl based game really what most of the devs want to port .

I have been trying to take in all the info I can about porting games in the past few days ( the wiki is really helpful ) . And I am definetly in way over my head .

Can anyone explain to me what kind of work is really involved in porting a SDL game that has a full source code and can be easily run by GP2X's hardware , and does not require a new menu system ?
 
Basically you have to fix the screen resolution and modify the control stuff to use the GP2X's funky joystick implementation. You might also have to modify where it saves data files and high score tables.

Get a copy of devkit2x or some other compiler, and a set of libraries that satisfy the program's dependencies (http://wiki.gp2x.org/wiki/Libraries). Compile and go :)

The difficulty level really depends on how modular the original code is and how well you can understand it. Generally it's not too bad.
 
That's an awfully big list of games you got there. Potentially, yes, assuming that all of the libraries are available and currently working for the 2x.

Allan.
 
So do a lot of other people. :)

I did notice an open-source, SDL based Infinity Engine port around there.. imagine playing Planescape Torment on a handheld (shudders with glee). It's horribly unrealistic, but it's nice to dream.

Allan.
 
Basically you have to fix the screen resolution and modify the control stuff to use the GP2X's funky joystick implementation. You might also have to modify where it saves data files and high score tables.

Get a copy of devkit2x or some other compiler, and a set of libraries that satisfy the program's dependencies (http://wiki.gp2x.org/wiki/Libraries). Compile and go :)

The difficulty level really depends on how modular the original code is and how well you can understand it. Generally it's not too bad.

Is that really all there is to it? I've been considering trying my hand at porting a few simple games but the screen resolution thing is the big stumbling block for me. It seems like in addition to lowering the resolution, I'd have to scale down all the images and re-figure-out where they should be. Which I guess wouldn't be too hard, just a bit of a pain in the ass. Is there any good articles/howtos on the subject that a beginner could use as a starting point?
 
Last edited by a moderator:
... I'd have to scale down all the images and re-figure-out where they should be. Which I guess wouldn't be too hard, just a bit of a pain in the ass....

Well, an easy way to take care of the resolution thing (though it would reduce performance and might not look nice) is to take the original game's source code, and whenever you see the code drawing to the screen, technically during a screen flip (which should be just once per frame), shrink the SDL_Surface down to 320x240 and then draw the new modified surface to screen.
 
Last edited by a moderator:
Use the hardware SDL libs, then set the SDL_VideoMode video size to anything you like. When you screen flip, it'll automatically scale.
 
Back
Top