Brought over a bunch of code from the roguelike and now will use it to generate a random map.

This commit is contained in:
Zed A. Shaw 2025-01-30 11:38:57 -05:00
parent 8d3d3b4ec3
commit 2daa1c9bd5
59 changed files with 4303 additions and 411 deletions

View file

@ -1,5 +1,8 @@
{
"textures": [
"assets/wall_simple-256.png",
"assets/wall_with_vines-256.png",
"assets/wall_with_pillars-256.png",
"assets/wall_texture_test-256.png",
"assets/floor_tile_test-256.png",
"assets/ceiling_test-256.png",
@ -13,5 +16,15 @@
"peasant_girl": "assets/undead_peasant-256.png",
"floor": "assets/floor_tile_test-256.png",
"ceiling": "assets/ceiling_test-256.png"
},
"enemy": {
"HEARING_DISTANCE": 8
},
"player": {
},
"worldgen": {
"enemy_probability": 20,
"empty_room_probability": 10,
"device_probability": 30
}
}

47
assets/devices.json Normal file
View file

@ -0,0 +1,47 @@
{
"STAIRS_DOWN": {
"id": "STAIRS_DOWN",
"name": "Stairs Down",
"placement": "fixed",
"foreground": [24, 205, 189],
"background": [24, 205, 189],
"description": "Stairs that go down further into the dungeon.",
"inventory_count": 0,
"randomized": false,
"components": [
{"type": "Tile", "config": {"chr": "\u2ac5"}},
{"type": "Device",
"config": {"test": true}, "events": ["Events::GUI::STAIRS_DOWN"]
}
]
},
"STAIRS_UP": {
"id": "STAIRS_UP",
"name": "Stairs Up",
"foreground": [24, 205, 189],
"background": [24, 205, 189],
"description": "Stairs that go up, for the weak.",
"inventory_count": 0,
"placement": "fixed",
"components": [
{"type": "Tile", "config": {"chr": "\u2259"}},
{"type": "Device",
"config": {"test": true}, "events": ["Events::GUI::STAIRS_UP"]
}
]
},
"SPIKE_TRAP": {
"id": "SPIKE_TRAP",
"name": "Spike trap",
"foreground": [24, 205, 189],
"background": [24, 205, 189],
"description": "Spikes stab you from the floor.",
"inventory_count": 0,
"components": [
{"type": "Tile", "config": {"chr": "\u1ac7"}},
{"type": "Device",
"config": {"test": true}, "events": ["Events::GUI::TRAP"]
}
]
}
}

23
assets/enemies.json Normal file
View file

@ -0,0 +1,23 @@
{
"PLAYER_TILE": {
"foreground": [255, 200, 125],
"background": [30, 20, 75],
"components": [
{"type": "Tile", "config": {"chr": "\ua66b"}},
{"type": "Combat", "config": {"hp": 200, "damage": 15}},
{"type": "Motion", "config": {"dx": 0, "dy": 0, "random": false}},
{"type": "LightSource", "config": {"strength": 70, "radius": 2}},
{"type": "EnemyConfig", "config": {"hearing_distance": 5}}
]
},
"EVIL_EYE": {
"foreground": [75, 200, 125],
"background": [30, 20, 75],
"components": [
{"type": "Tile", "config": {"chr": "\u08ac"}},
{"type": "Combat", "config": {"hp": 100, "damage": 50}},
{"type": "Motion", "config": {"dx": 0, "dy": 0, "random": false}},
{"type": "EnemyConfig", "config": {"hearing_distance": 10}}
]
}
}

75
assets/items.json Normal file
View file

@ -0,0 +1,75 @@
{
"TORCH_BAD": {
"id": "TORCH_BAD",
"name": "Crappy Torch",
"foreground": [24, 120, 189],
"background": [230,120, 120],
"description": "A torch that barely lights the way. You wonder if it'd be better to not see the person who murders you.",
"inventory_count": 1,
"components": [
{"type": "LightSource", "config": {"strength": 70, "radius": 2.0}},
{"type": "Tile", "config": {"chr": "\u0f08"}}
]
},
"SWORD_RUSTY": {
"id": "SWORD_RUSTY",
"name": "Rusty Junk Sword",
"foreground": [24, 120, 189],
"background": [24, 120, 189],
"description": "A sword left to rot in a deep hole where it acquired a patina of dirt and tetanus. You aren't sure if it's more deadly for you to hold it or for the people you stab with it.",
"inventory_count": 1,
"components": [
{"type": "Weapon", "config": {"damage": 15}},
{"type": "Tile", "config": {"chr": "\u1e37"}}
]
},
"SWORD_LIGHT_AND_FLAME": {
"id": "SWORD_LIGHT_AND_FLAME",
"name": "Sword of Light and Flame",
"foreground": [24, 205, 210],
"background": [24, 205, 210],
"description": "A sword so powerful, a great man from the Land of The Rising Sun thrust it into the ocean of Nerf to chill its effects.",
"inventory_count": 1,
"components": [
{"type": "LightSource", "config": {"strength": 70, "radius": 1.8}},
{"type": "Tile", "config": {"chr": "\u0236"}},
{"type": "Weapon", "config": {"damage": 30}}
]
},
"CHEST_SMALL": {
"id": "CHEST_SMALL",
"name": "Small Chest",
"foreground": [150, 100, 189],
"background": [150, 100, 189],
"description": "A small chest of gold. You wonder who would leave something like this around.",
"components": [
{"type": "Tile", "config": {"chr": "\uaaea"}},
{"type": "Loot", "config": {"amount": 10}}
],
"inventory_count": 1
},
"WALL_TORCH": {
"id": "WALL_TORCH",
"name": "Basic Wall Torch",
"foreground": [24, 205, 210],
"background": [24, 205, 210],
"description": "A torch on a wall you can't pick up.",
"inventory_count": 0,
"components": [
{"type": "Tile", "config": {"chr": "\u077e"}},
{"type": "LightSource", "config": {"strength": 60, "radius": 1.8}}
]
},
"POTION_HEALING_SMALL": {
"id": "POTION_HEALING_SMALL",
"name": "Small Healing Potion",
"foreground": [255, 205, 189],
"background": [255, 205, 189],
"description": "A small healing potion.",
"inventory_count": 1,
"components": [
{"type": "Tile", "config": {"chr": "\u03eb"}},
{"type": "Curative", "config": {"hp": 20}}
]
}
}

20
assets/tiles.json Normal file
View file

@ -0,0 +1,20 @@
{
"WALL_TILE": {
"foreground": [230, 20, 30],
"background": [230, 20, 120],
"collision": true,
"display": "\ua5b8"
},
"FLOOR_TILE": {
"foreground": [40, 15, 125],
"background": [200, 15, 75],
"collision": false,
"display":"\u289e"
},
"CEILING_TILE": {
"foreground": [159, 164, 15],
"background": [199, 15, 79],
"collision": true,
"display":"\u2274"
}
}

BIN
assets/wall_simple-256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB