frameCraft
A lightweight educational game framework built on a pygame-compatible API.
frameCraft is designed for teaching and beginner-friendly game development. The same game code can run:
- inside CodeRoom using its pygame-light host runtime
- locally with standard CPython + pygame
frameCraft is an independent project built on top of pygame-compatible APIs. It is not affiliated with or maintained by the pygame project.
Installation
Once published on PyPI:
pip install pygame-framecraft
The existing import remains intentionally unchanged:
import frameCraft as fc
This preserves compatibility with existing CodeRoom content.
Minimal standalone example
import frameCraft as fc
fc.GAME(
"frameCraft Test",
window=(640, 400),
fps=60
)
fc.SCENE("main")
@fc.SCENE_BUILD("main")
def build(ctx):
fc.ENTITY("player", (320, 200), tag="player")
fc.RECT("player", 40, 40)
fc.START()
CodeRoom host integration
CodeRoom keeps ownership of its existing game loop and calls:
FC_BOOT(scene)
FC_STEP(events, dt)
FC_DRAW(screen)
The hosted API and the standalone API use the same frameCraft implementation.
Source layout
Insert the three existing runtime files into src/:
src/
├── frameCraft.py
├── frameCraftGFX.py
└── frameCraftUI.py
Do not rename them for the first public version.
Keeping the filenames unchanged has two advantages:
- Existing CodeRoom code using
import frameCraft as fcremains compatible. - The exact same source files can be copied into the CodeRoom deployment and packaged for PyPI.
A future major version could introduce a conventional lowercase package layout if desired, but that should be treated as a separate compatibility decision.
Project layout
pygame-framecraft/
├── .github/
│ └── workflows/
├── src/
│ ├── frameCraft.py
│ ├── frameCraftGFX.py
│ └── frameCraftUI.py
├── examples/
├── tests/
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── pyproject.toml
└── .gitignore
Build
Install the build tool:
python -m pip install build
Build wheel and source distribution:
python -m build
The package configuration deliberately publishes the three existing modules from src/ without requiring a source-code rename.
CodeRoom runtime artifact
For CodeRoom deployments, the release workflow creates a small ZIP containing exactly:
frameCraft.py
frameCraftGFX.py
frameCraftUI.py
This lets GitHub remain the development source of truth while CodeRoom can continue shipping the same three files under:
jsEditor.App/scripts/python/
Versioning
Use semantic version tags:
v0.1.0
v0.2.0
v1.0.0
CodeRoom should always reference a fixed release version rather than main or latest.
License
MIT. See LICENSE.
Metadata
Release files for pygame-framecraft 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygame_framecraft-1.0.0.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygame_framecraft-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.6 kB
Release files / pygame_framecraft-1.0.0.tar.gz
| Download URL | pygame_framecraft-1.0.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0715a8fefddf8652917d94368cb8bb41124238e4cc8bff59b082257c192c6cf7
|
|
BLAKE2b-256 checksum How to use checksums |
dc9d8dfc9cd45a4a68306b9a789b2c72edd83d595834bbc782664006e4716855
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency logRelease files / pygame_framecraft-1.0.0-py3-none-any.whl
| Download URL | pygame_framecraft-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18d7a638f81470a44989f3255b8a1c51ebfe76314d3e166c1e8634dfbe29a431
|
|
BLAKE2b-256 checksum How to use checksums |
368c363a58559ad99c085e4249774849f98431678f54aac4bfbda359b92c42d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency log