pygame-framecraft 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygame_framecraft-1.0.0/LICENSE +21 -0
- pygame_framecraft-1.0.0/PKG-INFO +168 -0
- pygame_framecraft-1.0.0/README.md +147 -0
- pygame_framecraft-1.0.0/pyproject.toml +50 -0
- pygame_framecraft-1.0.0/setup.cfg +4 -0
- pygame_framecraft-1.0.0/src/frameCraft.py +943 -0
- pygame_framecraft-1.0.0/src/frameCraftGFX.py +195 -0
- pygame_framecraft-1.0.0/src/frameCraftUI.py +337 -0
- pygame_framecraft-1.0.0/src/pygame_framecraft.egg-info/PKG-INFO +168 -0
- pygame_framecraft-1.0.0/src/pygame_framecraft.egg-info/SOURCES.txt +11 -0
- pygame_framecraft-1.0.0/src/pygame_framecraft.egg-info/dependency_links.txt +1 -0
- pygame_framecraft-1.0.0/src/pygame_framecraft.egg-info/requires.txt +1 -0
- pygame_framecraft-1.0.0/src/pygame_framecraft.egg-info/top_level.txt +3 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CodeRoom
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pygame-framecraft
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A lightweight educational game framework built on top of Pygame.
|
|
5
|
+
Author: CodeRoom
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://www.coderoom.eu/en/framecraft
|
|
8
|
+
Project-URL: Repository, https://github.com/gab211/pygame-framecraft
|
|
9
|
+
Project-URL: Issues, https://github.com/gab211/pygame-framecraft/issues
|
|
10
|
+
Keywords: pygame,education,game-development,teaching,python,coderoom
|
|
11
|
+
Classifier: Intended Audience :: Education
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Topic :: Education
|
|
15
|
+
Classifier: Topic :: Games/Entertainment
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: pygame>=2.5
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# frameCraft
|
|
23
|
+
|
|
24
|
+
A lightweight educational game framework built on a pygame-compatible API.
|
|
25
|
+
|
|
26
|
+
**frameCraft** is designed for teaching and beginner-friendly game development. The same game code can run:
|
|
27
|
+
|
|
28
|
+
- inside **CodeRoom** using its pygame-light host runtime
|
|
29
|
+
- locally with standard **CPython + pygame**
|
|
30
|
+
|
|
31
|
+
> frameCraft is an independent project built on top of pygame-compatible APIs. It is not affiliated with or maintained by the pygame project.
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
Once published on PyPI:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install pygame-framecraft
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The existing import remains intentionally unchanged:
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
import frameCraft as fc
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This preserves compatibility with existing CodeRoom content.
|
|
48
|
+
|
|
49
|
+
## Minimal standalone example
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import frameCraft as fc
|
|
53
|
+
|
|
54
|
+
fc.GAME(
|
|
55
|
+
"frameCraft Test",
|
|
56
|
+
window=(640, 400),
|
|
57
|
+
fps=60
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
fc.SCENE("main")
|
|
61
|
+
|
|
62
|
+
@fc.SCENE_BUILD("main")
|
|
63
|
+
def build(ctx):
|
|
64
|
+
fc.ENTITY("player", (320, 200), tag="player")
|
|
65
|
+
fc.RECT("player", 40, 40)
|
|
66
|
+
|
|
67
|
+
fc.START()
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## CodeRoom host integration
|
|
71
|
+
|
|
72
|
+
CodeRoom keeps ownership of its existing game loop and calls:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
FC_BOOT(scene)
|
|
76
|
+
FC_STEP(events, dt)
|
|
77
|
+
FC_DRAW(screen)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The hosted API and the standalone API use the same frameCraft implementation.
|
|
81
|
+
|
|
82
|
+
## Source layout
|
|
83
|
+
|
|
84
|
+
Insert the three existing runtime files into `src/`:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
src/
|
|
88
|
+
├── frameCraft.py
|
|
89
|
+
├── frameCraftGFX.py
|
|
90
|
+
└── frameCraftUI.py
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Do **not** rename them for the first public version.
|
|
94
|
+
|
|
95
|
+
Keeping the filenames unchanged has two advantages:
|
|
96
|
+
|
|
97
|
+
1. Existing CodeRoom code using `import frameCraft as fc` remains compatible.
|
|
98
|
+
2. The exact same source files can be copied into the CodeRoom deployment and packaged for PyPI.
|
|
99
|
+
|
|
100
|
+
A future major version could introduce a conventional lowercase package layout if desired, but that should be treated as a separate compatibility decision.
|
|
101
|
+
|
|
102
|
+
## Project layout
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
pygame-framecraft/
|
|
106
|
+
├── .github/
|
|
107
|
+
│ └── workflows/
|
|
108
|
+
├── src/
|
|
109
|
+
│ ├── frameCraft.py
|
|
110
|
+
│ ├── frameCraftGFX.py
|
|
111
|
+
│ └── frameCraftUI.py
|
|
112
|
+
├── examples/
|
|
113
|
+
├── tests/
|
|
114
|
+
├── CHANGELOG.md
|
|
115
|
+
├── CONTRIBUTING.md
|
|
116
|
+
├── LICENSE
|
|
117
|
+
├── README.md
|
|
118
|
+
├── pyproject.toml
|
|
119
|
+
└── .gitignore
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Build
|
|
123
|
+
|
|
124
|
+
Install the build tool:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
python -m pip install build
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Build wheel and source distribution:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
python -m build
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The package configuration deliberately publishes the three existing modules from `src/` without requiring a source-code rename.
|
|
137
|
+
|
|
138
|
+
## CodeRoom runtime artifact
|
|
139
|
+
|
|
140
|
+
For CodeRoom deployments, the release workflow creates a small ZIP containing exactly:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
frameCraft.py
|
|
144
|
+
frameCraftGFX.py
|
|
145
|
+
frameCraftUI.py
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This lets GitHub remain the development source of truth while CodeRoom can continue shipping the same three files under:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
jsEditor.App/scripts/python/
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Versioning
|
|
155
|
+
|
|
156
|
+
Use semantic version tags:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
v0.1.0
|
|
160
|
+
v0.2.0
|
|
161
|
+
v1.0.0
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
CodeRoom should always reference a fixed release version rather than `main` or `latest`.
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# frameCraft
|
|
2
|
+
|
|
3
|
+
A lightweight educational game framework built on a pygame-compatible API.
|
|
4
|
+
|
|
5
|
+
**frameCraft** is designed for teaching and beginner-friendly game development. The same game code can run:
|
|
6
|
+
|
|
7
|
+
- inside **CodeRoom** using its pygame-light host runtime
|
|
8
|
+
- locally with standard **CPython + pygame**
|
|
9
|
+
|
|
10
|
+
> frameCraft is an independent project built on top of pygame-compatible APIs. It is not affiliated with or maintained by the pygame project.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
Once published on PyPI:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install pygame-framecraft
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The existing import remains intentionally unchanged:
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
import frameCraft as fc
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This preserves compatibility with existing CodeRoom content.
|
|
27
|
+
|
|
28
|
+
## Minimal standalone example
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import frameCraft as fc
|
|
32
|
+
|
|
33
|
+
fc.GAME(
|
|
34
|
+
"frameCraft Test",
|
|
35
|
+
window=(640, 400),
|
|
36
|
+
fps=60
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
fc.SCENE("main")
|
|
40
|
+
|
|
41
|
+
@fc.SCENE_BUILD("main")
|
|
42
|
+
def build(ctx):
|
|
43
|
+
fc.ENTITY("player", (320, 200), tag="player")
|
|
44
|
+
fc.RECT("player", 40, 40)
|
|
45
|
+
|
|
46
|
+
fc.START()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## CodeRoom host integration
|
|
50
|
+
|
|
51
|
+
CodeRoom keeps ownership of its existing game loop and calls:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
FC_BOOT(scene)
|
|
55
|
+
FC_STEP(events, dt)
|
|
56
|
+
FC_DRAW(screen)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The hosted API and the standalone API use the same frameCraft implementation.
|
|
60
|
+
|
|
61
|
+
## Source layout
|
|
62
|
+
|
|
63
|
+
Insert the three existing runtime files into `src/`:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
src/
|
|
67
|
+
├── frameCraft.py
|
|
68
|
+
├── frameCraftGFX.py
|
|
69
|
+
└── frameCraftUI.py
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Do **not** rename them for the first public version.
|
|
73
|
+
|
|
74
|
+
Keeping the filenames unchanged has two advantages:
|
|
75
|
+
|
|
76
|
+
1. Existing CodeRoom code using `import frameCraft as fc` remains compatible.
|
|
77
|
+
2. The exact same source files can be copied into the CodeRoom deployment and packaged for PyPI.
|
|
78
|
+
|
|
79
|
+
A future major version could introduce a conventional lowercase package layout if desired, but that should be treated as a separate compatibility decision.
|
|
80
|
+
|
|
81
|
+
## Project layout
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
pygame-framecraft/
|
|
85
|
+
├── .github/
|
|
86
|
+
│ └── workflows/
|
|
87
|
+
├── src/
|
|
88
|
+
│ ├── frameCraft.py
|
|
89
|
+
│ ├── frameCraftGFX.py
|
|
90
|
+
│ └── frameCraftUI.py
|
|
91
|
+
├── examples/
|
|
92
|
+
├── tests/
|
|
93
|
+
├── CHANGELOG.md
|
|
94
|
+
├── CONTRIBUTING.md
|
|
95
|
+
├── LICENSE
|
|
96
|
+
├── README.md
|
|
97
|
+
├── pyproject.toml
|
|
98
|
+
└── .gitignore
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Build
|
|
102
|
+
|
|
103
|
+
Install the build tool:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
python -m pip install build
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Build wheel and source distribution:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python -m build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The package configuration deliberately publishes the three existing modules from `src/` without requiring a source-code rename.
|
|
116
|
+
|
|
117
|
+
## CodeRoom runtime artifact
|
|
118
|
+
|
|
119
|
+
For CodeRoom deployments, the release workflow creates a small ZIP containing exactly:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
frameCraft.py
|
|
123
|
+
frameCraftGFX.py
|
|
124
|
+
frameCraftUI.py
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
This lets GitHub remain the development source of truth while CodeRoom can continue shipping the same three files under:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
jsEditor.App/scripts/python/
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Versioning
|
|
134
|
+
|
|
135
|
+
Use semantic version tags:
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
v0.1.0
|
|
139
|
+
v0.2.0
|
|
140
|
+
v1.0.0
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
CodeRoom should always reference a fixed release version rather than `main` or `latest`.
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0.3", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pygame-framecraft"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "A lightweight educational game framework built on top of Pygame."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
|
|
14
|
+
authors = [
|
|
15
|
+
{ name = "CodeRoom" }
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
keywords = [
|
|
19
|
+
"pygame",
|
|
20
|
+
"education",
|
|
21
|
+
"game-development",
|
|
22
|
+
"teaching",
|
|
23
|
+
"python",
|
|
24
|
+
"coderoom"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
classifiers = [
|
|
28
|
+
"Intended Audience :: Education",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
31
|
+
"Topic :: Education",
|
|
32
|
+
"Topic :: Games/Entertainment"
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
dependencies = [
|
|
36
|
+
"pygame>=2.5"
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Homepage = "https://www.coderoom.eu/en/framecraft"
|
|
41
|
+
Repository = "https://github.com/gab211/pygame-framecraft"
|
|
42
|
+
Issues = "https://github.com/gab211/pygame-framecraft/issues"
|
|
43
|
+
|
|
44
|
+
[tool.setuptools]
|
|
45
|
+
package-dir = {"" = "src"}
|
|
46
|
+
py-modules = [
|
|
47
|
+
"frameCraft",
|
|
48
|
+
"frameCraftGFX",
|
|
49
|
+
"frameCraftUI"
|
|
50
|
+
]
|