Menu

Tree [2dc884] master /
 History

HTTPS access


File Date Author Commit
 error_reports 2023-07-09 hubkow hubkow [99ef6e] Squashed commit of the following:
 icons 2025-06-17 Hubert Kowalewski Hubert Kowalewski [2dc884] New icons.
 locales 2025-03-11 hubkow hubkow [08bd1a] Locales update.
 modules 2025-06-16 Hubert Kowalewski Hubert Kowalewski [0fca22] Working on a distillery island restores reputat...
 adrift.py 2025-03-09 Hubert Kowalewski Hubert Kowalewski [bd70ab] Fix crash on selecting the destination in "Adri...
 gpl3-license.txt 2021-12-22 hubkow hubkow [3d3acf] Various cleanups:
 options.ini 2025-03-11 hubkow hubkow [08bd1a] Locales update.
 poker.py 2025-01-24 Hubert Kowalewski Hubert Kowalewski [e10374] "Rest" command changed to "wait" in "Adrift".
 pyrates.py 2024-06-18 hubkow hubkow [80533c] Paper rock scissors replaces the 3 prisoners di...
 readme.txt 2024-06-18 hubkow hubkow [80533c] Paper rock scissors replaces the 3 prisoners di...
 tavern.py 2025-03-16 Hubert Kowalewski Hubert Kowalewski [b57b30] Fixed variable and dictionary key names in "The...

Read Me

PYRATES
*******

Website: https://sourceforge.net/projects/pyrates-game/
Contact: hubkow@gmail.com
"Pyrates" can be played on Replit.com: https://replit.com/@hubkow/Pyrates
Locales are hosted on Weblate: https://hosted.weblate.org/projects/pyrates/


Introduction
------------

"Pyrates" is a suite of TUI computer games designed as a classroom aid for
teaching software localization with gettext.

- The titular "Pyrates" is an exploration game peppered with logical puzzles.

- "The Tavern" is a management game, in which the player runs a tavern on
  an island featured in "Pyrates."
  
- "Adrift" is a survival game, in which the player tries to survive on a tiny
  raft in the middle of the ocean and convert the raft into a boat.

- "Poker" is a poker game played against an AI pirate.

How to launch the game
----------------------

The games requires at least Python 3.8. On Windows, install IDLE
(https://www.python.org/downloads/). The game should start after double-clicking
the file 'pyrates.py', 'tavern.py', 'adrift.py', or 'poker.py'.

On Linux, check whether you have Python 3 installed on your device (e.g. type
in 'python3 --version' in the terminal). Open the terminal in the folder
'pyrates' and type in 'python3 pyrates.py', 'python3 tavern.py',
'python3 adrift.py', or 'python3 poker.py'. Passing a two-letter ISO
language code launches the game with the respective locale (if available).

Alternatively, you can open the files in IDLE code editor and hit F5. Bear in
that this method does not support colors in the interface, so you may want to
disable this option in 'options.ini' to avoid misalignments in the interface.

How to create a new locale
--------------------------

1. In the folder 'locales' create the folder 'iso' and 'iso/LC_MESSAGES'
   (replace 'iso' with a two-letter ISO code of the language, e.g. 'de' for
   German).
2. Copy the file 'pyrates.pot' from the folder 'locale' to the new folder
   'iso/LC_MESSAGES'.
3. Create a new PO file with the command 'msginit -i pyrates.pot -o pyrates.po'.
4. Translate the new 'pyrates.po'.
5. Compile the file 'pyrates.mo' (e.g. type in the terminal the command
   'msgfmt -o pyrates.mo pyrates.po' in the folder 'iso/LC_MESSAGES').
6. Edit the file 'options.ini' in the root folder; write the ISO symbol
   of the new language in the entry 'language' (e.g. 'language = de').
7. When you start the game, the translated strings will appear.

Steps 3-5 can be performed conveniently with Poedit, the GUI editor of PO files. 
   

Quick access to locations
-------------------------

To facilitate testing of locales, quickly access locations by entering:

"Pyrates" – islands:
  -  't' visit a treasure island ('?' reveals a chest)
  - 'ta' visit a treasure island with an adventurer ('?' reveals a chest)
  - 'tc' visit a treasure island with a pirate ('?' reveals a note)
  - 'dt' visit devils՚s triangle
  -  'd' visit an abandoned distillery
  - 'ad' visit adventurer՚s distillery
  - 'ri' collect ingredients for fruit rum ('?' reveals an ingredient)
  -  'p' visit pirates՚ island
  - 'rh' start the rum heist on pirates՚ island
  - 'kh' start the keyring heist on pirates՚ island
  -  'o' visit a trading outpost

"Pyrates" – town islands
  - 'tm' visit a town island with drunk mapmaker ('?' finds the mapmaker)
  - 'tt' visit a town island with thief ('?' finds the thief)
  - 'td' visit a town island with a broken distillery
  - 'ti' visit a town island with request for information about pirates
  - 'tr' visit a town island with a rumors about islands

"Pyrates" – ships:
  - 'ms' visit a merchant ship
  -  'e' escape a pirate ship
  - '2p' get captured by pirates (two prisoners)
  - 'pr' get captured by pirates (paper rock scissors)
  - 'rr' rescue an adventurer from a raft

"Pyrates" – other:
  - 'bm' read Captain Cofresí՚s message with misdirections
  - 'be' read Captain Cofresí՚s encrypted island names
  -  'a' start the arithmometer puzzle (with nonogram)
  - 'aa' start the arithmometer puzzle (with the Bertrand lock)

"The Tavern":
  - 'cr' start a game of craps
  - 'tr' measure take-away rum
  - 'rd' fix the rum dispenser ('?' shows the success message)
  
"Adrift":
  - '?' choose direction of the voyage

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.