How to get Tuxemon up and running on your Gameshell

Hello Everyone! Today I am going to walk you through the steps to get Tuxemon working on your Gameshell.

Difficulty (1-5): 2.5ish - Depends on your knowledge of the terminal

What you need:

  1. WiFi connection
  2. Device to ssh from
  3. Gameshell :stuck_out_tongue:

First you’ll want to ssh into the Gameshell from your favorite terminal. Once you do that, you should see this:
Capture

After that, type the commands:
cd games
mkdir tuxemon

From there, you should have a directory called “tuxemon” as shown here:
Capture

After that, enter these commands:
sudo apt-get update
sudo apt-get build-dep python-pygame

After, that is done, run this command (NOTE: Will take a while):
git clone https://github.com/Tuxemon/Tuxemon.git -b development tuxemon

After that, we need to update pygame and install more dependencies:
cd tuxemon
pip install -U -r requirements.txt

This will definitely take a while. Seriously. Go make yourself dinner or something.

Once it is finally done, it is time to launch the game!

When it first boots up, you may have an issue with the scaling. To make it function correctly, edit the file ~/.tuxemon/tuxemon.cfg to say:

resolution_x = 320
resolution_y = 240

Then find large_gui and set it to true

To get Tuxemon to show up on the main menu, enter these commands
touch ~/apps/launcher/Menu/GameShell/Tuxemon.sh
echo "python ~/games/tuxemon/tuxemon.py" > ~/apps/launcher/Menu/GameShell/Tuxemon.sh
cd ~/apps/launcher/Menu/GameShell/
chmod a+x Tuxemon.sh

Then reboot your gameshell. An image will be added when the game gets closer to completion.

You should be all set! Boot up Tuxemon and it should run fine!

When you want to update Tuxemon, just go back to the source directory, and type the command:
git pull

It will update Tuxemon to the latest version!

Have Fun!

4 Likes

Just a note:

Tuxemon is a WIP game, we are working on ironing out the kinks and finishing the story.

Bugs:
Not finished story
Battle Sequence doesn’t scale properly

I can’t seem to find the tuxemon.cfg. Can anyone help me out please?

You need to launch the application once for the config to be written.
Then it will be in your home directory (in a hidden .tuxemon directory)

I found it. Thank You.

how do i launch without the app in the launcher?

1 Like

python ~/games/tuxemon/tuxemon.py

1 Like

i did everything and the resolution is still weird

Can you upload a picture please?

One last item for the OP!

cd ~/apps/launcher/skin/default/Menu/GameShell/
cp ~/games/tuxemon/tuxemon/resources/gfx/icon.png Tuxemon.png

…to give it an icon. Or you could download my slightly modified version to be more inline with the rest of the icons…

Tuxemon

That’s awesome @lasvegas!

Would you be willing to make a pull request with your icon? That way, we can have it later on too :smiley:

I have no idea how to do that! :slight_smile:

LasVegas


and here is the code https://hastebin.com/guvedebano.ini

Hi first of all thnx for the tutorial. Following the steps worked fine for me :slight_smile:. Is there a possibility to change the key mappings? At the moment a have to do everything with the start and menu buttons. Looking forward to play the game a bit more.

I have a question about all of this. I am new to pygames.
Once I do all these steps I have Tuxemon installed but how do I install other PyGames from icth.io for example.

Their games are in a folder, can I just put the said folder in /home/cpi/games, create a launcher.sh link to the .py and I am all set?

I’m actually getting this error when running the pip command–

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-up8Obo/pygame/

Prior to that, this message appears

Hunting dependencies...
SDL     : found 1.2.15
FONT    : found
IMAGE   : found
MIXER   : not found
PNG     : found
JPEG    : found
SCRAP   : found
PORTMIDI: not found
PORTTIME: not found
FREETYPE: found 22.1.16
Missing dependencies

I’m pretty sure I’ve seen this error before in my own Py projects, but I don’t remember how to resolve it. Everything I’ve seen online says to basically update everything, but it doesn’t seem to make any difference for me. I’ve also tried using pip3 instead of pip.

UPDATE

I was able to fix this by running these commands:

apt-get build-dep python-pygame
sudo apt-get install libxml2 libxml2-dev libxslt1-dev

The latter command actually had to do with a new problem that arose after building the dependencies.

If anyone else has any other confusions that I had, I was able to launch the game by navigating to the tuxemon directory through Dingux. (I wasn’t able to launch through SSH since it wasn’t connected to the X server.) Then, since only the top-left part of the screen could be showed, so I couldn’t see the menu to exit, I had to force-shut off the system to restart it.

The game’s working now, though the controls are a little weird-- The only two usable buttons are Start and MENU, matching Tuxemon’s Enter/Escape from the PC controls. I actually started to manually change them in the source code, but that’s not really a good idea because then you could get merge conflicts on updating.

1 Like

I followed all the steps on my box-fresh GameShell, and it won’t run.
IDK what happened, heres the terminal output:

It seems it didn’t even create the Tuxemon folder…

you miss packages >

Error: Please make sure the libxml2 and libxslt development packages are installed.

apt install these >

https://packages.debian.org/en/jessie/libxml2-dev
https://packages.debian.org/en/jessie/libxslt-dev

and folder where you want create your shortcut, “/home/cpi/apps/launcher/Menu/GameShell/”
not exist, it must be for an old clockwork os location, check your menu folder real location

cpi@clockworkpi:~/games/tuxemon$ touch ~/apps/launcher/Menu/GameShell/Tuxemon.sh
touch: cannot touch '/home/cpi/apps/launcher/Menu/GameShell/Tuxemon.sh': No such file or directory
cpi@clockworkpi:~/games/tuxemon$ echo "python ~/games/tuxemon/tuxemon.py" > ~/apps/launcher/Menu/GameShell/Tuxemon.sh
-bash: /home/cpi/apps/launcher/Menu/GameShell/Tuxemon.sh: No such file or directory
cpi@clockworkpi:~/games/tuxemon$ cd ~/apps/launcher/Menu/GameShell/
-bash: cd: /home/cpi/apps/launcher/Menu/GameShell/: No such file or directory

Thanks. @anorman728 How do you run the game straight from Dingux?