How Do I Port A Game?


Bofosho

Still Fresh
Joined
Jun 26, 2010
Messages
54
I want to start porting.
I found an awesome FPS 3D game called AlienArena.
It is opensource and is on both windows and linux.
Am I missing a guide that is easy to find?
I searched but could not find one.

Please help it would benefit the community :p

http://icculus.org/alienarena/rpa/index.html
 
Step 1: Download and install a cross compiler.
In the Makefile of the source, you should be able to replace "CC=gcc" with "CC=/path/to/arm-gcc" and "CXX=g++" with "CXX=/path/to/arm-g++"
Step 2: Run make.
Step 3: Fix anything that didn't work.
Step 4: repeat steps 2 and 3 until it works.

You will most definitely be missing some libraries as well. You may be able to download ARM versions directly, or it may be easier to just get the source and make them. As an immediate guess, you'll probably have a problem with OpenGL. We do not have OpenGL on the Pandora: we have OpenGLES, a subset of OpenGL intended for embedded systems. Your first big step will be to obtain the OpenGLES dev library and then rewrite anything in the source that is OpenGL specific to be OpenGLES. That is likely to be quite a large pain, I'm sorry to say.

Alternatively to step 1 (and the step of having to build libraries yourself) it is possible to (and some people insist on exclusive use of) build directly on the Pandora. In order to get a compiler, you'll need to install some stuff to NAND. The following will get you going:
Code:
sudo opkg update
sudo opkg install gcc
sudo opkg install make
sudo opkg install libsdl-1.2-dev
Someone else will have to tell you how to get the openGLES library, because I still haven't figured out how to do it right. :(
Otherwise, you can then just perform steps 2-4 directly on your Pandora. If it says you are missing a library, go to the Angstrom repo and see if a development version of that library already exists. If not, you may be able to build it yourself.
 
Everything you need to get started writing 3D apps for your Pandora is explained here.

Everything: how to get your Pandora set up for development, how to get the necessary libs installed, and even a full-blown example (with sources) of a 3D game that you can compile *on your Pandora* without fuss.

Just follow the guide in the readme.txt, and build WakeBreaker for yourself. Once you have a running Wakebreaker, you can use it as a base to start developing your game. You can also use it to verify that your environment is properly set up to do a port, for example ..
 
Last edited by a moderator:
torpor said:
Everything you need to get started writing 3D apps for your Pandora is explained here.

Everything: how to get your Pandora set up for development, how to get the necessary libs installed, and even a full-blown example (with sources) of a 3D game that you can compile *on your Pandora* without fuss.

Just follow the guide in the readme.txt, and build WakeBreaker for yourself. Once you have a running Wakebreaker, you can use it as a base to start developing your game. You can also use it to verify that your environment is properly set up to do a port, for example ..
Honestly, you do not want to compile "really large stuff" directly on your pandora! Really good example: I need >20mins on my Desktop system with a quadcore core2 at 2.5GHz to compile Wesnoth for the pandora (using -O3). While doing so it uses more than 1.5GB ram (yeah, just for compiling, not counting the normal system load!). Trust me, you do not want to do anything like this. The better solution for "large stuff" is setting a cross compiler. Following this forum thread it is rather easy and manageable for normal beings.
 
Last edited by a moderator:
Honestly, you do not want to compile "really large stuff" directly on your pandora!

There are no technical reasons for 'not wanting to do this' .. only personal. If you can wait, and don't want to deal with any of the hassles of maintaining a cross-compiler toolchain and matching libraries, then compiler-on-board is *the best solution for getting started right away*. The difference in compile times is more than made up for in the less stress endured during setup and figuring out if things went wrong with the cross-compile, and so on. Plus, you don't have to install anything if you compile-onboard - you can just test right away. Even with cross-compiling you're adding a few time-positive steps to the process .. you have to pack up the .PND, transfer it to the real Pandora, open it, test it, etc.

Plus, you'd be surprised how useable it is to have a compiler-onboard. 20k lines of source code are built in less than a minute. Not too shabby!

(Just sayin' .. don't be turned off from this approach just because other people can't be bothered to wait an extra few minutes in between builds .. compiler-onboard is a *perfectly workable solution* and has served me well in over 20 years of software development as a means for getting stuff done with as little fuss as possible..)
 
shotwebs.jpg
 
Thanks for the help.
I will come back with any problems I have.
 
Back
Top