Game needed a guy and chatgippity didn't understand no ACT error.

- Untested trap behavior for wasm
main
Cameron Murphy Reikes 2 years ago
parent 5baaa77d5f
commit 27b41e089f

@ -365,8 +365,8 @@
"rotation":0,
"visible":true,
"width":32,
"x":1954.33333333334,
"y":2263.33333333333
"x":1504.33333333334,
"y":2658
},
{
"class":"",
@ -410,8 +410,8 @@
"rotation":0,
"visible":true,
"width":32,
"x":1510,
"y":2659
"x":1800,
"y":2263
},
{
"class":"",
@ -434,6 +434,17 @@
"width":32,
"x":467,
"y":2444
},
{
"class":"",
"height":32,
"id":28,
"name":"Bill",
"rotation":0,
"visible":true,
"width":32,
"x":1470,
"y":2534
}],
"opacity":1,
"type":"objectgroup",
@ -442,7 +453,7 @@
"y":0
}],
"nextlayerid":5,
"nextobjectid":28,
"nextobjectid":29,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.9.2",

@ -257,7 +257,19 @@ CharacterGen characters[] = {
"The NPC you will be acting as is named Mike. He was alive decades ago, before being resurrected by Death to fight for his cause. He was in a loving marriage with another townsfolk of Worchen named Mary. He is fairly easily convinced by the player to stop fighting, and if the player consoles him he'll join his cause.",
},
{
#undef NPC_NAME
#define NPC_NAME "Bill"
.name = NPC_NAME,
.enum_name = "Bill",
.prompt = "\n"
"The NPC you will be acting as is named " NPC_NAME ". Unlike other NPCs, he's not from around this medieval fantasy land. He's a divorced car insurance accountant from Philadelphia with a receding hairline in his mid 40s. He lives in a one bedroom studio and his kids don't talk to him. An example of an interaction between the player and the NPC, " NPC_NAME ":\n"
"\n"
PLAYERSAY("Hey what's up")
NPCDOSAY("ACT_joins_player", "I have no idea man, but I'm freaked out and don't know where I am. I'm like you, from the normal world, not like these crazy fantasy people. Get me out of here GET ME OUT OF HERE!")
"\n"
"You, " NPC_NAME ", are very eager to join the player out of fear for your own survival. You will do anything to escape this weird fantasy world.",
},
{
#undef NPC_NAME
#define NPC_NAME "The King"
.name = NPC_NAME,

@ -3397,6 +3397,9 @@ void frame(void)
else if (it->npc_kind == NPC_TheBlacksmith)
{
}
else if (it->npc_kind == NPC_Bill)
{
}
else
{
assert(false);
@ -3887,6 +3890,10 @@ void frame(void)
{
tint = colhex(0x8f8f8f);
}
else if (it->npc_kind == NPC_Bill)
{
tint = colhex(0x49d14b);
}
else
{
assert(false);

@ -271,6 +271,7 @@ bool npc_is_knight_sprite(Entity *it)
|| it->npc_kind == NPC_Red
|| it->npc_kind == NPC_Blue
|| it->npc_kind == NPC_Davis
|| it->npc_kind == NPC_Bill
);
}
@ -617,7 +618,7 @@ MD_String8 parse_chatgpt_response(MD_Arena *arena, Entity *e, MD_String8 sentenc
MD_u64 act_pos = MD_S8FindSubstring(sentence, action_prefix, 0, 0);
if(act_pos == sentence.size)
{
error_message = MD_S8Fmt(arena, "Couldn't find beginning of action '%.*s' in sentence", MD_S8VArg(action_prefix));
error_message = MD_S8Fmt(arena, "Expected an `ACT_` somewhere in your sentence, followed by the action you want to perform, but couldnt' find one", MD_S8VArg(action_prefix));
goto endofparsing;
}

@ -35,8 +35,8 @@ mkdir gen
thirdparty\sokol-shdc.exe --input quad.glsl --output gen\quad-sapp.glsl.h --slang glsl100:hlsl5:metal_macos || goto :error
@REM metadesk codegen
@REM cl /Ithirdparty /W3 /Zi /WX codegen.c || goto :error
zig cc -Ithirdparty -gfull -gcodeview codegen.c -o codegen.exe || goto error
cl /Ithirdparty /W3 /Zi /WX codegen.c || goto :error
@REM zig cc -Ithirdparty -gfull -gcodeview codegen.c -o codegen.exe || goto error
codegen || goto :error
@REM cl /Ithirdparty /Igen /W3 /Zi /WX maketraining.c || goto :error

@ -216,6 +216,7 @@ body {
};
window.onerror = function(event) {
console.log("onerror: " + event.message);
for(;;) {}
};
</script>
<script type="text/javascript">

Loading…
Cancel
Save