Metadata-Version: 2.4
Name: PyRobbo
Version: 1.1.0
Summary: Clone of an old 8-bit Atari game Robbo
License: GPL3
License-File: LICENSE
Keywords: game,pygame,robbo,atari,clone
Author: Maciej Dems
Author-email: macdems@gmail.com
Requires-Python: >=3
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Natural Language :: Polish
Classifier: Operating System :: OS Independent
Classifier: Topic :: Games/Entertainment :: Arcade
Classifier: Topic :: Games/Entertainment :: Puzzle Games
Requires-Dist: PyYAML (>=5.3.1)
Requires-Dist: appdirs (>=1.4.4)
Requires-Dist: pygame (>=2.0.0)
Project-URL: Homepage, http://github.com/macdems/pyrobbo
Description-Content-Type: text/markdown

# PyRobbo

PyRobbo is a Pygame remake of *Robbo*, the puzzle game for 8-bit Atari
computers. Guide a small robot across hostile planets, collecting the screws
needed to repair its escape capsule. When the screw counter reaches zero, the
capsule starts to blink. Walk into it to reach the next planet.

![Robbo on the first planet, with nine screws left to collect][first-planet]

## Install and play

To play the version in this repository, clone it and create a Python 3 virtual
environment.

```sh
git clone https://github.com/macdems/pyrobbo.git
cd pyrobbo
python -m venv .venv
```

Activate the environment with `. .venv/bin/activate` on Linux or macOS, or
`.\.venv\Scripts\Activate.ps1` in Windows PowerShell. Then install and launch
the game in a window.

```sh
python -m pip install "setuptools<81" .
pyrobbo --window
```

The setuptools pin supplies `pkg_resources`, which the game uses to load its
assets. For published releases, see [PyRobbo on PyPI][pypi].

## Language

PyRobbo opens in Polish when it detects a Polish language preference. It
reads `LANGUAGE`, `LC_ALL`, `LC_MESSAGES`, and `LANG` in that order. On
Windows it uses the user's Windows display language if none of those
variables are set. English is the fallback.

To override detection, run `pyrobbo --lang pl` for Polish or
`pyrobbo --lang en` for English. These commands also work in PowerShell.

## Choose a planet

For a first game, select **original**, **level 1**, and press **Enter**. On this
board the ammunition clip is two squares to Robbo's right. Pick it up for nine
shots. The counters along the bottom show screws remaining, keys held,
ammunition, and the current level, from left to right.

| Level set | Levels | What to expect |
| --- | ---: | --- |
| `original` | 58 | The classic campaign. |
| `forever` | 59 | A longer, tougher set of puzzles. |

In the menu, use **Up/Down** to select a row and **Left/Right** to change its
value. The **Theme** row switches between `default`, `oily`, and `tronic`. The
robot and board preview update as you browse. You can also click the arrows
and **Start Level**, or navigate with a joystick's stick or D-pad and press its
first button to start.

PyRobbo remembers your theme and the last level played in each set. Returning
to a level starts the puzzle from its initial layout.

## Controls

| During play | Keyboard |
| --- | --- |
| Move | Arrow keys or **WASD** |
| Fire | Hold **Shift** and press a direction |
| Scroll a tall board | Hold **Ctrl** and press **Up/Down** or **W/S** |
| Restart the level | **Ctrl+R** or **Ctrl+X** |
| Jump to a level in this set | **Ctrl+L**, then two digits, e.g. **07** |
| Adjust speed | **+** or **=** to speed up, **-** to slow down |
| Toggle sound | **Ctrl+M** |
| Toggle clever bear movement | **Ctrl+B** |
| Toggle fullscreen | **F** (also works in the menu) |
| Return to the menu | **Esc** |
| Quit | **Ctrl+Q**, or **Esc** from the menu |

With a joystick, move with the stick. Hold the first button and push the stick
in the direction you want to fire. Hold the second button and move the stick
up or down to look ahead on a tall board.

## Make a level set

Choose a set and level in the front menu, then click **Level editor** or press
**E**. The editor opens that board. Click the set name to open another set,
or choose **New set** to start with a room containing Robbo, a screw, and an
escape capsule.

![Editing a board with the tile palette alongside the map][editor]

| To | In the editor |
| --- | --- |
| Paint or erase | Left-drag to paint a tile. Right-drag to erase. |
| Pick a tile and its settings | Middle-click it on the board. |
| Scroll | Use the mouse wheel, arrow keys, or buttons below the map. |
| Configure a tile | Change **Tile options**, then paint. |
| Manage levels | Use **+ Level**, **Copy**, or **Remove**. |
| Reorder or resize | Set the position or dimensions in **Board settings**. |
| Undo an edit | Click **Undo** or press **Ctrl+Z**. |

Switch boards with the arrows beside the level number. In a dialog, use
**Tab** to move between fields and **Enter** to apply your changes.

For a teleport pair, paint two teleports with the same link group. The editor
assigns their endpoints automatically. Board settings also let you change the
background colour, author, and required screw count.

**Save** or **Ctrl+S** writes the whole set to your user level directory.
Saving edits to a bundled set creates a personal copy that takes precedence
in the game. Use **Save as** to give a copy its own entry in the menu. To play
the edited board, choose **Done** and then **Start Level**.

### Edit the text format

A level set is a plain-text `.dat` file. To try a one-room puzzle, save this as
`first-orbit.dat`.

```text
[level]
1
[data]
OOOOOOOOO
OR.%D.T!O
OOOOOOOOO
[end]
```

Move right from Robbo (`R`), collect the key (`%`), and use it to open the door
(`D`). The screw (`T`) activates the capsule (`!`). The outer walls are the
letter `O`, and dots mark empty squares.

```sh
pyrobbo first-orbit.dat
```

This copies the file into your user level directory and selects **first-orbit**
in the menu. Add another `[level]` through `[end]` block to extend the set.
For examples with teleports, enemies, and moving guns, see the
[bundled level files][level-files].

On Linux, the default locations are `~/.local/share/pyrobbo/levels/` for
installed sets and `~/.config/pyrobbo.yml` for settings. To start with a
particular theme or display mode, use a command such as
`pyrobbo --fullscreen --skin tronic`. Run `pyrobbo --help` for all options.

## Maintain translations

The gettext template is `robbo/locale/pyrobbo.pot`. Install Babel in the
development environment with `python -m pip install Babel`, then run the
following commands from the repository root.

```sh
pybabel extract -k N_ --project PyRobbo -o robbo/locale/pyrobbo.pot robbo
pybabel update -D pyrobbo -i robbo/locale/pyrobbo.pot -d robbo/locale
pybabel compile -D pyrobbo -d robbo/locale --statistics
```

Edit the `.po` catalog after updating it and before compiling. To add a
language, use `pybabel init` with the same paths and `-l` followed by the
language code. Commit the source and compiled catalogs. Installed copies of
the game read the bundled `.mo` files through Python's standard library.

## Credits and license

Janusz Pelc wrote the original *Robbo* for the Atari XE/XL, published by
L.K. Avalon. Maciej Dems developed this Pygame remake. Graphics and level data
come from [GNU Robbo][gnu-robbo].

PyRobbo is free software under the [GNU General Public License][license],
version 3 or later.

[editor]: docs/images/level-editor.png
[first-planet]: docs/images/original-level-01.png
[pypi]: https://pypi.org/project/PyRobbo/
[level-files]: robbo/levels/
[gnu-robbo]: https://sourceforge.net/projects/gnurobbo/
[license]: LICENSE

