V0.7.0: Support for season4. Update Details
Welcome to PyScreeps-Arena
This project is for players who want to play Screeps: Arena with python. The project provides a 'standard library' (std.py) to act as a glue layer between js and python. Players write their own logic code in the main.py loop, and run build.py to generate main.mjs
Please note that the codes for `Screeps:Arena` and 'Screeps:World' are not compatible.(If you want to play Screeps:World, i recommend you to try the Github project: 'screeps-starter-python')
1. Quick Prepare Environment
This project need python == 3.12 (for the limit of transcrypt). Please make sure you have download&install from python.org
Use python pip to install this package:
pip install pyscreeps-arena
Use cmd command to create a new game project:
pyscreeps-arena 'Your Project Path'
(or the short alias: psanew 'Your Project Path')
Use GUI cmd command to create a new game project:
psaui
Use GUI cmd command to view map and mark element as code(map at /docs/maps):
psaui -m
Use GUI cmd command to replay a local simulation battle:
psaplay <replay_output_dir>
Use cmd command to start the MCP server (for AI-assisted development):
psamcp
Use your editor to open the project(recommand PyCharm).
2. Tutorial
- Tutorial 1: Console Output
- Tutorial 2: Object Acquisition and Movement
- Tutorial 3: Attacking Enemies
- Tutorial 4: Creep Composition
- Tutorial 5: Resource Fetch and Deposit
- Tutorial 6: Terrain Impact
- Tutorial 7: Creating New Creeps
- Tutorial 7+: Creating New Creeps (Object-Oriented)
- Tutorial 8: Harvesting Energy
- Tutorial 8+: Harvesting Energy (Object-Oriented)
- Tutorial 9: Building Construction
- Tutorial 10: Final Test
- Tutorial 10+: Final Test (Object-Oriented)
- Extra: Behavior Tree
- Extra: Event System
中文教程见仓库 tutorial - cn 目录。
3. Transcrypt: Different between python and js
- in python:
if []:is False, but get true in js. - in python:
_list[-1]is ok, but not work in js. - in python: use
dict.py_get()instead ofdict.get() - in python: use
container.py_clear()instead ofcontainer.clear() - operator reaload do not work in js. Mean in python
[1] * 5do not work in js. - kwargs do not work in js. Mean in python
func(1, b = 5)do not work in js.
4. Document
See *.md under the docs folder of your game project (tutorials, system guides, season notes and arena maps).
Last
Goodluck & Have fun. :)
Metadata
Release files for pyscreeps-arena 0.7.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyscreeps_arena-0.7.2.3.tar.gz | 1.2 MB | Without provenance | Details for pyscreeps_arena-0.7.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyscreeps_arena-0.7.2.3-py3-none-any.whl | Python 3 | none | any | Details for pyscreeps_arena-0.7.2.3-py3-none-any.whl |
Total release size: 2.5 MB
Release files / pyscreeps_arena-0.7.2.3.tar.gz
| Download URL | pyscreeps_arena-0.7.2.3.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
072a8e2f483373c1b3aa0f81bb8ec9d61afd1b3476a8ab0002100d10e16cc4fe
|
|
BLAKE2b-256 checksum How to use checksums |
1642c0b6a079edd8b712294a94f5be872beb64474117d263c6ace7e5f9652b83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / pyscreeps_arena-0.7.2.3-py3-none-any.whl
| Download URL | pyscreeps_arena-0.7.2.3-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b770274c493e39d6109cd7c1f729b7e74342e87a7fbb166d319c4ba98587179e
|
|
BLAKE2b-256 checksum How to use checksums |
a7a7cb53093325ad55b75ac6f03183cb9336e0b7db0f7151193ca6d8a889e9fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for pyscreeps-arena 0.7.2.3
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.