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:
Executable
+14
@@ -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 single‑player 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 SDL‑style 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>
|
||||||
@@ -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
|
||||||
@@ -38,6 +38,17 @@ class MiceMaze(
|
|||||||
self.start_game()
|
self.start_game()
|
||||||
self.background_texture = None
|
self.background_texture = None
|
||||||
self.configs = self.get_config()
|
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 = {
|
self.ammo = {
|
||||||
"bomb": {
|
"bomb": {
|
||||||
"count": 2,
|
"count": 2,
|
||||||
@@ -52,16 +63,6 @@ class MiceMaze(
|
|||||||
"max": 5
|
"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.blood_stains = {}
|
||||||
self.background_texture = None
|
self.background_texture = None
|
||||||
for _ in range(5):
|
for _ in range(5):
|
||||||
@@ -140,7 +141,7 @@ class MiceMaze(
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
print("Game starting...")
|
||||||
solver = MiceMaze('maze.json')
|
solver = MiceMaze('maze.json')
|
||||||
solver.run()
|
solver.run()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user