mima-engine 0.1.0__py3-none-any.whl
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.
Potentially problematic release.
This version of mima-engine might be problematic. Click here for more details.
- mima/__init__.py +1 -0
- mima/backend/__init__.py +1 -0
- mima/backend/pygame_assets.py +345 -0
- mima/backend/pygame_audio.py +75 -0
- mima/backend/pygame_backend.py +399 -0
- mima/backend/pygame_events.py +430 -0
- mima/collision.py +237 -0
- mima/engine.py +197 -0
- mima/maps/__init__.py +0 -0
- mima/maps/template.py +41 -0
- mima/maps/tile.py +20 -0
- mima/maps/tile_animation.py +7 -0
- mima/maps/tile_info.py +10 -0
- mima/maps/tile_layer.py +52 -0
- mima/maps/tiled/__init__.py +0 -0
- mima/maps/tiled/tiled_layer.py +48 -0
- mima/maps/tiled/tiled_map.py +95 -0
- mima/maps/tiled/tiled_object.py +79 -0
- mima/maps/tiled/tiled_objectgroup.py +25 -0
- mima/maps/tiled/tiled_template.py +49 -0
- mima/maps/tiled/tiled_tile.py +90 -0
- mima/maps/tiled/tiled_tileset.py +45 -0
- mima/maps/tilemap.py +159 -0
- mima/maps/tileset.py +32 -0
- mima/maps/tileset_info.py +9 -0
- mima/maps/transition_map.py +148 -0
- mima/objects/__init__.py +0 -0
- mima/objects/animated_sprite.py +198 -0
- mima/objects/attribute_effect.py +26 -0
- mima/objects/attributes.py +123 -0
- mima/objects/creature.py +332 -0
- mima/objects/dynamic.py +182 -0
- mima/objects/effects/__init__.py +0 -0
- mima/objects/effects/colorize_screen.py +36 -0
- mima/objects/effects/light.py +107 -0
- mima/objects/effects/walking_on_grass.py +38 -0
- mima/objects/effects/walking_on_water.py +41 -0
- mima/objects/loader.py +103 -0
- mima/objects/projectile.py +86 -0
- mima/objects/sprite.py +110 -0
- mima/objects/world/__init__.py +0 -0
- mima/objects/world/color_gate.py +68 -0
- mima/objects/world/color_switch.py +105 -0
- mima/objects/world/container.py +171 -0
- mima/objects/world/floor_switch.py +111 -0
- mima/objects/world/gate.py +174 -0
- mima/objects/world/light_source.py +124 -0
- mima/objects/world/logic_gate.py +163 -0
- mima/objects/world/movable.py +338 -0
- mima/objects/world/oneway.py +168 -0
- mima/objects/world/pickup.py +88 -0
- mima/objects/world/switch.py +165 -0
- mima/objects/world/teleport.py +288 -0
- mima/scene_engine.py +79 -0
- mima/scripts/__init__.py +2 -0
- mima/scripts/command.py +24 -0
- mima/scripts/commands/__init__.py +0 -0
- mima/scripts/commands/add_quest.py +19 -0
- mima/scripts/commands/change_map.py +15 -0
- mima/scripts/commands/close_dialog.py +8 -0
- mima/scripts/commands/give_item.py +24 -0
- mima/scripts/commands/give_resource.py +51 -0
- mima/scripts/commands/move_map.py +152 -0
- mima/scripts/commands/move_to.py +49 -0
- mima/scripts/commands/oneway_move.py +57 -0
- mima/scripts/commands/parallel.py +53 -0
- mima/scripts/commands/play_sound.py +13 -0
- mima/scripts/commands/present_item.py +51 -0
- mima/scripts/commands/progress_quest.py +12 -0
- mima/scripts/commands/quit_game.py +8 -0
- mima/scripts/commands/save_game.py +13 -0
- mima/scripts/commands/screen_fade.py +65 -0
- mima/scripts/commands/serial.py +46 -0
- mima/scripts/commands/set_facing_direction.py +21 -0
- mima/scripts/commands/set_spawn_map.py +14 -0
- mima/scripts/commands/show_choices.py +43 -0
- mima/scripts/commands/show_dialog.py +11 -0
- mima/scripts/commands/take_coins.py +23 -0
- mima/scripts/script_processor.py +40 -0
- mima/states/__init__.py +0 -0
- mima/states/game_state.py +162 -0
- mima/states/quest.py +72 -0
- mima/types/__init__.py +0 -0
- mima/types/alignment.py +7 -0
- mima/types/blend.py +8 -0
- mima/types/damage.py +42 -0
- mima/types/direction.py +44 -0
- mima/types/gate_color.py +7 -0
- mima/types/graphic_state.py +22 -0
- mima/types/keys.py +16 -0
- mima/types/mode.py +15 -0
- mima/types/nature.py +12 -0
- mima/types/object.py +22 -0
- mima/types/start.py +7 -0
- mima/types/terrain.py +9 -0
- mima/types/weapon_slot.py +6 -0
- mima/usables/__init__.py +0 -0
- mima/usables/item.py +31 -0
- mima/usables/weapon.py +48 -0
- mima/util/__init__.py +1 -0
- mima/util/colors.py +45 -0
- mima/util/constants.py +47 -0
- mima/util/functions.py +13 -0
- mima/util/input_defaults.py +49 -0
- mima/util/logging.py +51 -0
- mima/util/property.py +8 -0
- mima/util/runtime_config.py +133 -0
- mima/view/__init__.py +0 -0
- mima/view/camera.py +51 -0
- mima/view/scene.py +350 -0
- mima_engine-0.1.0.dist-info/METADATA +14 -0
- mima_engine-0.1.0.dist-info/RECORD +114 -0
- mima_engine-0.1.0.dist-info/WHEEL +5 -0
- mima_engine-0.1.0.dist-info/top_level.txt +1 -0
mima/view/scene.py
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, List, Optional
|
|
4
|
+
|
|
5
|
+
from mima.types.nature import Nature
|
|
6
|
+
from mima.util.constants import TILE_HEIGHT, TILE_WIDTH
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from ..collision import (
|
|
10
|
+
check_object_to_map_collision,
|
|
11
|
+
check_object_to_object_collision,
|
|
12
|
+
)
|
|
13
|
+
from ..types.mode import Mode
|
|
14
|
+
from ..util.constants import BIG_FONT_HEIGHT, BIG_FONT_WIDTH
|
|
15
|
+
from .camera import Camera
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from mima.objects.loader import ObjectLoader
|
|
19
|
+
from ..engine import MimaEngine
|
|
20
|
+
from ..maps.tilemap import Tilemap
|
|
21
|
+
from ..objects.dynamic import Dynamic
|
|
22
|
+
from ..objects.projectile import Projectile
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Scene:
|
|
26
|
+
engine: MimaEngine
|
|
27
|
+
|
|
28
|
+
def __init__(self):
|
|
29
|
+
self.tilemap: Tilemap
|
|
30
|
+
self.dynamics: List[Dynamic] = []
|
|
31
|
+
self.projectiles: List[Projectile] = []
|
|
32
|
+
self.effects: List[Projectile] = []
|
|
33
|
+
self.dialog_to_show: Optional[List[str]] = None
|
|
34
|
+
self.camera: Camera = Camera(0, 0)
|
|
35
|
+
self.loader: ObjectLoader
|
|
36
|
+
self.autosave: bool = False
|
|
37
|
+
|
|
38
|
+
def update(self, elapsed_time):
|
|
39
|
+
pass
|
|
40
|
+
|
|
41
|
+
def add_dynamic(self, dynamic: Dynamic):
|
|
42
|
+
self.dynamics.append(dynamic)
|
|
43
|
+
|
|
44
|
+
def add_projectile(self, projectile: Projectile):
|
|
45
|
+
self.projectiles.append(projectile)
|
|
46
|
+
|
|
47
|
+
def add_effect(self, effect: Projectile):
|
|
48
|
+
self.effects.append(effect)
|
|
49
|
+
|
|
50
|
+
def change_map(self, map_name: str, spawn_px: float, spawn_py: float):
|
|
51
|
+
pass
|
|
52
|
+
|
|
53
|
+
def delete_map_dynamics(self):
|
|
54
|
+
self.dynamics = [obj for obj in self.dynamics if obj.persistent]
|
|
55
|
+
if not self.dynamics:
|
|
56
|
+
self.dynamics = [self.engine.player]
|
|
57
|
+
for p in self.projectiles:
|
|
58
|
+
if not p.persistent:
|
|
59
|
+
p.cancel()
|
|
60
|
+
for e in self.effects:
|
|
61
|
+
if not e.persistent:
|
|
62
|
+
e.cancel()
|
|
63
|
+
self.projectiles = [p for p in self.projectiles if p.persistent]
|
|
64
|
+
self.effects = [e for e in self.effects if e.persistent]
|
|
65
|
+
|
|
66
|
+
def show_dialog(self, lines: List[str]):
|
|
67
|
+
self.dialog_to_show = lines
|
|
68
|
+
self.engine.dialog_active = True
|
|
69
|
+
|
|
70
|
+
def display_dialog(
|
|
71
|
+
self,
|
|
72
|
+
lines: str,
|
|
73
|
+
px: float,
|
|
74
|
+
py: float,
|
|
75
|
+
background_color=None,
|
|
76
|
+
border_color=None,
|
|
77
|
+
):
|
|
78
|
+
if background_color is None:
|
|
79
|
+
background_color = self.engine.rtc.colors["gb_dark"]
|
|
80
|
+
if border_color is None:
|
|
81
|
+
border_color = self.engine.rtc.colors["gb_light"]
|
|
82
|
+
|
|
83
|
+
max_line_length = 0
|
|
84
|
+
num_lines = len(lines)
|
|
85
|
+
|
|
86
|
+
for line in lines:
|
|
87
|
+
if len(line) > max_line_length:
|
|
88
|
+
max_line_length = len(line)
|
|
89
|
+
|
|
90
|
+
self.engine.backend.fill_rect(
|
|
91
|
+
px - 1,
|
|
92
|
+
py - 1,
|
|
93
|
+
max_line_length * BIG_FONT_WIDTH + 2,
|
|
94
|
+
num_lines * BIG_FONT_HEIGHT + 2,
|
|
95
|
+
background_color,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
self.engine.backend.draw_rect(
|
|
99
|
+
px - 2,
|
|
100
|
+
py - 2,
|
|
101
|
+
max_line_length * BIG_FONT_WIDTH + 4,
|
|
102
|
+
num_lines * BIG_FONT_HEIGHT + 4,
|
|
103
|
+
border_color,
|
|
104
|
+
)
|
|
105
|
+
# self.apf.draw_line(
|
|
106
|
+
# Vector2D(pos.x - 2, pos.y - 2),
|
|
107
|
+
# Vector2D(pos.x - 2, pos.y + num_lines * BIG_FONT_HEIGHT + 1),
|
|
108
|
+
# border_color,
|
|
109
|
+
# ) # topleft to bottomleft
|
|
110
|
+
# self.apf.draw_line(
|
|
111
|
+
# Vector2D(pos.x + max_line_length * BIG_FONT_WIDTH + 1, pos.y - 2),
|
|
112
|
+
# Vector2D(
|
|
113
|
+
# pos.x + max_line_length * BIG_FONT_WIDTH + 1,
|
|
114
|
+
# pos.y + num_lines * BIG_FONT_HEIGHT + 1,
|
|
115
|
+
# ),
|
|
116
|
+
# border_color,
|
|
117
|
+
# ) # topright to bottomright
|
|
118
|
+
# self.apf.draw_line(
|
|
119
|
+
# Vector2D(pos.x - 2, pos.y - 2),
|
|
120
|
+
# Vector2D(pos.x + max_line_length * BIG_FONT_WIDTH + 1, pos.y - 2),
|
|
121
|
+
# border_color,
|
|
122
|
+
# ) # topleft to topright
|
|
123
|
+
# self.apf.draw_line(
|
|
124
|
+
# Vector2D(pos.x - 2, pos.y + num_lines * BIG_FONT_HEIGHT + 1),
|
|
125
|
+
# Vector2D(
|
|
126
|
+
# pos.x + max_line_length * BIG_FONT_WIDTH + 1,
|
|
127
|
+
# pos.y + num_lines * BGI_FONT_HEIGHT + 1,
|
|
128
|
+
# ),
|
|
129
|
+
# border_color,
|
|
130
|
+
# ) # bottomleft to bottomright
|
|
131
|
+
|
|
132
|
+
for idx, line in enumerate(lines):
|
|
133
|
+
self.engine.backend.draw_big_text(
|
|
134
|
+
line, px, py + idx * BIG_FONT_HEIGHT
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
def draw_map_and_objects(self):
|
|
138
|
+
# First, background layers of the map
|
|
139
|
+
self.draw_map_layers([-1, 0])
|
|
140
|
+
|
|
141
|
+
# Second, dynamics and projectiles
|
|
142
|
+
self.draw_objects_y_sorted()
|
|
143
|
+
# for obj in self.dynamics + self.projectiles:
|
|
144
|
+
# obj.draw_self(self.camera.ox, self.camera.oy)
|
|
145
|
+
|
|
146
|
+
# Third, effects
|
|
147
|
+
for effect in self.effects:
|
|
148
|
+
if effect.layer == 0:
|
|
149
|
+
effect.draw_self(self.camera.ox, self.camera.oy)
|
|
150
|
+
|
|
151
|
+
# Fourth, all the foreground layers of the map
|
|
152
|
+
self.draw_map_layers([1, 2])
|
|
153
|
+
|
|
154
|
+
# Fifth, there might be foreground effects
|
|
155
|
+
for effect in self.effects:
|
|
156
|
+
if effect.layer >= 1:
|
|
157
|
+
effect.draw_self(self.camera.ox, self.camera.oy)
|
|
158
|
+
|
|
159
|
+
def draw_map_layers(self, layers: List[int]):
|
|
160
|
+
for pos in layers:
|
|
161
|
+
self.tilemap.draw_self(
|
|
162
|
+
self.camera.ox,
|
|
163
|
+
self.camera.oy,
|
|
164
|
+
self.camera.visible_tiles_sx,
|
|
165
|
+
self.camera.visible_tiles_sy,
|
|
166
|
+
self.camera.visible_tiles_ex,
|
|
167
|
+
self.camera.visible_tiles_ey,
|
|
168
|
+
pos,
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
def draw_objects_y_sorted(self):
|
|
172
|
+
y_sorted = sorted(
|
|
173
|
+
self.dynamics + self.projectiles, key=lambda obj: obj.py
|
|
174
|
+
)
|
|
175
|
+
for layer in range(3):
|
|
176
|
+
for obj in y_sorted:
|
|
177
|
+
if not obj.redundant and obj.visible:
|
|
178
|
+
if obj.layer == layer:
|
|
179
|
+
obj.draw_self(self.camera.ox, self.camera.oy)
|
|
180
|
+
|
|
181
|
+
# if self.engine.draw_debug:
|
|
182
|
+
# color = CYAN
|
|
183
|
+
# if obj.type == ObjectType.PROJECTILE:
|
|
184
|
+
# color = RED
|
|
185
|
+
# color.alpha = 128
|
|
186
|
+
# self.engine.backend.fill_rect(
|
|
187
|
+
# (obj.px + obj.hitbox_px - self.camera.ox)
|
|
188
|
+
# * TILE_WIDTH,
|
|
189
|
+
# (obj.py + obj.hitbox_py - self.camera.oy)
|
|
190
|
+
# * TILE_HEIGHT,
|
|
191
|
+
# obj.hitbox_width * TILE_WIDTH,
|
|
192
|
+
# obj.hitbox_height * TILE_HEIGHT,
|
|
193
|
+
# color,
|
|
194
|
+
# )
|
|
195
|
+
# elif (
|
|
196
|
+
# not obj.redundant and self.engine.draw_bounding_rectangles
|
|
197
|
+
# ):
|
|
198
|
+
# self.engine.backend.fill_rect(
|
|
199
|
+
# (obj.px + obj.hitbox_px - self.camera.ox)
|
|
200
|
+
# * obj.sprite.width,
|
|
201
|
+
# (obj.py + obj.hitbox_py - self.camera.oy)
|
|
202
|
+
# * obj.sprite.height,
|
|
203
|
+
# obj.hitbox_width * TILE_WIDTH,
|
|
204
|
+
# obj.hitbox_height * TILE_HEIGHT,
|
|
205
|
+
# CYAN,
|
|
206
|
+
# )
|
|
207
|
+
|
|
208
|
+
def delete_redundant_objects(self):
|
|
209
|
+
if self.engine.player.redundant:
|
|
210
|
+
self.engine.scene_stack.append(Mode.GAME_OVER)
|
|
211
|
+
# self.engine.session_seconds = self.engine.total_seconds
|
|
212
|
+
|
|
213
|
+
# Find and erase redundant dynamics
|
|
214
|
+
d2rm = [d for d in self.dynamics if d.redundant]
|
|
215
|
+
for dyn in d2rm:
|
|
216
|
+
for quest in self.engine.quests:
|
|
217
|
+
quest.on_interaction(self.dynamics, dyn, Nature.KILLED)
|
|
218
|
+
dyn.on_death()
|
|
219
|
+
self.dynamics.remove(dyn)
|
|
220
|
+
|
|
221
|
+
# Find and erase redundant projectiles
|
|
222
|
+
p2rm = [p for p in self.projectiles if p.redundant]
|
|
223
|
+
for pro in p2rm:
|
|
224
|
+
pro.on_death()
|
|
225
|
+
self.projectiles.remove(pro)
|
|
226
|
+
|
|
227
|
+
# Find and erase redundant effects
|
|
228
|
+
e2rm = [e for e in self.effects if e.redundant]
|
|
229
|
+
for eff in e2rm:
|
|
230
|
+
eff.on_death()
|
|
231
|
+
self.effects.remove(eff)
|
|
232
|
+
|
|
233
|
+
# Find and erase completed quests
|
|
234
|
+
q2rm = [q for q in self.engine.quests if q.completed]
|
|
235
|
+
for quest in q2rm:
|
|
236
|
+
self.engine.quests.remove(quest)
|
|
237
|
+
|
|
238
|
+
def handle_user_input(self):
|
|
239
|
+
pass
|
|
240
|
+
|
|
241
|
+
def handle_collisions(self, elapsed_time: float):
|
|
242
|
+
screen_width = self.engine.backend.render_width // TILE_WIDTH
|
|
243
|
+
screen_height = self.engine.backend.render_height // TILE_HEIGHT
|
|
244
|
+
|
|
245
|
+
# Filter for onscreen/offscreen objects
|
|
246
|
+
dynamics = [
|
|
247
|
+
obj
|
|
248
|
+
for obj in self.dynamics
|
|
249
|
+
if (
|
|
250
|
+
not obj.offscreen_collision_skippable
|
|
251
|
+
or (
|
|
252
|
+
abs(self.engine.player.px - obj.px) < screen_width
|
|
253
|
+
and abs(self.engine.player.py - obj.py) < screen_height
|
|
254
|
+
)
|
|
255
|
+
)
|
|
256
|
+
]
|
|
257
|
+
projectiles = [
|
|
258
|
+
obj
|
|
259
|
+
for obj in self.projectiles
|
|
260
|
+
if (
|
|
261
|
+
not obj.offscreen_collision_skippable
|
|
262
|
+
or (
|
|
263
|
+
abs(self.engine.player.px - obj.px) < screen_width
|
|
264
|
+
and abs(self.engine.player.py - obj.py) < screen_height
|
|
265
|
+
)
|
|
266
|
+
)
|
|
267
|
+
]
|
|
268
|
+
for obj in dynamics + projectiles:
|
|
269
|
+
if obj.onscreen_collision_skippable:
|
|
270
|
+
# self.skipped_collision_checks += 1
|
|
271
|
+
continue
|
|
272
|
+
|
|
273
|
+
new_px, new_py = self.update_position(obj, elapsed_time)
|
|
274
|
+
|
|
275
|
+
new_px, new_py = check_object_to_map_collision(
|
|
276
|
+
elapsed_time, obj, self.tilemap, new_px, new_py
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
if self.check_tile_properties(obj, new_px, new_py):
|
|
280
|
+
# If true, something happened to the object
|
|
281
|
+
continue
|
|
282
|
+
|
|
283
|
+
for other in dynamics:
|
|
284
|
+
if other == obj:
|
|
285
|
+
continue
|
|
286
|
+
|
|
287
|
+
new_px, new_py = check_object_to_object_collision(
|
|
288
|
+
self.engine, self, obj, new_px, new_py, other
|
|
289
|
+
)
|
|
290
|
+
obj.px = new_px
|
|
291
|
+
obj.py = new_py
|
|
292
|
+
|
|
293
|
+
def update_dynamics(self, elapsed_time: float):
|
|
294
|
+
screen_width = self.engine.backend.render_width // TILE_WIDTH
|
|
295
|
+
screen_height = self.engine.backend.render_height // TILE_HEIGHT
|
|
296
|
+
|
|
297
|
+
for obj in self.dynamics + self.projectiles:
|
|
298
|
+
if (
|
|
299
|
+
obj.update_skippable
|
|
300
|
+
and abs(self.engine.player.px - obj.px) > screen_width
|
|
301
|
+
):
|
|
302
|
+
continue
|
|
303
|
+
if (
|
|
304
|
+
obj.update_skippable
|
|
305
|
+
and abs(self.engine.player.py - obj.py) > screen_height
|
|
306
|
+
):
|
|
307
|
+
continue
|
|
308
|
+
|
|
309
|
+
obj.vz -= obj.attributes.gravity_vz * elapsed_time
|
|
310
|
+
obj.update(elapsed_time, self.engine.player)
|
|
311
|
+
|
|
312
|
+
if obj.gravity:
|
|
313
|
+
obj.pz = obj.pz + obj.vz * elapsed_time
|
|
314
|
+
if obj.pz <= 0.0:
|
|
315
|
+
obj.pz = 0.0
|
|
316
|
+
obj.vz = 0.0
|
|
317
|
+
|
|
318
|
+
def update_position(self, obj: Dynamic, elapsed_time: float):
|
|
319
|
+
vx, vy = min(1, max(-1, obj.vx)), min(1, max(-1, obj.vy))
|
|
320
|
+
|
|
321
|
+
# Diagonal movement
|
|
322
|
+
if obj.vx != 0 and obj.vy != 0:
|
|
323
|
+
vx, vy = vx * 0.707, vy * 0.707
|
|
324
|
+
|
|
325
|
+
def calculate(v, real_v):
|
|
326
|
+
if v == 0 and obj.use_friction:
|
|
327
|
+
mod = obj.attributes.friction
|
|
328
|
+
elif v != 0 and obj.use_acceleration:
|
|
329
|
+
mod = obj.attributes.acceleration
|
|
330
|
+
else:
|
|
331
|
+
return v
|
|
332
|
+
|
|
333
|
+
dif = v - real_v
|
|
334
|
+
if abs(dif) < 0.01:
|
|
335
|
+
return v
|
|
336
|
+
return real_v + (v - real_v) * mod * elapsed_time
|
|
337
|
+
|
|
338
|
+
obj.real_vx = vx if vx == obj.real_vx else calculate(vx, obj.real_vx)
|
|
339
|
+
obj.real_vy = vy if vy == obj.real_vy else calculate(vy, obj.real_vy)
|
|
340
|
+
|
|
341
|
+
new_px = (
|
|
342
|
+
obj.px
|
|
343
|
+
+ obj.real_vx * obj.speed * obj.attributes.speed_mod * elapsed_time
|
|
344
|
+
)
|
|
345
|
+
new_py = (
|
|
346
|
+
obj.py
|
|
347
|
+
+ obj.real_vy * obj.speed * obj.attributes.speed_mod * elapsed_time
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
return new_px, new_py
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: mima-engine
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A game engine based on pygame.
|
|
5
|
+
Author-email: Stephan Balduin <stephan.balduin@mailbox.org>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: pygame-ce
|
|
11
|
+
|
|
12
|
+
# Mima Engine
|
|
13
|
+
|
|
14
|
+
A game engine based on pygame.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
mima/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
2
|
+
mima/collision.py,sha256=roHN_U2H5dhhKwvhgBQLArjodhbNlt3fV9KjPs7nGzw,6872
|
|
3
|
+
mima/engine.py,sha256=bnizWIhvRieGg3TV1BeUUhVSNaHzfCb09u_9vj2hBIQ,5988
|
|
4
|
+
mima/scene_engine.py,sha256=m-TF8Kq2PoSD5GgTRp7FCjBH8W2kWSr9s4w6gp_MYfo,2531
|
|
5
|
+
mima/backend/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
6
|
+
mima/backend/pygame_assets.py,sha256=F1zjAaffY8t8jDMXEQ5rWhHXvI-OVaL0UtqjMDmweiM,12247
|
|
7
|
+
mima/backend/pygame_audio.py,sha256=HsEF321PecqE6DuFy92HiV5YWsQxAtnid_4Tm-VezGQ,2320
|
|
8
|
+
mima/backend/pygame_backend.py,sha256=vMBVEMCQBkELyxRKzH2OwNxwJUxc3vLhhrQM0zDWo9M,11747
|
|
9
|
+
mima/backend/pygame_events.py,sha256=w4zYiBlcbZsx2lPRz6wZ4mEvjpVlzvDTGWgcpoosYCY,16248
|
|
10
|
+
mima/maps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
mima/maps/template.py,sha256=xBIIzf2o6ATHevfZA5b5XP-o6o71-04u7OAS4847buY,1178
|
|
12
|
+
mima/maps/tile.py,sha256=ZIPtpVCrX_dnL8SKwobj_0etMCUrQxRL5d04KnEmwNQ,639
|
|
13
|
+
mima/maps/tile_animation.py,sha256=xoI41BIFd6udW47xHAbfGhuqMVIvAw75vlec1iEhdhE,106
|
|
14
|
+
mima/maps/tile_info.py,sha256=VLAjfPCrLbzTP7p1qk5O3ytc4zFg_52ZyYvAbufC_X8,152
|
|
15
|
+
mima/maps/tile_layer.py,sha256=L8qmXaWnAaS4FUb-poC8Xve_pGvoFmwR_YCLE1tdWww,1592
|
|
16
|
+
mima/maps/tilemap.py,sha256=kfkYXotfmckz_4n17Msnl5rkzK7NKSvSTaX_we15ibo,5026
|
|
17
|
+
mima/maps/tileset.py,sha256=nAGF7XQv27kTYlWAyiAXYmRpLRzpOBgAvEHsLwtxH8M,819
|
|
18
|
+
mima/maps/tileset_info.py,sha256=nJvghbxlxpvYOXaR1A2Joyz3LxPV7usspQcvKM5iyBg,136
|
|
19
|
+
mima/maps/transition_map.py,sha256=wnuwSKXJyVZGm-6IocAUcskykq_CWGjEOgXtJVpavjc,5021
|
|
20
|
+
mima/maps/tiled/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
mima/maps/tiled/tiled_layer.py,sha256=JpSoxHGYf-g4fjGcU8J8z3M9RaSvuBd1VHIp9joZy4A,1572
|
|
22
|
+
mima/maps/tiled/tiled_map.py,sha256=X65-XeAjONo_fw7EKAcBTpBSc4nzABFcvQVrT1Oypms,2966
|
|
23
|
+
mima/maps/tiled/tiled_object.py,sha256=ubfvPY2VSfy7tOhakHbfBbD4wa6X3fpSJ8ugGUzvGuI,2782
|
|
24
|
+
mima/maps/tiled/tiled_objectgroup.py,sha256=CDaxhpj65v-jKGdIHbN80VBfd6GbEfALgJnB5cdcKUU,588
|
|
25
|
+
mima/maps/tiled/tiled_template.py,sha256=02JlfGitkorSFztDQ4BrLx7ZnWRctJgV7azK5cGvTNE,1498
|
|
26
|
+
mima/maps/tiled/tiled_tile.py,sha256=CMh0W7KweqP_WZUbcgcYT3xis8hOECBlzaVtRKTYLX8,3172
|
|
27
|
+
mima/maps/tiled/tiled_tileset.py,sha256=8AzYboKpoXyrDU2jzp2hv3LIrH2baEhuPul0HH4eSeY,1428
|
|
28
|
+
mima/objects/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
+
mima/objects/animated_sprite.py,sha256=4ShQBmVCnLd5e6d0QQme0AvfptjaV7Js4SNYr68THbE,6640
|
|
30
|
+
mima/objects/attribute_effect.py,sha256=zikOSb6-hD6Ecm4L9EyRocTyJQ7IYC0CJ9DCBxbK4cU,650
|
|
31
|
+
mima/objects/attributes.py,sha256=Qr2bfyVdSBSqFPlEK5BlpqnslXpjfCTP65_wmxSf9Pg,3705
|
|
32
|
+
mima/objects/creature.py,sha256=-8odviRzNPQu9grZgdfOjQ6VkvHD_bSyYI4GG8ZNzbc,11101
|
|
33
|
+
mima/objects/dynamic.py,sha256=-u7YRFOYPFgmaXa5Zd8yeX0Ysy92he9a36wxoeaPaLY,5715
|
|
34
|
+
mima/objects/loader.py,sha256=FGg4389Y_cSCIjVhW2MaJPOY-LYqLQvhEm7w6bzMBSg,4124
|
|
35
|
+
mima/objects/projectile.py,sha256=EPOeQlHqIy0tKhFY8WBh5AUc6GQPAWByr_F4ZW1sLXg,2506
|
|
36
|
+
mima/objects/sprite.py,sha256=P-wvynPEwyappReLucrymBoIKpuzkJP5PaLwbSjHORE,3711
|
|
37
|
+
mima/objects/effects/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
+
mima/objects/effects/colorize_screen.py,sha256=9cWXFBnchm86M9us1Y97psWIcDiQ3KTtHgMkXmsOyvU,1266
|
|
39
|
+
mima/objects/effects/light.py,sha256=2SAM60S5IfOyny4Zm6duOOFYoyhi-bfnCnmra__11w0,3739
|
|
40
|
+
mima/objects/effects/walking_on_grass.py,sha256=Wia5xteG-lhW4IWLRsNw3zQiwt1gQxytJljZwnTlSp0,1228
|
|
41
|
+
mima/objects/effects/walking_on_water.py,sha256=vfs6vOlhoT2RFfPrAvEgQ7TqBnL2PwD1b4993j6p7I4,1335
|
|
42
|
+
mima/objects/world/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
+
mima/objects/world/color_gate.py,sha256=Xs6Ek2H23hpR5pLAIkl2P9hq8t4_xdciuoayB61xIaM,1948
|
|
44
|
+
mima/objects/world/color_switch.py,sha256=B-D1oVGuUuKQxuoVmTorPQXMjMmiaY8ME97tZzeJJdo,3207
|
|
45
|
+
mima/objects/world/container.py,sha256=0d3AfAuFJ07Ts3UbsyYo51sLeDKTkxHD6Z9F4pHNUIA,6001
|
|
46
|
+
mima/objects/world/floor_switch.py,sha256=_hyliGLaK-c8EFXLIXGmPS0Xpn4ZUfeApgAZC0bXS74,3358
|
|
47
|
+
mima/objects/world/gate.py,sha256=RQi8FTtgWAcNWYaIm4QULfLIXte5VoCsH90FhdWM81A,5626
|
|
48
|
+
mima/objects/world/light_source.py,sha256=mYEH7XfgltYGlPM2w_srr7X22dzsrTt30_mI4MAhGEU,3896
|
|
49
|
+
mima/objects/world/logic_gate.py,sha256=jzLyHWOEK0cwBgrc_On8R3St-pDyz6RxshGMHmnyFIY,5048
|
|
50
|
+
mima/objects/world/movable.py,sha256=ZM9Kl3zXJjXXawl3l9iluQqZHpIBbuC-dTzCABLg47Y,10944
|
|
51
|
+
mima/objects/world/oneway.py,sha256=T6iinejyvj8b1dKFRCTQiXL_ZHugO04z_bIOR0x6ozY,5423
|
|
52
|
+
mima/objects/world/pickup.py,sha256=6iA7qAD-aSFdlTuxWnPPz7nuh5OfTHOZ_FQGpkzhIOM,3058
|
|
53
|
+
mima/objects/world/switch.py,sha256=QTrMo2BRMH9tE8dwhpUJ5tclkctjbhk-siiZGKk3tWY,5559
|
|
54
|
+
mima/objects/world/teleport.py,sha256=R3ZZvx80BhKg5J_8Up_VQ6rrhzWa3urcKEP5Ja_dhm4,10336
|
|
55
|
+
mima/scripts/__init__.py,sha256=yLRT6igjwtSkOFbd0x8PXXFZVt1_xUIuCHhWhywHRuE,75
|
|
56
|
+
mima/scripts/command.py,sha256=UnbIsVtW66KajCiH9Pgkkzzu1xVwWDg157lWxTYqWFI,434
|
|
57
|
+
mima/scripts/script_processor.py,sha256=ks7_PD-KQF1azcU8GTEtC5D0Yo3alHToQLWt5GsA70k,1177
|
|
58
|
+
mima/scripts/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
|
+
mima/scripts/commands/add_quest.py,sha256=r5eCLgAarLJmtMROxLqMTryK5Bfv9wUSqsC8p0RHVkU,387
|
|
60
|
+
mima/scripts/commands/change_map.py,sha256=tQPbz-dsxR2RpIVLOZp2GQmCmpTKVjgra2lp_-Wkrac,449
|
|
61
|
+
mima/scripts/commands/close_dialog.py,sha256=-yWyEtYA41RsehJ4c-zIXhxIhR25e8GTWN20GuTnT80,207
|
|
62
|
+
mima/scripts/commands/give_item.py,sha256=HJhX5b7A3Fmqij08858UfU2kHeqwJ3bdOwVh_fO3kWU,561
|
|
63
|
+
mima/scripts/commands/give_resource.py,sha256=J9c0hk__DY4To1BStZ5qmcEOMbAYRefNJT8Kk5WyORE,1805
|
|
64
|
+
mima/scripts/commands/move_map.py,sha256=dMdw19yaB3Os6nj5cg7gcAe6PSRj9yKUW0psA25BKB8,4756
|
|
65
|
+
mima/scripts/commands/move_to.py,sha256=FE2efowCpMp5QgDBvIlGju4T0xfa9N1UwjaE2yh3v4Q,1420
|
|
66
|
+
mima/scripts/commands/oneway_move.py,sha256=1mytQxv6kiSGr_-H7m-DQPKbFKfT2T45i99Ro764vE4,1683
|
|
67
|
+
mima/scripts/commands/parallel.py,sha256=RbWVOJLRtnl_wPE8lVr5MXQScYB8CNypFtpv5_QFLT0,1489
|
|
68
|
+
mima/scripts/commands/play_sound.py,sha256=m4wqWC6O8TUsJIcYrP8bb8ZFjSNK3IpAyBdxLo-e8zo,348
|
|
69
|
+
mima/scripts/commands/present_item.py,sha256=bGwHjd9h1ApPuR0f7g55IS4-4-qibaQb0BOnmSKPs5U,1648
|
|
70
|
+
mima/scripts/commands/progress_quest.py,sha256=-Nm7basBFdnixKwf42Xrs6iDROx22WGIDHpAZ0itpGU,359
|
|
71
|
+
mima/scripts/commands/quit_game.py,sha256=BmLlh45K46Mx57j1dE2wWhmmmcb0Y-X5mLrFV1HIfhI,219
|
|
72
|
+
mima/scripts/commands/save_game.py,sha256=yhmXIpnhD89otDmltE7mucdEozHc0LfRSZCSZZO915c,392
|
|
73
|
+
mima/scripts/commands/screen_fade.py,sha256=IrRXSvDa_h_zwl9fSonY4KUlExnPIFv1VR1qnupntBw,1729
|
|
74
|
+
mima/scripts/commands/serial.py,sha256=VwKwWLrmeV9mKf0rbPkU2KZvy3dRxJ6IeSugOhQgHbw,1548
|
|
75
|
+
mima/scripts/commands/set_facing_direction.py,sha256=M_AFJQWgd0nYG7ZPq6BBOmjF4n0jcnBdvyxLboucjZk,567
|
|
76
|
+
mima/scripts/commands/set_spawn_map.py,sha256=eeWIzyuDPDIC3e_Hpyi_CuPhDnbWEXrWSNlSoqKvKZQ,434
|
|
77
|
+
mima/scripts/commands/show_choices.py,sha256=X7YJdNMPyLWykuG_CDkw9C05VG20Za68yjPXbzQXN3E,1382
|
|
78
|
+
mima/scripts/commands/show_dialog.py,sha256=EmfLMweEBjBXZyBZWSD-BMVscfJffaK31hH2bHPVZcU,278
|
|
79
|
+
mima/scripts/commands/take_coins.py,sha256=37jChQBQKFaIBx6-Bvx3xNPlqSq87pvnMtnSWQWU1iI,573
|
|
80
|
+
mima/states/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
|
+
mima/states/game_state.py,sha256=-HFshSVKdj59NnKmOkYu9TBQ6SgmAS8KIJ2fDM3KLXo,5013
|
|
82
|
+
mima/states/quest.py,sha256=SoDRIvQdt62-Rx4vcE2I9lgymlKatWqLNdi6qyFLdpA,2365
|
|
83
|
+
mima/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
|
+
mima/types/alignment.py,sha256=Oz5nhU2MXClOZyKX47A3wyajyD2HG0DWK3-41uBhnv4,89
|
|
85
|
+
mima/types/blend.py,sha256=0zhU2QjlajZDh3-tvmUCP_gMQsvr_eZPOZ9dqbk3LLU,96
|
|
86
|
+
mima/types/damage.py,sha256=8AgvwiNgcENXwc0v0VCuxxA1w45huSTQdR6S1RW4yj8,584
|
|
87
|
+
mima/types/direction.py,sha256=P7EqLZFacMjf8BmQmgNFlXutKtYxlJ6U5ha3JPyFwjI,1116
|
|
88
|
+
mima/types/gate_color.py,sha256=Mby5_s4EoTIrEZ92gKLBAG9vymF3207RK93EfqGtLuk,86
|
|
89
|
+
mima/types/graphic_state.py,sha256=6pUumsqyvPIVIJrOH4TRfgrHWDlTkNYU1g6Joc9Cx_U,308
|
|
90
|
+
mima/types/keys.py,sha256=kupW0ELZOlIk6jDF76751h_aw9RGKtlS3qmwtzEEMsY,183
|
|
91
|
+
mima/types/mode.py,sha256=rX_eKNJdon60BkUn2DUMyr9wEnsEwmJzI0kf8rPzYLk,233
|
|
92
|
+
mima/types/nature.py,sha256=4tANHg4mzN8O57B-pr0jafikCZkqB83r-pJpDG4CnAw,159
|
|
93
|
+
mima/types/object.py,sha256=D21AAm-GCtxQQM0n741T17MeQPVsVSOHQFtC84VGZoQ,377
|
|
94
|
+
mima/types/start.py,sha256=maeU5GQ9tE8q28vrA7aBGWqmi6mPW4aZTC_Qh7R_zp0,80
|
|
95
|
+
mima/types/terrain.py,sha256=vMITb4PnoEMAWc8VF-g7NeQ5453yLM93q9dcF_5RSfI,130
|
|
96
|
+
mima/types/weapon_slot.py,sha256=kX5mYKgrgn-CcJ-gUzfvTGOVoxLllPRQ92sRjWYoqCg,87
|
|
97
|
+
mima/usables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
98
|
+
mima/usables/item.py,sha256=avfN9ZNvHfE0CRUP_8ZgkuoxS31n0t2APubLT8EGXf0,883
|
|
99
|
+
mima/usables/weapon.py,sha256=U0h6AZAA3bC8QapFqPcHFZdRKiwIf07xPtgPXUn1Z90,1269
|
|
100
|
+
mima/util/__init__.py,sha256=KMuEDnRsGr32gXED12ZyL1za6iKAuk_Tn8S3mTtpYds,42
|
|
101
|
+
mima/util/colors.py,sha256=5ewsAKG-RBjXb7L0aAxwOxrbGXMUak6I5NCzo-1cYi8,1268
|
|
102
|
+
mima/util/constants.py,sha256=yBb5bamRB-hRaNZYj-tc6Q2glaALcw8R0YdZJtUDLcw,1233
|
|
103
|
+
mima/util/functions.py,sha256=QCy6Q88qVFUx1nV9DEq4uTruzJzJMee5wsnn7LrwD0g,524
|
|
104
|
+
mima/util/input_defaults.py,sha256=0UMEA4ltPCLRo5foOTSRRRMb8YucEJazw2_rqw7d-x0,759
|
|
105
|
+
mima/util/logging.py,sha256=p6-C1ozlCs_sCkmykh_B0NgZtvSkcZXXseE6qA6Zwew,1197
|
|
106
|
+
mima/util/property.py,sha256=o6dEWpIOWxwS_lf6MvYZSjkyI5Amo56P2JIDa7AMaRY,107
|
|
107
|
+
mima/util/runtime_config.py,sha256=qKx4iuTIF3NFf91q2Xlc20bOxNugS3X1QWBd8OSM7gk,3975
|
|
108
|
+
mima/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
|
+
mima/view/camera.py,sha256=cDg6Sp4XjR3uEyk3pZr5O40EXJZuf8FowhBqxeEZba0,1779
|
|
110
|
+
mima/view/scene.py,sha256=rxuiaL-z7K9G9tWnUtkgxCdyxLOPszINTvq2DIFpQlU,12118
|
|
111
|
+
mima_engine-0.1.0.dist-info/METADATA,sha256=Wde5ekM-J6FaKAX46AKHyluNbG9Rf2OBg1YNf5lF4Uc,389
|
|
112
|
+
mima_engine-0.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
113
|
+
mima_engine-0.1.0.dist-info/top_level.txt,sha256=5t1cOdQSaPQ0jWDhKDvDXwpV2XZ_a1GSSFAIvEsG0fQ,5
|
|
114
|
+
mima_engine-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mima
|