Thursday, February 14, 2008

Compiling Pingus and SuperTux on OLPC

Both Pingus and SuperTux compile mostly out of the box on OLPC, but tracking down the dependencies can be annoying. First you need to install some extra packages via the Terminal Activity, this handly command will do that:

yum -y install \
cmake \
subversion \
glibc-devel \
imake gcc \
gcc-c++ \
scons \
make \
boost \
boost-devel \
libpng-devel \
openal-devel \
physfs-devel \
libogg-devel \
libvorbis-devel \
SDL_image-devel \
SDL_sound-devel \
SDL_net-devel \
SDL_mixer-devel \
SDL dosbox \
xorg-x11-proto-devel \
libXi \

Once done you have to download the actual source, for SVN that would be:
  • svn checkout
  • svn co svn://
Stable releases would be:
The SuperTux 0.1.3 release works very well, while the SuperTux SVN version is horrible slow when it comes to alpha-blended rectangle or fade-in/outs. With Pingus both work more or less the same.

With SuperTux you have to change ~/.supertux2/config to use "sdl" instead of "opengl" as video target or it will fail to start.

Some more notes:
  • start pingus with "./pingus -g 1200x900 -f" to get the full thing, it will however be slow, so you might want to lower the window size to something like 1024x768
  • music eats a lot of CPU so you want to disable it, for Pingus that can be done with "./pingus -m" for SuperTux you can do it via the menu
  • launching the games in window mode causes them to be positioned at the top/left, launching them in fullscreen causes them to be centered, but in fullscreen you will lose the ability to switch applications, since the game grabs all keyboard input, on the plus side this allows you to use the F1-F12 keys, which otherwise are handled by Sugar
  • you can change the screen size of SuperTux SVN in ~/.supertux2/config, it will however slow the game down a lot, you still get 20fps, but it will play very slow
  • SuperTux 0.1.3 will give you a very tiny window, NintendoDS size, but it will run very playable at 40-50fps, on the worldmap and in the menu you however can't use the gamepad keys, the configuration only affects the actually in-level gameplay, you have to configure your keys yourself in the menu
  • I haven't found a way to change the resolution/video-mode, so you can't have fullscreen and good FPS for now, XVideo extension might be a workaround, but I haven't looked into it
General note about OLPC performance: Watching video via Mplayer and XVideo works very well, but the machine doesn't have enough power to fill the screen without XVideo, so fast fullscreen is likely not going to happen, unless there is a way to change the video resolution or harness XVideo for non-video content.

No comments: