Skip to main content

Snakey

A simple snake game made with pygame with multiplayer option.

Running the game

To install Snakey, run the following command:

python -m pip install snakey

Then, to run the game, execute:

python -m snakey

A new window should appear where you and your friend can play a game of snake. Default keys for player one are ↑, ↓, → and ←. Keys for player two are W, S, D and A.

Game configuration

Game configuration is defined with a json configuration file, by default, this configuration is set like this:

{
    "main_window_size": [640, 480],
	"block_size": 10,
    "refresh_rate": 100,
    "num_snakes": 2,
    "start_pos": [[300, 100],
			   [300, 200],
			   [300, 300],
			   [300, 400]],
    "keys": [["K_UP", "K_RIGHT", "K_DOWN", "K_LEFT"],
		     ["K_w", "K_d", "K_s", "K_a"],
		     ["K_t", "K_h", "K_g", "K_f"],
		     ["K_i", "K_l", "K_k", "K_j"]],
	"initial_snake_length": 10,
	"num_cherries": 2
}

In order to run the game with different configuration, create a new .json file, and modify the configuration there. Then, provide the path to the created file with --config option, like this

python -m snakey --config {path to configuration file}

Metadata

Release files for snakey 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snakey 2.1.0
File Size Uploaded Provenance Actions
snakey-2.1.0.tar.gz 17.0 kB Without provenance Details for snakey-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for snakey 2.1.0
File Interpreter ABI Platform Actions
snakey-2.1.0-py3-none-any.whl Python 3 none any Details for snakey-2.1.0-py3-none-any.whl

Total release size: 24.1 kB

Release files / snakey-2.1.0.tar.gz

Download URL snakey-2.1.0.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
63c25ee41f9523a701925cc20bc14f769c29e1e413d65da8d717be6de42f7500
BLAKE2b-256 checksum
How to use checksums
f8242dc980b5c662bcac69c1110f1272042e4f26926c6017c2ed8755d0a9f37f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / snakey-2.1.0-py3-none-any.whl

Download URL snakey-2.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
391a71039c4f6988039aa379258ed6cdb9b16511bc636b6f49e1807a5166188c
BLAKE2b-256 checksum
How to use checksums
265a6f9c905b0a7d71864b5ed7bf312536258f92aecc513c53abf87d0e6a366e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Security for snakey 2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page