"Prison Break" Port?


I forget offhand.. if you set to 320x240 in SDL, and go fullscreen.. does it just center and not scale?

Could scale it yourself in software (SDL probably has routines for that, or easy to just write a brute-force for-loop to do it :p) You ould use a nice little library such as scale2x(), which you just give the pointer, the width of each raster line, and target buffer, and blam, it does a ncie scale-up with edge smoothing and such,.

Or use ofbset (try it at the terminal) in your run-script to set up (and unset later) the screen with scaling in hardware, sdo that its no code work,a nd nice and fast.

jeff
 
The problem is that I don't have my pandora, had to RMA it, so it would require another half dozen builds uoloaded here (and tested) to get it working :p
 
Hi there,

I am the original author of “prison break”.

I found this thread this morning trying to figure out why all of a sudden I had an spike of visitors coming from here. I am very glad to know that someone took the time to port the game to Pandora, something I had in mind to do once we received our unit (actually, I didn't pre-order a Pandora; my employer did. But he will let me “play with it” ^_^)

I would like to ask slaeshjag if he is willing to send me back the modifications that had to be done in order to make “prison break” work on Pandora. I would like to add these modifications, along with the proper credits, into prison break's bitbucket repository, so they don't get lost ;-). Either send me an email (you'll find the address inside the README file) or upload the sources somewhere I can fetch them.

Regarding the scaling issue, I don't remember why I forced the game to use a 320x240 resolution on all platforms. Usually, I find it too small to play on a desktop computer and I use bigger resolutions, “configurable” at compile time the game with a flag (SCREEN_SCALE). I even added the logic to the CMake scripts to do so…

When loading the resources, the game tries to use a “scale” function to, well, scale the graphics. If you look any of my other games, you'll see something like this in main.cpp:

Code:
resources.setGraphicScaleFunction(
    boost::bind(benzaiten::fastScale, _1, SCREEN_SCALE));

“benzaiten::fastScale” does a linear scaling of the image, where SCREEN_SCALE is usually 1 (no scale), 2 (double), 3, etc. Once the “scale function” is “installed”, there's no need to change anything else, because the resource loading automatically returns the images scaled and I believe that the game's logic is “size agnostic” in the sense that it always checks the images' width and height instead of assuming things. (This is because I wanted to make the game “scalable”, but somehow I didn't manage to do so…)

Again, thanks for the port and if I can be of any help, don't hesitate to ask me anything either by mail or here.

Regards,

Jordi
 
I didn't really do anything major, this is what I did:

Changed the enums for resolution in src/main.cpp (there is probably a better way of doing this, I'm very bad at following C++ code). Added a SDL_ShowCursor(0); in src/main.cpp (forgot where I saw it in the source tree). Then, in some function in lib/benzaiten/src/System.cpp, somewhere, I or'd in SDL_FULLSCREEN into the SDL_SetVideoMode call (along with flags).

You can probably add this the pretty way with ifdefs, since most toolchains pass -DPANDORA to the compiler through C*FLAGS.

Nothing was required to make it run at all, it worked first compile attempt.
 
There is a version of the SDL shared library from Notaz that supports hardware scaling.

See Thread

In the source code you set the screen to 320 x 240 and the sdl video driver will automatically scale to a set screen size.

You just need to include the .so.0 file in the pnd and then launch using a script such as:
export SDL_VIDEODRIVER=omapdss
export SDL_OMAP_LAYER_SIZE=800x480 (screen size to scale to - I guess you could select 640 x 480 to maintain the aspect ratio)
export SDL_OMAP_VSYNC=1
LD_PRELOAD=./libSDL-1.2.so.0 ./prisonbreak (or whatever the executable is called).
 
Last edited by a moderator:
Going to make a final build PND, so a couple of questions:

Should I set rendering to 400×240 and scale it up or is it fine as it is now?
What subcategory should I put it under?
 
My vote would be for 400x240 and scaling up, as the graphics are pretty tiny as-is. :p

As for the subcategory, I suppose Games -> Arcade, as it's that sort of game.
 
I don't have my Pandora to hand right now, so I'll get a couple of screenshots later.
 
I'm running into a problem with getting screenshots - they're coming out blank. :blink: Any pointers, please, anyone?
 
Could be the hardware scaling thingie causing it. I guess I can attach the one running at native resolution...

EDIT: Uploaded to the repo
 
Prometheus said:
I'm running into a problem with getting screenshots - they're coming out blank. :blink: Any pointers, please, anyone?


I found this link on screen shots if it helps out Screen Shots
 
Last edited by a moderator:
^ Thanks for the link, but I'm afraid it doesn't help. I have that script set up, and it doesn't work outside of the OS itself, so I was manually calling fbgrab (the program that the screenshot script calls). It worked on the native resolution one, but not on the 400x240 one.

Anyway, I guess it's a bit moot now that it's up on the repo. :p

@slaeshjag - Thanks muchly, man. :D
 
Lol this is wonderful. Great suggestion and thank you for the port its great :) Got 404 meters on my first try which I suspect isnt far but I'll be damned if the fuzz catch me again!
 
Back
Top