Add Mice! game and associated tools

- Created gameinfo.xml for the Mice! game, detailing its description, release date, developer, and genre.
- Added mice.sh script to activate the conda environment and run the game.
- Implemented colorize_assets.py as a placeholder for future asset colorization functionality.
- Developed convert_audio.py to convert audio files to 8-bit unsigned format at 22100 Hz.
- Introduced maze.py for generating mazes using Depth First Search (DFS) with a graphical interface.
- Created resize_assets.py to resize PNG assets to 18x18 pixels and center them on a 20x20 canvas.
This commit is contained in:
2025-08-18 00:20:40 +02:00
parent 8a32aad877
commit 3bd2d9269f
10 changed files with 33 additions and 11 deletions
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Executable
+14
View File
@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<gameList>
<game>
<path>./mice.sh</path>
<name>Mice!</name>
<desc>Mice! is a strategic singleplayer game where you place bombs and mines to exterminate rats before they reproduce out of control. It features randomly generated mazes (DFS), sprite-based graphics, and sound effects. Inspired by the classic Rats! for Windows 95, this version is written in Python and uses a lightweight custom engine with SDLstyle rendering.</desc>
<releasedate>20250818T000000</releasedate>
<developer>Matteo Benedetto</developer>
<publisher>Self-published</publisher>
<genre>Strategy, Puzzle, Action</genre>
<players>1</players>
<image>./cover.png</image>
</game>
</gameList>
Executable
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
eval "$(/home/ark/miniconda3/bin/conda shell.bash hook)"
conda activate myenv
cd /roms/ports/mice/
#git pull
python rats.py
sleep 3
+12 -11
View File
@@ -38,6 +38,17 @@ class MiceMaze(
self.start_game()
self.background_texture = None
self.configs = self.get_config()
def get_config(self):
configs = {}
for file in os.listdir("conf"):
if file.endswith(".json"):
with open(os.path.join("conf", file)) as f:
configs[file[:-5]] = json.load(f)
return configs
def start_game(self):
self.ammo = {
"bomb": {
"count": 2,
@@ -52,16 +63,6 @@ class MiceMaze(
"max": 5
}
}
def get_config(self):
configs = {}
for file in os.listdir("conf"):
if file.endswith(".json"):
with open(os.path.join("conf", file)) as f:
configs[file[:-5]] = json.load(f)
return configs
def start_game(self):
self.blood_stains = {}
self.background_texture = None
for _ in range(5):
@@ -140,7 +141,7 @@ class MiceMaze(
if __name__ == "__main__":
print("Game starting...")
solver = MiceMaze('maze.json')
solver.run()
BIN
View File
Binary file not shown.
View File