gridgames
Grid games for experiments. A game is two plain-text files, a rules file and a level file. gridgames plays it in PsychoPy, for example in an MEG session.
Install
Install into the Python that PsychoPy uses:
- in PsychoPy: Tools → Plugins/Packages manager → Packages, search
gridgames, Install; - or in a terminal:
<PsychoPy's python> -m pip install gridgames(on Windows usually"C:\Program Files\PsychoPy\python.exe").
One wheel per platform (Windows, macOS, Linux) works on every Python from 3.8 on. No compiler is needed, and the only dependency is numpy.
Check the install:
python -m gridgames games # lists the built-in games
python -m gridgames play zelda_vgfmri4 # arrows, space; Esc quits
Use
from gridgames import vgdl
game = vgdl.load("zelda_vgfmri4", level=0, seed=1) # built-in game
game = vgdl.load("games/mygame", level=2) # your own folder
game.step("up") # up, down, left, right, use, none
game.image(cell=8) # numpy array (H, W, 3), uint8
game.score, game.outcome # outcome: "win", "lose" or None
A game folder contains mygame.vgdl (the rules), mygame_lvl0.txt,
mygame_lvl1.txt, ... (the levels), and optionally mygame.skin (the
colours). python -m gridgames check games/mygame lists each mistake with
its file and line.
In PsychoPy, gridgames.psychopy.Player draws a game in your own frame
loop. It counts game time in frames and reports each frame's event
(block start, win, lose, restart, block end) and a Gray-coded sync
counter, so your script can send its own triggers. The package has no
hardware code.
Credits
The built-in study games (Bait, Zelda, Lemmings, _vgfmri4) are
translations of the games in
botcs/reason-to-play (MIT); see
THIRD_PARTY.md. gridgames itself is MIT.
Metadata
Release files for gridgames 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gridgames-0.1.0-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for gridgames-0.1.0-cp38-abi3-win_amd64.whl |
| gridgames-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details for gridgames-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| gridgames-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 | Details for gridgames-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl |
Total release size: 1.5 MB
Release files / gridgames-0.1.0-cp38-abi3-win_amd64.whl
| Download URL | gridgames-0.1.0-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 276.2 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8321aef6b692ea15292892b240bb2b808fe1918296cd7609f720a97d09983f07
|
|
BLAKE2b-256 checksum How to use checksums |
9061078fbd4838a91ff3d090dc8e60f09c01dc4d222b1778e03ccbb9719b0af7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / gridgames-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | gridgames-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 430.5 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8eb6bf6a56ef7d3bc84d28faca2e29d8028fd901ddc3b9132d09dbe9bbd12902
|
|
BLAKE2b-256 checksum How to use checksums |
6af2919158120c9de5d9e5fc9fd80ef1c40eca088a33b490e802ddfe9e2e7f7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / gridgames-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
| Download URL | gridgames-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl |
|---|---|
| Size | 750.3 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
54f9590f5c5e894a49d22e20f60fb3f3ade2756ec10121e71e98e4ed25d907f6
|
|
BLAKE2b-256 checksum How to use checksums |
f79512f1185b2aca4eb0e53e82849c61831c497c15673c6b2e07c125ae8ea2ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for gridgames 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for gridgames-0.1.0-cp38-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.