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.
|
|
@ -6,7 +6,7 @@
|
||||||
"foreground": "enemies/fg:player",
|
"foreground": "enemies/fg:player",
|
||||||
"background": "color:transparent"
|
"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": "Motion", "dx": 0, "dy": 0, "random": false},
|
||||||
{"_type": "Collision", "has": true},
|
{"_type": "Collision", "has": true},
|
||||||
{"_type": "EnemyConfig", "ai_script": "Host::actions", "ai_start_name": "Host::initial_state", "ai_goal_name": "Host::final_state"},
|
{"_type": "EnemyConfig", "ai_script": "Host::actions", "ai_start_name": "Host::initial_state", "ai_goal_name": "Host::final_state"},
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 101 KiB |
|
|
@ -67,7 +67,7 @@
|
||||||
"id": 8
|
"id": 8
|
||||||
},
|
},
|
||||||
"door_plain": {
|
"door_plain": {
|
||||||
"texture": "assets/textures/door_plain.png",
|
"texture": "assets/doors/door_plain.png",
|
||||||
"display": 1087,
|
"display": 1087,
|
||||||
"light": 0,
|
"light": 0,
|
||||||
"foreground": "tiles/fg:wall_plain",
|
"foreground": "tiles/fg:wall_plain",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"Base": {
|
"Base": {
|
||||||
"PixelWidth": 16,
|
"PixelWidth": 8,
|
||||||
"ColorDepth": 16,
|
"ColorDepth": 16,
|
||||||
"DitherType": 2,
|
"DitherType": 2,
|
||||||
"Width": 256,
|
"Width": 256,
|
||||||
|
|
@ -24,6 +24,13 @@
|
||||||
"Width": 256,
|
"Width": 256,
|
||||||
"Height": 256
|
"Height": 256
|
||||||
},
|
},
|
||||||
|
"doors/.*.png": {
|
||||||
|
"PixelWidth": 8,
|
||||||
|
"ColorDepth": 16,
|
||||||
|
"DitherType": 2,
|
||||||
|
"Width": 256,
|
||||||
|
"Height": 256
|
||||||
|
},
|
||||||
"hands/.*.png": {
|
"hands/.*.png": {
|
||||||
"PixelWidth": 6,
|
"PixelWidth": 6,
|
||||||
"ColorDepth": 16,
|
"ColorDepth": 16,
|
||||||
|
|
|
||||||
|
|
@ -77,12 +77,17 @@ PathingResult Pathing::find_path(Point &out, int direction, bool diag)
|
||||||
// get the current dijkstra number
|
// get the current dijkstra number
|
||||||
int cur = $paths[out.y][out.x];
|
int cur = $paths[out.y][out.x];
|
||||||
int target = cur;
|
int target = cur;
|
||||||
|
// BUG: can I shortcut if target == 0 now?
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
|
|
||||||
// a lambda makes it easy to capture what we have to change
|
// a lambda makes it easy to capture what we have to change
|
||||||
auto next_step = [&](size_t x, size_t y) -> bool {
|
auto next_step = [&](size_t x, size_t y) -> bool {
|
||||||
target = $paths[y][x];
|
target = $paths[y][x];
|
||||||
// don't go through walls
|
// 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;
|
if(target == WALL_PATH_LIMIT) return false;
|
||||||
|
|
||||||
int weight = cur - target;
|
int weight = cur - target;
|
||||||
|
|
@ -104,6 +109,7 @@ PathingResult Pathing::find_path(Point &out, int direction, bool diag)
|
||||||
|
|
||||||
|
|
||||||
if(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();) {
|
for(matrix::box it{$paths, out.x, out.y, 1}; it.next();) {
|
||||||
bool should_stop = next_step(it.x, it.y);
|
bool should_stop = next_step(it.x, it.y);
|
||||||
if(should_stop) break;
|
if(should_stop) break;
|
||||||
|
|
|
||||||