From 0b294b1db4b40d1f90c875367a05a5291668cb30 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Wed, 19 Apr 2023 20:03:16 -0700 Subject: [PATCH] Rearrange A* tuning defines --- assets/newsmalllevel.json | 114 +++++++++++++++++++++++++------------- makeprompt.h | 6 +- 2 files changed, 80 insertions(+), 40 deletions(-) diff --git a/assets/newsmalllevel.json b/assets/newsmalllevel.json index e409a7d..dbdae2e 100644 --- a/assets/newsmalllevel.json +++ b/assets/newsmalllevel.json @@ -1,64 +1,85 @@ { "compressionlevel":-1, - "height":9, + "height":16, "infinite":false, "layers":[ { - "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1], - "height":9, + "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + "height":16, "id":1, "name":"Base", "opacity":1, "type":"tilelayer", "visible":true, - "width":9, + "width":16, "x":0, "y":0 }, { - "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0], - "height":9, + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":16, "id":3, "name":"Detail", "opacity":1, "type":"tilelayer", "visible":true, - "width":9, + "width":16, "x":0, "y":0 }, { - "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 60, 60, 60, 60, 60, 60, 0, - 60, 0, 0, 60, 0, 0, 0, 0, 0, - 60, 0, 0, 60, 0, 0, 0, 0, 0, - 0, 0, 0, 60, 60, 0, 0, 0, 0, - 0, 0, 0, 60, 60, 60, 60, 60, 60, - 0, 0, 60, 60, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 60, 60, 60, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0], - "height":9, + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 60, 60, 60, 60, 60, 60, 0, 0, 0, 60, 60, 0, 0, 0, + 60, 0, 0, 60, 0, 0, 0, 0, 0, 0, 60, 60, 60, 60, 60, 0, + 60, 0, 0, 60, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 60, 0, + 0, 0, 0, 60, 60, 0, 0, 0, 0, 0, 60, 0, 0, 60, 60, 0, + 0, 0, 0, 60, 60, 60, 60, 60, 60, 0, 60, 0, 0, 60, 0, 0, + 0, 0, 60, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, + 0, 0, 0, 0, 60, 60, 60, 0, 60, 60, 0, 0, 0, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 60, 0, 0, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 60, 60, 0, 0, 0, + 0, 60, 60, 60, 60, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 60, 60, 0, + 0, 60, 60, 0, 0, 60, 60, 60, 60, 60, 0, 0, 0, 60, 60, 0, + 0, 0, 60, 60, 60, 60, 0, 0, 0, 60, 60, 60, 60, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":16, "id":4, "name":"Collideable", "opacity":0.9, "type":"tilelayer", "visible":true, - "width":9, + "width":16, "x":0, "y":0 }, @@ -92,8 +113,25 @@ "rotation":0, "visible":true, "width":32, - "x":233.333333333333, - "y":82 + "x":240, + "y":106 + }, + { + "class":"", + "height":32, + "id":18, + "name":"OldMan", + "properties":[ + { + "name":"standing", + "type":"string", + "value":"STANDING_JOINED" + }], + "rotation":0, + "visible":true, + "width":32, + "x":236, + "y":472 }], "opacity":1, "type":"objectgroup", @@ -102,7 +140,7 @@ "y":0 }], "nextlayerid":5, - "nextobjectid":18, + "nextobjectid":19, "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.9.2", @@ -115,5 +153,5 @@ "tilewidth":32, "type":"map", "version":"1.9", - "width":9 + "width":16 } \ No newline at end of file diff --git a/makeprompt.h b/makeprompt.h index 538a76a..1b8de06 100644 --- a/makeprompt.h +++ b/makeprompt.h @@ -29,6 +29,10 @@ typedef BUFF(char, MAX_SENTENCE_LENGTH) Sentence; #define DAMAGE_SWORD 0.2f #define DAMAGE_BULLET 0.2f +// A* tuning +#define MAX_ASTAR_NODES 1024 +#define TIME_BETWEEN_PATH_GENS (0.5f) + // Never expected such a stupid stuff from such a great director. If there is 0 stari can give that or -200 to this movie. Its worst to see and unnecessary loss of money typedef BUFF(char, 1024*10) Escaped; @@ -149,9 +153,7 @@ typedef struct float alive_for; } PlayerAfterImage; -#define MAX_ASTAR_NODES 1024 typedef BUFF(Vec2, MAX_ASTAR_NODES) AStarPath; -#define TIME_BETWEEN_PATH_GENS (0.5f) typedef struct {