Entropie git · main
Entropie festival game; first steps
C 88.5% Markdown 9.1% GLSL 2.3%git clone https://git.christianimmanuel.de/games/Entropie.gitwget https://git.christianimmanuel.de/games/Entropie/archive/Entropie.tar.gzentropie 1.67.0: pour your drink on the fire (C)
- Right at a burning fire with a drink in hand, C pours it on: a small fire goes out, a big one hisses, vodka flares up; a hint shows there Includes 1.66.0 (if not committed separately): - Careful people sort the woodpile by length (front even) and put the branches lying about onto a heap at the end of the woodpile Includes 1.65.0 (if not committed separately): - Smooth off the ladder (a step back, one foot after the other) and taking it down (the hand reaches for the rail at chest height) Includes 1.64.0 (if not committed separately): - Smooth ladder and climbs: getting on, over the edge at the top, feet from where they are; the easy 1 m climb no longer drops you off again Includes 1.63.0 (if not committed separately): - The hose melts in the fire (leaks, burns through); duct tape and the shears mend it Includes 1.62.0 (if not committed separately): - Smooth pull-ups: no hop at the end, feet and knees ease over the edge, elbows and hands taking hold blend in (audit walk: joint jumps 161 -> 58) Includes 1.61.0 (if not committed separately): - A step ladder in the tool room: stands on its own, at a wall with its back to it; climb onto the wall from its top Includes 1.60.0 (if not committed separately): - A folding ladder (two 2.5 m halves on a hinge, 5 m open) beside the telescopic one; one click at a wall unfolds it and leans it there Includes 1.59.0 (if not committed separately): - Stepping up onto blocks above knee high; set moves and jumps only for things standing on the ground in front of you Includes 1.58.0 (if not committed separately): - Walking over knee-high things is one smooth set move that always finishes; at a run: jump up onto blocks, catch climbable edges
entropie/Makefile | 2 +- entropie/README.md | 4 +++- entropie/STATE.md | 7 +++---- entropie/commit_message.txt | 12 +++++++----- entropie/src/game/game_actions.c | 23 +++++++++++++++++++++-- entropie/src/world/camp.c | 18 ++++++++++++++++++ entropie/src/world/camp.h | 5 +++++ 7 files changed, 58 insertions(+), 13 deletions(-) diff --git a/entropie/Makefile b/entropie/Makefile index dc13424..5193ed8 100644 --- a/entropie/Makefile +++ b/entropie/Makefile @@ -1,5 +1,5 @@ APP := entropie -VERSION := 1.66.0 +VERSION := 1.67.0 PREFIX ?= /usr BINDIR ?= $(PREFIX)/bin diff --git a/entropie/README.md b/entropie/README.md index bc7c611..cb2def2 100644 --- a/entropie/README.md +++ b/entropie/README.md @@ -71,6 +71,8 @@ and satellite pictures (about 340 x 340 m). (charcoal: hardly worth eating) - The wood chars, glows and shrinks as it burns down, and the fire lights up the yard at night - More wood makes a bigger fire, and a bigger fire takes more water to put out +- Right at a burning fire with a drink in hand, C pours it on: a small fire + goes out, a big one just hisses, vodka flares up - Walk into the fire and you catch fire: C to drop and roll (down fast, stretched out, rolling side to side), or pour a drink over yourself (left click). Others run, then drop and roll; a drink, water or pee puts them out too @@ -453,7 +455,7 @@ say no more often and don't come to you for a bit. | Left click on the fire, hand free | Take food off the grill | | P | Pee (next to the toilet: use it); Shift: further, mouse: aim | | Z | Sleep / get up | -| C | Sit down / get up; on fire: drop and roll | +| C | Sit down / get up; on fire: drop and roll; at a fire with a drink: pour it on | | Space (asleep, hold) | Sleep faster | | G | One more person helps you | | H | Everybody stops helping | diff --git a/entropie/STATE.md b/entropie/STATE.md index f25095c..2f0ab4c 100644 --- a/entropie/STATE.md +++ b/entropie/STATE.md @@ -93,6 +93,8 @@ Talk topics: offer, ask, suggest, where (new woodpile spot), ask for a hand, ask Ladder: one click at a wall slides it out to fit (top on the edge, 0.9 m over it; up to its 6 m) and leans it; slid out by hand, it keeps that length. Putting it up is a 1.1 s animation (`ladder.c`, putUp): stood upright, slid out, tipped onto the wall; you stand still with both hands on it (`game.c`, puttingUp); it can only be climbed or taken once it leans. +Drink on the fire (`camp.c` Camp_pourOnFire, C right at a burning fire with a bottle): 0.1 l a sip left goes on as water (beer, water); enough for the fire (Camp_waterNeeded: 0.2 l + 0.25 l per kg) puts it out, else it hisses; vodka flares (the water on it is gone). Hint shows when you stand there with a drink. + Hose and fire (`hose.c`): each node of the rope has melt (0..1), heat and taped. Near a burning fireplace (within its flames: (0.25 diameter + 0.1) x flame size + 0.15 m, below about 1 m over it) it heats up and melts (15 s right in the flames to burn through); melted past 0.35 it leaks (12 % + more the worse it is; up to 90 % lost; it squirts onto the ground there); at 1 it's burned through: the rope comes apart there (no constraint, not drawn), nothing comes out at the nozzle, the water runs out at the break, and the end you hold is loose (no reach limit). Drawn darker the more melted, glowing while hot. Duct tape (OBJ_TAPE, on the workbench) clicked at a melted bit tapes it (grey band; no leak); burned through it won't hold. Shears clicked there cut out the run of melted bits and join the ends: the rope is laid out again along what's left (`length` shorter, at least 3 m). Too hot: "pull it out of the fire first". `world.c` water: flow scales the water and the arc. Folding ladder (`variant` LADDER_FOLDING, 9.8 kg so it carries one-handed): two 2.5 m sections on a hinge (`shapes_props.c`, Shapes_foldLadder: the upper section swings round the hinge by `extend`). It is either folded (2.5 m) or open (5 m, 18 rungs); leaning at a wall it always opens fully, the putUp animation swings the upper half up. `ladder.c` lengthFor / rung / rungCount pick per type. @@ -150,9 +152,6 @@ Most important first. - Peeing properly: open the fly; women crouch and pull down / lift the skirt or dress; Urinella (some don't like it; mishaps; tidy, careless or high disposal) - Clothing (trousers, skirt, dress, fly) – needed for the above -**Things** -- Put a fire out with your drink (C) - **Tools for us** - Optional local AI (llama.cpp, small model) for talking and tasks; the menu stays as fallback @@ -161,4 +160,4 @@ Most important first. - The walking map rebuild takes ~9 ms when fixed things change (a felled tree) --- -State of `entropie 1.66.0 (build 2a3c0b1)` +State of `entropie 1.67.0 (build e686fb3)` diff --git a/entropie/commit_message.txt b/entropie/commit_message.txt index 49993a3..c685ebd 100644 --- a/entropie/commit_message.txt +++ b/entropie/commit_message.txt @@ -1,9 +1,11 @@ -entropie 1.66.0: careful people sort the woodpile and tidy the branches +entropie 1.67.0: pour your drink on the fire (C) -- Careful stackers sort the firewood by length (long at one end, short - at the other) and line up the front of the pile -- Careful workers put the branches and twigs lying about onto a heap at - the end of the woodpile once the firewood is stacked +- Right at a burning fire with a drink in hand, C pours it on: a small + fire goes out, a big one hisses, vodka flares up; a hint shows there + +Includes 1.66.0 (if not committed separately): +- Careful people sort the woodpile by length (front even) and put the + branches lying about onto a heap at the end of the woodpile Includes 1.65.0 (if not committed separately): - Smooth off the ladder (a step back, one foot after the other) and diff --git a/entropie/src/game/game_actions.c b/entropie/src/game/game_actions.c index a2221b7..5da9518 100644 --- a/entropie/src/game/game_actions.c +++ b/entropie/src/game/game_actions.c @@ -639,7 +639,7 @@ static int useWater(Game *game) { const char *Game_hint(Game *game) { const Object *shown = follower(game, SHOW_PLACE), *watcher = follower(game, SHOW_HOW), *ladder, *food; - Object *fire; + Object *fire = NULL; bool at_top; if (game->player->on_fire > 0.0f) snprintf(game->hint, sizeof(game->hint), "On fire! C: drop and roll - left click: pour your drink over you - water or pee puts it out"); @@ -652,7 +652,10 @@ const char *Game_hint(Game *game) { char what[96]; Object_describe(food, what, sizeof what); snprintf(game->hint, sizeof(game->hint), "On the grill: %s - left click (free hand): take it off", what); - } else if (!game->player->on_ladder && !game->player->climbing && (ladder = Ladder_near(&game->world, game->player, &at_top))) + } else if (fire && fire->burning && Hands_bottleHand(game->player) >= 0 && + game->player->hands.item[Hands_bottleHand(game->player)]->sips > 0) + snprintf(game->hint, sizeof(game->hint), "The fire - C: pour your drink on it"); + else if (!game->player->on_ladder && !game->player->climbing && (ladder = Ladder_near(&game->world, game->player, &at_top))) snprintf(game->hint, sizeof(game->hint), at_top ? "Ladder: left click to climb down" : "Ladder: left click to climb - E / Q or right click: take it down"); else @@ -671,6 +674,21 @@ static bool douse(Game *game, Object *person) { return true; } +/* C right at a burning fire with a drink in hand: pour it on. */ +static bool pourOnFire(Game *game) { + Object *p = game->player; + Object *fire = Camp_inFront(p, game->world.objects, game->world.count, OBJ_FIREPLACE); + int hand = Hands_bottleHand(p); + if (!fire || !fire->burning || hand < 0) return false; + switch (Camp_pourOnFire(fire, p->hands.item[hand])) { + case POURED_OUT: say(game, "Pssshhh - you pour your drink on it and the fire goes out"); break; + case POURED_HISS: say(game, "It hisses and smokes - a drink isn't enough for a fire this big"); break; + case POURED_FLARE: say(game, "WHOOSH! The vodka flares up - that didn't help"); break; + default: return false; + } + return true; +} + /* The fireplace in front: wood in, or light it. True if it took the click. */ static bool tendFire(Game *game) { Object *p = game->player; @@ -894,6 +912,7 @@ void game_handleActions(Game *game, const Input *input) { if (input->sleep) sleepOrWake(game); /* C: sit down (squat), e.g. by the fire; walking or jumping gets you up */ if (input->sit && p->on_fire > 0.0f && !p->on_ladder) Body_dropAndRoll(&p->body, Object_facing(p)); /* drop and roll */ + else if (input->sit && pourOnFire(game)) {} /* (right at a burning fire with a drink: onto it) */ else if (input->sit && !Body_isBusy(&p->body) && !p->on_ladder) { if (p->sitting) p->sitting = false; else Object_sit(p, Object_seatNear(game->world.objects, game->world.count, p->position, 1.0f), p->position); diff --git a/entropie/src/world/camp.c b/entropie/src/world/camp.c index c9e8501..86498b5 100644 --- a/entropie/src/world/camp.c +++ b/entropie/src/world/camp.c @@ -257,6 +257,24 @@ Object *Camp_takeOff(Object *who, Object *fire, Object *const *objects, int coun return Hands_receive(who, hand, best) ? best : NULL; } +#define LITERS_PER_SIP 0.1f /* (a beer: half a liter) */ + +int Camp_pourOnFire(Object *fire, Object *bottle) { + if (!fire || !fire->burning || !bottle || !Object_isBottle(bottle) || bottle->sips <= 0 || bottle->broken) return POURED_NOTHING; + float liters = LITERS_PER_SIP * (float)bottle->sips; + bottle->sips = 0; + if (bottle->type == OBJ_VODKA) { /* whoosh */ + fire->water = 0.0f; + return POURED_FLARE; + } + fire->water += liters; + if (fire->water < Camp_waterNeeded(fire)) return POURED_HISS; + fire->burning = false; + fire->water = 0.0f; + camp_doused = true; + return POURED_OUT; +} + bool Camp_douse(Object *target, Object *bottle) { if (!bottle || !Object_isBottle(bottle) || bottle->sips <= 0 || bottle->broken || target->on_fire <= 0.0f) return false; bottle->sips = 0; diff --git a/entropie/src/world/camp.h b/entropie/src/world/camp.h index 7317fca..a8fa732 100644 --- a/entropie/src/world/camp.h +++ b/entropie/src/world/camp.h @@ -51,6 +51,11 @@ Object *Camp_onGrill(Object *const *objects, int count, const Object *fire); /* Takes that off the grill into a free hand; NULL if nothing there (or no free hand). */ Object *Camp_takeOff(Object *who, Object *fire, Object *const *objects, int count); +enum { POURED_NOTHING, POURED_HISS, POURED_OUT, POURED_FLARE }; +/* Pours what's left in the bottle onto a burning fire: water or beer helps + (a small fire goes out), vodka flares up. */ +int Camp_pourOnFire(Object *fire, Object *bottle); + /* Pours a drink over someone burning (bottle empties). False if no drink or not burning. */ bool Camp_douse(Object *target, Object *bottle);