Skip to content

Commit

Permalink
Implement Mr Matt (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed Jan 7, 2025
1 parent 4066faa commit c0d0434
Show file tree
Hide file tree
Showing 118 changed files with 1,631 additions and 1,137 deletions.
2 changes: 0 additions & 2 deletions !WinColl/!Boot,feb

This file was deleted.

1 change: 0 additions & 1 deletion !WinColl/!Help

This file was deleted.

5 changes: 0 additions & 5 deletions !WinColl/!Run,feb

This file was deleted.

Binary file removed !WinColl/!RunImage,ffb
Binary file not shown.
Binary file removed !WinColl/!Sprites,ff9
Binary file not shown.
Binary file removed !WinColl/Icons,ff9
Binary file not shown.
Binary file removed !WinColl/InitSound,ffb
Binary file not shown.
Binary file removed !WinColl/UserVoices,ffa
Binary file not shown.
Binary file removed !WinColl/WinSpr,ff9
Binary file not shown.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
run: |
tox
make build
PYTHONPATH=. python -m wincoll --help
PYTHONPATH=. python -m mrmatt --help
pip install .
wincoll --help
mrmatt --help
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ jobs:
- name: Build the executable (Ubuntu)
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
PYTHONPATH=. pyinstaller --noconfirm --onefile --windowed --name wincoll-${{ runner.os }}-${{ runner.arch }} --copy-metadata wincoll --add-data "wincoll/*.png:wincoll/" --add-data "wincoll/*.ttf:wincoll/" --add-data "wincoll/levels:wincoll/levels" --add-data "wincoll/locale:wincoll/locale" wincoll/__main__.py
./dist/wincoll-${{ runner.os }}-${{ runner.arch }} --help
PYTHONPATH=. pyinstaller --noconfirm --onefile --windowed --name mrmatt-${{ runner.os }}-${{ runner.arch }} --copy-metadata mrmatt --add-data "mrmatt/*.png:mrmatt/" --add-data "mrmatt/*.ttf:mrmatt/" --add-data "mrmatt/levels:mrmatt/levels" --add-data "mrmatt/locale:mrmatt/locale" mrmatt/__main__.py
./dist/mrmatt-${{ runner.os }}-${{ runner.arch }} --help
- name: Build the executable (macOS)
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
run: |
./make-macos-icns ./wincoll/levels/Hero.png wincoll.iconset
pyi-makespec --windowed --name WinColl --icon wincoll.icns --copy-metadata wincoll --add-data "wincoll/*.png:wincoll/" --add-data "wincoll/*.ttf:wincoll/" --add-data "wincoll/levels:wincoll/levels" --add-data "wincoll/locale:wincoll/locale" wincoll/__main__.py
./make-macos-icns ./mrmatt/levels/Hero.png mrmatt.iconset
pyi-makespec --windowed --name MrMatt --icon mrmatt.icns --copy-metadata mrmatt --add-data "mrmatt/*.png:mrmatt/" --add-data "mrmatt/*.ttf:mrmatt/" --add-data "mrmatt/levels:mrmatt/levels" --add-data "mrmatt/locale:mrmatt/locale" mrmatt/__main__.py
export version=$(grep version pyproject.toml)
sed -i '' -e "s/\(name='WinColl.app'\)/\1,\n $version/" wincoll.spec
PYTHONPATH=. pyinstaller --noconfirm wincoll.spec
sed -i '' -e "s/\(name='MrMatt.app'\)/\1,\n $version/" mrmatt.spec
PYTHONPATH=. pyinstaller --noconfirm mrmatt.spec
brew install create-dmg
mkdir dmg-folder
mv dist/wincoll.app dmg-folder/
create-dmg --volname "WinColl ${{ github.ref_name }}" ./dist/wincoll-${{ runner.os }}-${{ runner.arch }}.dmg dmg-folder/
mv dist/mrmatt.app dmg-folder/
create-dmg --volname "MrMatt ${{ github.ref_name }}" ./dist/mrmatt-${{ runner.os }}-${{ runner.arch }}.dmg dmg-folder/
- name: Build the executable (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
Expand All @@ -94,15 +94,15 @@ jobs:
with:
repo_token: ${{ github.token }}
tag: ${{ github.ref }}
file: ./dist/wincoll-${{ runner.os }}-${{ runner.arch }}*
file: ./dist/mrmatt-${{ runner.os }}-${{ runner.arch }}*
file_glob: true
- name: Upload the binary (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
tag: ${{ github.ref }}
file: ./dist/wincoll*.msi
file: ./dist/mrmatt*.msi
file_glob: true
- name: Build the RISC OS distribution
if: ${{ matrix.os == 'ubuntu-20.04' }}
Expand All @@ -113,5 +113,5 @@ jobs:
with:
repo_token: ${{ github.token }}
tag: ${{ github.ref }}
file: ./dist/wincoll-riscos.zip
file: ./dist/mrmatt-riscos.zip
file_glob: true
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ ENV/
# WinColl-specific files
Saved,ffd
*.tiled-session
wincoll.icns
mrmatt.icns
\!WinColl/??,ffd
po/wincoll.pot
po/mrmatt.pot
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Makefile for maintainer tasks

po/wincoll.pot: po/wincoll.pot.in
po/mrmatt.pot: po/mrmatt.pot.in
sed -e s/VERSION/$$(grep version pyproject.toml | grep -o "[0-9.]\+")/ < $^ > $@

update-pot:
$(MAKE) po/wincoll.pot
find wincoll -name "*.py" | xargs xgettext --add-comments=TRANSLATORS --from-code=utf-8 --default-domain=wincoll --output=po/wincoll.pot.in
$(MAKE) po/mrmatt.pot
find mrmatt -name "*.py" | xargs xgettext --add-comments=TRANSLATORS --from-code=utf-8 --default-domain=mrmatt --output=po/mrmatt.pot.in

update-po:
for po in po/*.po; do msgmerge --update $$po po/wincoll.pot; done
for po in po/*.po; do msgmerge --update $$po po/mrmatt.pot; done

compile-po:
for po in po/*.po; do mo=wincoll/locale/$$(basename $${po%.po})/LC_MESSAGES/wincoll.mo; mkdir -p $$(dirname $$mo); msgfmt --output-file=$$mo $$po; done
for po in po/*.po; do mo=mrmatt/locale/$$(basename $${po%.po})/LC_MESSAGES/mrmatt.mo; mkdir -p $$(dirname $$mo); msgfmt --output-file=$$mo $$po; done

update-pofiles:
$(MAKE) update-pot
$(MAKE) po/wincoll.pot
$(MAKE) po/mrmatt.pot
$(MAKE) update-po
$(MAKE) compile-po

Expand All @@ -40,6 +40,6 @@ release:
git push --tags

loc:
cloc --exclude-content="ptext module" wincoll/*.py
cloc --exclude-content="ptext module" mrmatt/*.py

.PHONY: dist build
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# WinColl
# MrMatt

https://github.com/rrthomas/wincoll
https://github.com/rrthomas/mrmatt

by Reuben Thomas <[email protected]>

WinColl is a simple puzzle game in which you tunnel through caverns
MrMatt is a simple puzzle game in which you tunnel through caverns
collecting diamonds while avoiding being squashed by falling rocks. It is
based on [Repton](https://en.wikipedia.org/wiki/Repton_(video_game)) (but
without eggs and monsters).

I originally wrote WinColl for Acorn RISC OS. Original and updated [RISC OS
versions](<https://github.com/rrthomas/wincoll/RISC OS.md>) are available.
I originally wrote MrMatt for Acorn RISC OS. Original and updated [RISC OS
versions](<https://github.com/rrthomas/mrmatt/RISC OS.md>) are available.

The name of the game is an abbreviation of my school’s. “Repton” is also the
name of a school, but I don’t believe the game was named after it!
Expand All @@ -34,7 +34,7 @@ The game provides instructions on how to play.
### Binary installers

Installers are available for GNU/Linux, macOS and Windows. See the
[latest release](https://github.com/wincoll/releases):
[latest release](https://github.com/mrmatt/releases):

* The GNU/Linux version is a single binary; you need to make it executable
and then either copy it to a directory on your path, or run it directly:
Expand All @@ -53,25 +53,25 @@ Installers are available for GNU/Linux, macOS and Windows. See the

### Python package

If you are a Python user, this is the simplest way to get WinColl on most
If you are a Python user, this is the simplest way to get MrMatt on most
machines.

Install with `pip`: `pip install wincoll`, then execute the command
`wincoll`.
Install with `pip`: `pip install mrmatt`, then execute the command
`mrmatt`.


## Creating and editing levels

Currently, to play edited or new levels you must have a source check-out of
WinColl from GitHub. (If this doesn’t make sense to you, sorry! I hope to
MrMatt from GitHub. (If this doesn’t make sense to you, sorry! I hope to
provide a simpler way to edit and play new levels soon.)

The level files are in the `wincoll/levels` subdirectory of the project, and
The level files are in the `mrmatt/levels` subdirectory of the project, and
are [Tiled](https://www.mapeditor.org/) level editor files, so you will need
to install Tiled to edit them or create new levels.

Having saved an edited level you can install the Python package with
`pip install .` or run it directly with `PYTHONPATH=. python -m wincoll`.
`pip install .` or run it directly with `PYTHONPATH=. python -m mrmatt`.

Some notes about level design:

Expand All @@ -86,14 +86,14 @@ Some notes about level design:
example, you can place diamonds surrounded by bricks, or have safes but no
key.
+ A complete level set requires a Tiled tileset and corresponding graphics.
You can simply copy the tileset file `WinColl.tsx` and PNG graphics from
`wincoll/levels`.
You can simply copy the tileset file `MrMatt.tsx` and PNG graphics from
`mrmatt/levels`.

I welcome [pull requests](https://github.com/rrthomas/wincoll/pulls) for new
I welcome [pull requests](https://github.com/rrthomas/mrmatt/pulls) for new
levels.


## Improving WinColl
## Improving MrMatt

New levels, usability improvements and translations are welcome, as are
usability improvements: for example, the ability to rebind keys would be
Expand All @@ -104,15 +104,15 @@ Some levels useful for testing are in `test-levels`.

## Copyright and Disclaimer

WinColl is distributed under the GNU Public License version 3, or, at your
MrMatt is distributed under the GNU Public License version 3, or, at your
option, any later version. See the file COPYING.

THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER'S RISK.
WinColl’s code is copyright Reuben Thomas, and its levels and graphics by
MrMatt’s code is copyright Reuben Thomas, and its levels and graphics by
Reuben Thomas, Alistair Turnbull, Paul Smith and Jeremy Douglas.

The font “Acorn Mode 1”, which is based on the design of Acorn computers’
system font, as used on the Acorn Archimedes on which WinColl was originally
system font, as used on the Acorn Archimedes on which MrMatt was originally
written, is by p1.mark and Reuben Thomas and licensed under CC BY-SA 3.0.

The sound effects are copyrighted and licensed as follows:
Expand Down
20 changes: 0 additions & 20 deletions RISC OS.md

This file was deleted.

11 changes: 0 additions & 11 deletions WinColl.tiled-project

This file was deleted.

16 changes: 0 additions & 16 deletions dist-riscos

This file was deleted.

Binary file renamed wincoll/title.png → mrmatt/4-food.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions wincoll/__init__.py → mrmatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

import re
import sys
from typing import List

from chambercourt.game import app_main
from .mrmatt_game import MrmattGame

from . import wincoll_game


def main(argv: List[str] = sys.argv[1:]) -> None:
app_main(argv, "wincoll", wincoll_game, wincoll_game.WincollGame)
def main(argv: list[str] = sys.argv[1:]) -> None:
MrmattGame().main(argv)


if __name__ == "__main__":
Expand Down
5 changes: 3 additions & 2 deletions wincoll/__main__.py → mrmatt/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import re
import sys

from wincoll import main
from mrmatt import main

sys.argv[0] = re.sub(r"__main__.py$", "wincoll", sys.argv[0])

sys.argv[0] = re.sub(r"__main__.py$", "mrmatt", sys.argv[0])
main()
File renamed without changes.
Binary file added mrmatt/app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/0-empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/1-grass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/2-wall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/3-stone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/4-food.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/5-box1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/6-box2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/7-box3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/8-bomb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions mrmatt/levels/Akihabara.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<map version="1.0" orientation="orthogonal" width="31" height="18" tilewidth="32" tileheight="32">
<properties>
<property name="Title" value="Akihabara"/>
</properties>
<tileset source="MrMatt.tsx" firstgid="1"/>
<layer name="Tile Layer 1" width="31" height="18">
<data compression="zlib" encoding="base64">eJyllUsOwzAIRC0HNr3/gdtKtjSizIDdxSgSODzzS3yM8Xw0Qb5sFuxz2dBvYHPwzeCP8nVmx3mCGNsStgVffO9UGXtLxX/gWclIPCtinNzbiTq5ZPOg7uXkvS3scdZvjM/YWdw5+Ewgu5OnYlvBZnW7Zduf7GqOuzPNesXs6O+cUbuR5dCd2WqHVU3jmRs2xrMLdtynjP0SbD9kT8FGX9XPuPORrb5rit3ZVfadm+O3H1lt2L3YHFTzHXNT7Oxf1tnhTr2qfxarXZYfxuuy1aypHWJ78LW9AdSNBlo=</data>
</layer>
</map>
Binary file added mrmatt/levels/Die.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrmatt/levels/Die.wav
Binary file not shown.
10 changes: 10 additions & 0 deletions mrmatt/levels/French Garden.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<map version="1.0" orientation="orthogonal" width="31" height="18" tilewidth="32" tileheight="32">
<properties>
<property name="Title" value="French Garden"/>
</properties>
<tileset source="MrMatt.tsx" firstgid="1"/>
<layer name="Tile Layer 1" width="31" height="18">
<data compression="zlib" encoding="base64">eJzllUsKwCAMRMXPpvc/cF0oDGG0E2tx0cWgpKTPmI8phHBV5ap0QLGxS9ujcpO1v1Eh7NG5cJ1JvbtI2MhBMduqFPZq7uwdZPLdstm5em6U2Ed+1p+xPetTTXj+s+KLNfsnNtbUCTbOoh1stbd31NxKP3t6TWErM7sQXytP/pG9I247U2YzhsXNaojZe5y4qmfHvcrDPXtzVXnq6wvdgJcF1A==</data>
</layer>
</map>
10 changes: 10 additions & 0 deletions mrmatt/levels/Granny Smith.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<map version="1.0" orientation="orthogonal" width="31" height="18" tilewidth="32" tileheight="32">
<properties>
<property name="Title" value="Granny Smith"/>
</properties>
<tileset source="MrMatt.tsx" firstgid="1"/>
<layer name="Tile Layer 1" width="31" height="18">
<data compression="zlib" encoding="base64">eJzllMEOwCAIQ53IZf//wfPgEkcKUrfbDg0JM5YHuFZKaV06Yh3RSo3QGU/s+Vuy6Y0YNGBDeQGe1RHbC8RgGaU864vksSjIV+BvOWVo5bvDP9fizTXyYfij2tAMMowMv9d/ryfZ+aKeZPca5ZnZom86RZT37sl6o93Iskbnst72/dsd9pii2tg3tdr1uf+Z3cz6M2+M+Vew/5bVfHfue8M/6+g6R2Tn+gXTH3UBkbwG0Q==</data>
</layer>
</map>
Binary file added mrmatt/levels/Hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions mrmatt/levels/Many Happy Returns.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<map version="1.0" orientation="orthogonal" width="31" height="18" tilewidth="32" tileheight="32">
<properties>
<property name="Title" value="Many Happy Returns"/>
</properties>
<tileset source="MrMatt.tsx" firstgid="1"/>
<layer name="Tile Layer 1" width="31" height="18">
<data compression="zlib" encoding="base64">eJy9lMEOgDAIQ5cpF///g/XgkoaAUEY8NLiE8ehwkzGGOJqPzoQOiGuvlTeVvHrzraXzLSE76vGAup7fLJdlC9Te8RudXcRm/Vpz2/Wd5YrBZ9jIY/3qWPGt92b96lhhM/8RE6P7oO9Zdr7RmvGDb5fuaSnjF8/cmqP+Rna2T8ZvF7sy3072l1+L0832/OIbybAr/F025v6tdSeuBt9V3VyTBlU=</data>
</layer>
</map>
34 changes: 34 additions & 0 deletions mrmatt/levels/MrMatt.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.8" tiledversion="1.8.2" name="Mr Matt" tilewidth="32" tileheight="32" tilecount="10" columns="0">
<grid orientation="orthogonal" width="1" height="1"/>
<tile id="0" type="empty">
<image width="32" height="32" source="0-empty.png"/>
</tile>
<tile id="1" type="grass">
<image width="32" height="32" source="1-grass.png"/>
</tile>
<tile id="2" type="brick">
<image width="32" height="32" source="2-wall.png"/>
</tile>
<tile id="3" type="stone">
<image width="32" height="32" source="3-stone.png"/>
</tile>
<tile id="4" type="food">
<image width="32" height="32" source="4-food.png"/>
</tile>
<tile id="5" type="box1">
<image width="32" height="32" source="5-box1.png"/>
</tile>
<tile id="6" type="box2">
<image width="32" height="32" source="6-box2.png"/>
</tile>
<tile id="7" type="box3">
<image width="32" height="32" source="7-box3.png"/>
</tile>
<tile id="8" type="bomb">
<image width="32" height="32" source="8-bomb.png"/>
</tile>
<tile id="9" type="hero">
<image width="32" height="32" source="Hero.png"/>
</tile>
</tileset>
10 changes: 10 additions & 0 deletions mrmatt/levels/Upside Down.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<map version="1.0" orientation="orthogonal" width="31" height="18" tilewidth="32" tileheight="32">
<properties>
<property name="Title" value="Upside Down"/>
</properties>
<tileset source="MrMatt.tsx" firstgid="1"/>
<layer name="Tile Layer 1" width="31" height="18">
<data compression="zlib" encoding="base64">eJzFlFELwzAIhCUmL/v/P3gdNBDcnaejsAdJ09J8nqdxM/M/xbhi3ut+XkmMIzzsq7EC7zxvJoHYnRzcvrVW2Ez3WcdVqHWXvQAz+2d7FN9Hdjy3qjd60PWa+cG4iN3p7SxfF1zGHoa9Qj2q2Ko2aJ/NZjYLsVdVfp/1RXJBHlfnUNWO6Wbc2WCre435zbiKvb//chejc+Nsq9qo2o/AZGx2p2SalQ+qzxm3wu7WvKL3Cd1IZ/wnmw82w2qeVQ6V+UB32xvI5QZO</data>
</layer>
</map>
Loading

0 comments on commit c0d0434

Please sign in to comment.