Doors are placed and you can walk through them, also fixed the way the jankifier renders so that it uses a consistent bit depth for all the textures.

This commit is contained in:
Zed A. Shaw 2026-03-16 23:53:06 -04:00
parent 0add3b29ae
commit 4c11829580
30 changed files with 16 additions and 3 deletions

View file

@ -6,7 +6,7 @@
"foreground": "enemies/fg:player",
"background": "color:transparent"
},
{"_type": "Combat", "hp": 200, "max_hp": 200, "ap": 0, "max_ap": 12, "ap_delta": 6, "damage": 10, "dead": false},
{"_type": "Combat", "hp": 200, "max_hp": 200, "ap": 0, "max_ap": 12, "ap_delta": 6, "damage": 50, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "Collision", "has": true},
{"_type": "EnemyConfig", "ai_script": "Host::actions", "ai_start_name": "Host::initial_state", "ai_goal_name": "Host::final_state"},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 158 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Before After
Before After

View file

@ -67,7 +67,7 @@
"id": 8
},
"door_plain": {
"texture": "assets/textures/door_plain.png",
"texture": "assets/doors/door_plain.png",
"display": 1087,
"light": 0,
"foreground": "tiles/fg:wall_plain",

View file

@ -1,6 +1,6 @@
{
"Base": {
"PixelWidth": 16,
"PixelWidth": 8,
"ColorDepth": 16,
"DitherType": 2,
"Width": 256,
@ -24,6 +24,13 @@
"Width": 256,
"Height": 256
},
"doors/.*.png": {
"PixelWidth": 8,
"ColorDepth": 16,
"DitherType": 2,
"Width": 256,
"Height": 256
},
"hands/.*.png": {
"PixelWidth": 6,
"ColorDepth": 16,

View file

@ -77,12 +77,17 @@ PathingResult Pathing::find_path(Point &out, int direction, bool diag)
// get the current dijkstra number
int cur = $paths[out.y][out.x];
int target = cur;
// BUG: can I shortcut if target == 0 now?
bool found = false;
// a lambda makes it easy to capture what we have to change
auto next_step = [&](size_t x, size_t y) -> bool {
target = $paths[y][x];
// don't go through walls
// BUG: should actually do a collision check
// BUG: can I shortcut if target == 0 now?
if(target == WALL_PATH_LIMIT) return false;
int weight = cur - target;
@ -104,6 +109,7 @@ PathingResult Pathing::find_path(Point &out, int direction, bool diag)
if(diag) {
// BUG: maybe a special alternative to box that doesn't do the central cell?
for(matrix::box it{$paths, out.x, out.y, 1}; it.next();) {
bool should_stop = next_step(it.x, it.y);
if(should_stop) break;