miniworlds 3.0.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.
- miniworlds-3.0.0.0/LICENSE.txt +21 -0
- miniworlds-3.0.0.0/MANIFEST.in +1 -0
- miniworlds-3.0.0.0/PKG-INFO +125 -0
- miniworlds-3.0.0.0/README.md +107 -0
- miniworlds-3.0.0.0/miniworlds/__init__.py +123 -0
- miniworlds-3.0.0.0/miniworlds/actors/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/actors/actor.py +2448 -0
- miniworlds-3.0.0.0/miniworlds/actors/parent_actor.py +61 -0
- miniworlds-3.0.0.0/miniworlds/actors/shapes/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/actors/shapes/shape_costume.py +149 -0
- miniworlds-3.0.0.0/miniworlds/actors/shapes/shapes.py +468 -0
- miniworlds-3.0.0.0/miniworlds/actors/texts/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/actors/texts/number.py +101 -0
- miniworlds-3.0.0.0/miniworlds/actors/texts/text.py +117 -0
- miniworlds-3.0.0.0/miniworlds/actors/texts/text_costume.py +93 -0
- miniworlds-3.0.0.0/miniworlds/actors/texts/text_transformation_manager.py +17 -0
- miniworlds-3.0.0.0/miniworlds/actors/texts/textbox.py +80 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/button.py +43 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/container_widget.py +59 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/counter.py +33 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/fps.py +18 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/input.py +147 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/label.py +9 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/load.py +27 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/pagination.py +23 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/save.py +31 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/single_widget.py +264 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/time.py +18 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/widget_base.py +139 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/widget_costume.py +28 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/widget_parts.py +26 -0
- miniworlds-3.0.0.0/miniworlds/actors/widgets/yesno.py +16 -0
- miniworlds-3.0.0.0/miniworlds/appearances/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/appearances/appearance.py +1088 -0
- miniworlds-3.0.0.0/miniworlds/appearances/appearances_manager.py +369 -0
- miniworlds-3.0.0.0/miniworlds/appearances/background.py +178 -0
- miniworlds-3.0.0.0/miniworlds/appearances/backgrounds_manager.py +57 -0
- miniworlds-3.0.0.0/miniworlds/appearances/costume.py +118 -0
- miniworlds-3.0.0.0/miniworlds/appearances/costumes_manager.py +80 -0
- miniworlds-3.0.0.0/miniworlds/appearances/managers/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/appearances/managers/font_manager.py +55 -0
- miniworlds-3.0.0.0/miniworlds/appearances/managers/image_background_manager.py +21 -0
- miniworlds-3.0.0.0/miniworlds/appearances/managers/image_manager.py +282 -0
- miniworlds-3.0.0.0/miniworlds/appearances/managers/transformations_background_manager.py +25 -0
- miniworlds-3.0.0.0/miniworlds/appearances/managers/transformations_costume_manager.py +21 -0
- miniworlds-3.0.0.0/miniworlds/appearances/managers/transformations_manager.py +250 -0
- miniworlds-3.0.0.0/miniworlds/base/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/base/app.py +166 -0
- miniworlds-3.0.0.0/miniworlds/base/dialogs.py +47 -0
- miniworlds-3.0.0.0/miniworlds/base/exceptions.py +244 -0
- miniworlds-3.0.0.0/miniworlds/base/window.py +106 -0
- miniworlds-3.0.0.0/miniworlds/conf.py +4 -0
- miniworlds-3.0.0.0/miniworlds/positions/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/positions/rect.py +37 -0
- miniworlds-3.0.0.0/miniworlds/positions/vector.py +422 -0
- miniworlds-3.0.0.0/miniworlds/py.typed +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/down.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/left.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/logo_big.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/logo_small.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/logo_small_32.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/pause.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/play.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/question.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/reset.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/right.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/run.png +0 -0
- miniworlds-3.0.0.0/miniworlds/resources/up.png +0 -0
- miniworlds-3.0.0.0/miniworlds/tools/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/tools/actor_class_inspection.py +58 -0
- miniworlds-3.0.0.0/miniworlds/tools/actor_inspection.py +18 -0
- miniworlds-3.0.0.0/miniworlds/tools/binding.py +4 -0
- miniworlds-3.0.0.0/miniworlds/tools/color.py +15 -0
- miniworlds-3.0.0.0/miniworlds/tools/inspection.py +41 -0
- miniworlds-3.0.0.0/miniworlds/tools/keys.py +90 -0
- miniworlds-3.0.0.0/miniworlds/tools/method_caller.py +43 -0
- miniworlds-3.0.0.0/miniworlds/tools/timer.py +133 -0
- miniworlds-3.0.0.0/miniworlds/tools/world_inspection.py +4 -0
- miniworlds-3.0.0.0/miniworlds/worlds/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/worlds/data/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/worlds/data/db_manager.py +39 -0
- miniworlds-3.0.0.0/miniworlds/worlds/data/export_factory.py +89 -0
- miniworlds-3.0.0.0/miniworlds/worlds/data/import_factory.py +71 -0
- miniworlds-3.0.0.0/miniworlds/worlds/gui/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/worlds/gui/console.py +37 -0
- miniworlds-3.0.0.0/miniworlds/worlds/gui/gui.py +16 -0
- miniworlds-3.0.0.0/miniworlds/worlds/gui/gui_connector.py +11 -0
- miniworlds-3.0.0.0/miniworlds/worlds/gui/gui_position_manager.py +18 -0
- miniworlds-3.0.0.0/miniworlds/worlds/gui/pager.py +23 -0
- miniworlds-3.0.0.0/miniworlds/worlds/gui/toolbar.py +277 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/camera_manager.py +270 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/collision_manager.py +149 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/event_manager.py +534 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/mouse_manager.py +37 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/music_manager.py +63 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/position_manager.py +556 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/sensor_manager.py +347 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/sound_manager.py +31 -0
- miniworlds-3.0.0.0/miniworlds/worlds/manager/world_connector.py +164 -0
- miniworlds-3.0.0.0/miniworlds/worlds/pixel_world/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/__init__.py +0 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/corner.py +54 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/edge.py +41 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tile.py +95 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tile_elements.py +191 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tile_factory.py +10 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tiled_world.py +530 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tiled_world_camera_manager.py +66 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tiled_world_connector.py +40 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tiled_world_position_manager.py +132 -0
- miniworlds-3.0.0.0/miniworlds/worlds/tiled_world/tiled_world_sensor_manager.py +118 -0
- miniworlds-3.0.0.0/miniworlds/worlds/world.py +1171 -0
- miniworlds-3.0.0.0/miniworlds/worlds/world_base.py +125 -0
- miniworlds-3.0.0.0/miniworlds.egg-info/PKG-INFO +125 -0
- miniworlds-3.0.0.0/miniworlds.egg-info/SOURCES.txt +120 -0
- miniworlds-3.0.0.0/miniworlds.egg-info/dependency_links.txt +1 -0
- miniworlds-3.0.0.0/miniworlds.egg-info/requires.txt +3 -0
- miniworlds-3.0.0.0/miniworlds.egg-info/top_level.txt +1 -0
- miniworlds-3.0.0.0/setup.cfg +4 -0
- miniworlds-3.0.0.0/setup.py +38 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 asbl
|
|
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 @@
|
|
|
1
|
+
include miniworlds/resources/*.png
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: miniworlds
|
|
3
|
+
Version: 3.0.0.0
|
|
4
|
+
Summary: Create 2D worlds and Games
|
|
5
|
+
Home-page: https://github.com/asbl/miniworlds
|
|
6
|
+
Download-URL: https://github.com/asbl/miniworlds
|
|
7
|
+
Author: Andreas Siebel
|
|
8
|
+
Author-email: andreas.siebel@it-teaching.de
|
|
9
|
+
License: OSI Approved :: MIT License
|
|
10
|
+
Keywords: games,education,mini-worlds,pygame
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: Topic :: Education
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE.txt
|
|
18
|
+
|
|
19
|
+
miniworlds
|
|
20
|
+
---------
|
|
21
|
+
|
|
22
|
+
miniworlds allows you to create 2D mini worlds and games.
|
|
23
|
+
|
|
24
|
+
It is a 2D engine inspired by greenfoot and gamegrid based on pygame.
|
|
25
|
+
|
|
26
|
+
<kbd>
|
|
27
|
+
<img src="example.png" alt="example"></img>
|
|
28
|
+
</kbd>
|
|
29
|
+
|
|
30
|
+
### Tutorial
|
|
31
|
+
|
|
32
|
+
[English](https://miniworlds.de/objectsfirst_english/01_installation.html) | [German](https://miniworlds.de/objectsfirst_german/01_installation.html)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Examples
|
|
36
|
+
|
|
37
|
+
* [Angry Birds](https://replit.com/@a_siebel/miniworlds-Angry-birds): This demonstrates the physics engine. It runs somewhat slowly on repl.it, should buy smoothly on modern computers without problems.
|
|
38
|
+
|
|
39
|
+
* [Kara](https://replit.com/@a_siebel/Kara-in-miniworlds"): Kara Prototype
|
|
40
|
+
|
|
41
|
+
* [RPG Framework](https://replit.com/@a_siebel/RPG-Framework-for-miniworlds): Framework for simple RPGs and Textadventures
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* miniworlds supports pixel-based games as well as games with
|
|
47
|
+
tiles (e.g. Rogue-Likes)
|
|
48
|
+
|
|
49
|
+
* Easy creation of animations
|
|
50
|
+
|
|
51
|
+
* Music and sound effects
|
|
52
|
+
|
|
53
|
+
* Integrated GUI elements like console for output, toolbar, ...
|
|
54
|
+
|
|
55
|
+
* Load and Save to SQLite Databases
|
|
56
|
+
|
|
57
|
+
* Integrated Physics-Engine based on Pymunk
|
|
58
|
+
|
|
59
|
+
* Open Source
|
|
60
|
+
|
|
61
|
+
* miniworlds is a 2D Engine based on Python 3, pygame and pymunk.
|
|
62
|
+
|
|
63
|
+
Examples
|
|
64
|
+
========
|
|
65
|
+
|
|
66
|
+
Top-Down games
|
|
67
|
+
|
|
68
|
+
<video controls loop width=100%>
|
|
69
|
+
<source src="_static/asteroids.webm" type="video/webm">
|
|
70
|
+
<source src="_static/asteroids.mp4" type="video/mp4">
|
|
71
|
+
Your browser does not support the video tag.
|
|
72
|
+
</video>
|
|
73
|
+
|
|
74
|
+
Tile Based RPGs
|
|
75
|
+
|
|
76
|
+
<video controls loop width=100%>
|
|
77
|
+
<source src="_static/rpg1.webm" type="video/webm">
|
|
78
|
+
<source src="_static/rpg1.mp4" type="video/mp4">
|
|
79
|
+
Your browser does not support the video tag.
|
|
80
|
+
</video>
|
|
81
|
+
|
|
82
|
+
Image Processing
|
|
83
|
+
|
|
84
|
+
.. image:: _images/sunflower6black.png
|
|
85
|
+
:width: 100%
|
|
86
|
+
:alt: miniworlds
|
|
87
|
+
|
|
88
|
+
Physics
|
|
89
|
+
|
|
90
|
+
<video controls loop width=100%>
|
|
91
|
+
<source src="_static/physics_sim.webm" type="video/webm">
|
|
92
|
+
<source src="_static/physics_sim.mp4" type="video/mp4">
|
|
93
|
+
Your browser does not support the video tag.
|
|
94
|
+
</video>
|
|
95
|
+
|
|
96
|
+
<video controls loop width=100%>
|
|
97
|
+
<source src="_static/joints.webm" type="video/webm">
|
|
98
|
+
<source src="_static/joints.mp4" type="video/mp4">
|
|
99
|
+
Your browser does not support the video tag.
|
|
100
|
+
</video>
|
|
101
|
+
|
|
102
|
+
Angry Birds
|
|
103
|
+
|
|
104
|
+
Physics
|
|
105
|
+
|
|
106
|
+
<video controls loop width=100%>
|
|
107
|
+
<source src="_static/angry.webm" type="video/webm">
|
|
108
|
+
<source src="_static/angry.mp4" type="video/mp4">
|
|
109
|
+
Your browser does not support the video tag.
|
|
110
|
+
</video>
|
|
111
|
+
|
|
112
|
+
NEW: Hex Boardgame:
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<video controls loop width=100%>
|
|
116
|
+
<source src="_static/hex_boardgame_short.mp4" type="video/mp4">
|
|
117
|
+
Your browser does not support the video tag.
|
|
118
|
+
</video>
|
|
119
|
+
|
|
120
|
+
[Source](https://codeberg.org/a_siebel/miniworlds_cookbook/src/branch/main/objects_first/boardgame/boardgame.py)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Links
|
|
124
|
+
|
|
125
|
+
[Codeberg](https://codeberg.org/a_siebel/miniworlds) | [Documentation](http://miniworlds.de/) | [PyPi](https://pypi.org/project/miniworlds/) | [Cookbook](https://codeberg.org/a_siebel/miniworlds_cookbook/src/branch/main/)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
miniworlds
|
|
2
|
+
---------
|
|
3
|
+
|
|
4
|
+
miniworlds allows you to create 2D mini worlds and games.
|
|
5
|
+
|
|
6
|
+
It is a 2D engine inspired by greenfoot and gamegrid based on pygame.
|
|
7
|
+
|
|
8
|
+
<kbd>
|
|
9
|
+
<img src="example.png" alt="example"></img>
|
|
10
|
+
</kbd>
|
|
11
|
+
|
|
12
|
+
### Tutorial
|
|
13
|
+
|
|
14
|
+
[English](https://miniworlds.de/objectsfirst_english/01_installation.html) | [German](https://miniworlds.de/objectsfirst_german/01_installation.html)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
|
|
19
|
+
* [Angry Birds](https://replit.com/@a_siebel/miniworlds-Angry-birds): This demonstrates the physics engine. It runs somewhat slowly on repl.it, should buy smoothly on modern computers without problems.
|
|
20
|
+
|
|
21
|
+
* [Kara](https://replit.com/@a_siebel/Kara-in-miniworlds"): Kara Prototype
|
|
22
|
+
|
|
23
|
+
* [RPG Framework](https://replit.com/@a_siebel/RPG-Framework-for-miniworlds): Framework for simple RPGs and Textadventures
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* miniworlds supports pixel-based games as well as games with
|
|
29
|
+
tiles (e.g. Rogue-Likes)
|
|
30
|
+
|
|
31
|
+
* Easy creation of animations
|
|
32
|
+
|
|
33
|
+
* Music and sound effects
|
|
34
|
+
|
|
35
|
+
* Integrated GUI elements like console for output, toolbar, ...
|
|
36
|
+
|
|
37
|
+
* Load and Save to SQLite Databases
|
|
38
|
+
|
|
39
|
+
* Integrated Physics-Engine based on Pymunk
|
|
40
|
+
|
|
41
|
+
* Open Source
|
|
42
|
+
|
|
43
|
+
* miniworlds is a 2D Engine based on Python 3, pygame and pymunk.
|
|
44
|
+
|
|
45
|
+
Examples
|
|
46
|
+
========
|
|
47
|
+
|
|
48
|
+
Top-Down games
|
|
49
|
+
|
|
50
|
+
<video controls loop width=100%>
|
|
51
|
+
<source src="_static/asteroids.webm" type="video/webm">
|
|
52
|
+
<source src="_static/asteroids.mp4" type="video/mp4">
|
|
53
|
+
Your browser does not support the video tag.
|
|
54
|
+
</video>
|
|
55
|
+
|
|
56
|
+
Tile Based RPGs
|
|
57
|
+
|
|
58
|
+
<video controls loop width=100%>
|
|
59
|
+
<source src="_static/rpg1.webm" type="video/webm">
|
|
60
|
+
<source src="_static/rpg1.mp4" type="video/mp4">
|
|
61
|
+
Your browser does not support the video tag.
|
|
62
|
+
</video>
|
|
63
|
+
|
|
64
|
+
Image Processing
|
|
65
|
+
|
|
66
|
+
.. image:: _images/sunflower6black.png
|
|
67
|
+
:width: 100%
|
|
68
|
+
:alt: miniworlds
|
|
69
|
+
|
|
70
|
+
Physics
|
|
71
|
+
|
|
72
|
+
<video controls loop width=100%>
|
|
73
|
+
<source src="_static/physics_sim.webm" type="video/webm">
|
|
74
|
+
<source src="_static/physics_sim.mp4" type="video/mp4">
|
|
75
|
+
Your browser does not support the video tag.
|
|
76
|
+
</video>
|
|
77
|
+
|
|
78
|
+
<video controls loop width=100%>
|
|
79
|
+
<source src="_static/joints.webm" type="video/webm">
|
|
80
|
+
<source src="_static/joints.mp4" type="video/mp4">
|
|
81
|
+
Your browser does not support the video tag.
|
|
82
|
+
</video>
|
|
83
|
+
|
|
84
|
+
Angry Birds
|
|
85
|
+
|
|
86
|
+
Physics
|
|
87
|
+
|
|
88
|
+
<video controls loop width=100%>
|
|
89
|
+
<source src="_static/angry.webm" type="video/webm">
|
|
90
|
+
<source src="_static/angry.mp4" type="video/mp4">
|
|
91
|
+
Your browser does not support the video tag.
|
|
92
|
+
</video>
|
|
93
|
+
|
|
94
|
+
NEW: Hex Boardgame:
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<video controls loop width=100%>
|
|
98
|
+
<source src="_static/hex_boardgame_short.mp4" type="video/mp4">
|
|
99
|
+
Your browser does not support the video tag.
|
|
100
|
+
</video>
|
|
101
|
+
|
|
102
|
+
[Source](https://codeberg.org/a_siebel/miniworlds_cookbook/src/branch/main/objects_first/boardgame/boardgame.py)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Links
|
|
106
|
+
|
|
107
|
+
[Codeberg](https://codeberg.org/a_siebel/miniworlds) | [Documentation](http://miniworlds.de/) | [PyPi](https://pypi.org/project/miniworlds/) | [Cookbook](https://codeberg.org/a_siebel/miniworlds_cookbook/src/branch/main/)
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import inspect
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import pygame
|
|
5
|
+
from miniworlds.base.app import App
|
|
6
|
+
|
|
7
|
+
from miniworlds.worlds.world import World
|
|
8
|
+
|
|
9
|
+
from miniworlds.worlds.gui.toolbar import Toolbar
|
|
10
|
+
from miniworlds.worlds.gui.console import Console
|
|
11
|
+
from miniworlds.worlds.gui.pager import PagerHorizontal
|
|
12
|
+
|
|
13
|
+
from miniworlds.actors.actor import Actor
|
|
14
|
+
from miniworlds.actors.texts.text import Text
|
|
15
|
+
from miniworlds.actors.texts.textbox import TextBox
|
|
16
|
+
from miniworlds.actors.texts.number import Number
|
|
17
|
+
from miniworlds.actors.sensors.sensor_actor import Sensor
|
|
18
|
+
from miniworlds.actors.sensors.circle_sensor import CircleSensor
|
|
19
|
+
|
|
20
|
+
from miniworlds.actors.shapes.shapes import Point
|
|
21
|
+
from miniworlds.actors.shapes.shapes import Rectangle
|
|
22
|
+
from miniworlds.actors.shapes.shapes import Circle
|
|
23
|
+
from miniworlds.actors.shapes.shapes import Line
|
|
24
|
+
from miniworlds.actors.shapes.shapes import Ellipse
|
|
25
|
+
from miniworlds.actors.shapes.shapes import Polygon
|
|
26
|
+
from miniworlds.actors.shapes.shapes import Triangle
|
|
27
|
+
from miniworlds.actors.shapes.shapes import Arc
|
|
28
|
+
|
|
29
|
+
from miniworlds.appearances.appearance import Appearance
|
|
30
|
+
from miniworlds.appearances.background import Background
|
|
31
|
+
from miniworlds.appearances.costume import Costume
|
|
32
|
+
|
|
33
|
+
from miniworlds.tools.timer import timer
|
|
34
|
+
from miniworlds.tools.timer import loop
|
|
35
|
+
from miniworlds.tools.timer import ActionTimer
|
|
36
|
+
from miniworlds.tools.timer import LoopActionTimer
|
|
37
|
+
from miniworlds.tools.timer import Timer
|
|
38
|
+
|
|
39
|
+
from miniworlds.actors.widgets.button import Button
|
|
40
|
+
from miniworlds.actors.widgets.label import Label
|
|
41
|
+
from miniworlds.actors.widgets.input import Input
|
|
42
|
+
from miniworlds.actors.widgets.yesno import YesNoButton
|
|
43
|
+
from miniworlds.actors.widgets.counter import CounterLabel
|
|
44
|
+
|
|
45
|
+
from miniworlds.positions.vector import Vector
|
|
46
|
+
from miniworlds.positions.rect import Rect
|
|
47
|
+
|
|
48
|
+
from miniworlds.worlds.tiled_world.tiled_world import TiledWorld
|
|
49
|
+
from miniworlds.worlds.tiled_world.tile_factory import TileFactory
|
|
50
|
+
from miniworlds.worlds.tiled_world.tile_elements import TileBase
|
|
51
|
+
from miniworlds.worlds.tiled_world.edge import Edge
|
|
52
|
+
from miniworlds.worlds.tiled_world.tile import Tile
|
|
53
|
+
from miniworlds.worlds.tiled_world.corner import Corner
|
|
54
|
+
|
|
55
|
+
from miniworlds.base.exceptions import CostumeOutOfBoundsError
|
|
56
|
+
from miniworlds.base.exceptions import OriginException
|
|
57
|
+
|
|
58
|
+
pygame.init()
|
|
59
|
+
|
|
60
|
+
current_frame = inspect.currentframe()
|
|
61
|
+
if current_frame:
|
|
62
|
+
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(current_frame)))
|
|
63
|
+
parent_dir = os.path.dirname(current_dir)
|
|
64
|
+
sys.path.insert(0, parent_dir)
|
|
65
|
+
|
|
66
|
+
__all__ = []
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
__all__.append(App.__name__)
|
|
70
|
+
__all__.append(World.__name__)
|
|
71
|
+
|
|
72
|
+
__all__.append(TiledWorld.__name__)
|
|
73
|
+
__all__.append(Actor.__name__)
|
|
74
|
+
__all__.append(Text.__name__)
|
|
75
|
+
__all__.append(TextBox.__name__)
|
|
76
|
+
__all__.append(Number.__name__)
|
|
77
|
+
|
|
78
|
+
__all__.append(Point.__name__)
|
|
79
|
+
__all__.append(Rectangle.__name__)
|
|
80
|
+
__all__.append(Line.__name__)
|
|
81
|
+
__all__.append(Ellipse.__name__)
|
|
82
|
+
__all__.append(Polygon.__name__)
|
|
83
|
+
__all__.append(Triangle.__name__)
|
|
84
|
+
__all__.append(Arc.__name__)
|
|
85
|
+
__all__.append(Circle.__name__)
|
|
86
|
+
|
|
87
|
+
__all__.append(Sensor.__name__)
|
|
88
|
+
__all__.append(CircleSensor.__name__)
|
|
89
|
+
|
|
90
|
+
__all__.append(Appearance.__name__)
|
|
91
|
+
__all__.append(Background.__name__)
|
|
92
|
+
__all__.append(Costume.__name__)
|
|
93
|
+
|
|
94
|
+
__all__.append(Vector.__name__)
|
|
95
|
+
__all__.append(Rect.__name__)
|
|
96
|
+
|
|
97
|
+
__all__.append(Toolbar.__name__)
|
|
98
|
+
__all__.append(Console.__name__)
|
|
99
|
+
__all__.append(PagerHorizontal.__name__)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
__all__.append(YesNoButton.__name__)
|
|
103
|
+
__all__.append(Input.__name__)
|
|
104
|
+
__all__.append(Label.__name__)
|
|
105
|
+
__all__.append(Button.__name__)
|
|
106
|
+
__all__.append(CounterLabel.__name__)
|
|
107
|
+
|
|
108
|
+
__all__.append(TileFactory.__name__)
|
|
109
|
+
|
|
110
|
+
__all__.append(TileBase.__name__)
|
|
111
|
+
__all__.append(Corner.__name__)
|
|
112
|
+
__all__.append(Tile.__name__)
|
|
113
|
+
__all__.append(Edge.__name__)
|
|
114
|
+
|
|
115
|
+
__all__.append(timer.__name__)
|
|
116
|
+
__all__.append(loop.__name__)
|
|
117
|
+
|
|
118
|
+
__all__.append(ActionTimer.__name__)
|
|
119
|
+
__all__.append(LoopActionTimer.__name__)
|
|
120
|
+
__all__.append(Timer.__name__)
|
|
121
|
+
|
|
122
|
+
__all__.append(CostumeOutOfBoundsError.__name__)
|
|
123
|
+
__all__.append(OriginException.__name__)
|
|
File without changes
|