Watch
1
0
Fork
You've already forked HBO-ICT_startsemester_ranger-among-critters
0
Project startsemester
  • Gleam 72.2%
  • TypeScript 8.8%
  • CSS 7%
  • Just 5%
  • Nix 3.5%
  • Other 3.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-13 13:49:02 +01:00
.forgejo/workflows gleam new 'critter-core' 2025-10-11 09:13:43 +02:00
critter-core Alleen to_arrow naar direction verplaatst. 2026-03-13 13:49:02 +01:00
tauri-ranger Alleen to_arrow naar direction verplaatst. 2026-03-13 13:49:02 +01:00
.envrc Create .envrc 2026-02-23 11:25:14 +01:00
.gitignore Create .envrc 2026-02-23 11:25:14 +01:00
flake.lock Switch to Nix and Just 2026-02-11 12:53:46 +01:00
flake.nix Create a browser-based dev mode to avoid tauri popping up everytime, add tailwindcss 2026-02-11 13:46:19 +01:00
Justfile Create a UI around it. 2026-02-11 16:37:04 +01:00
README.md Update README.md 2026-03-02 20:00:19 +01:00

ranger-among-critters

A game to be.

Game concept

You'll be a ranger among Critters.

  1. You can befriend them

  2. solve their problems

    and

  3. help them out.

    ...or...

  4. You can also fight them, and have other Critters help you out!

I like the older pokemon games, especially "Ranger: Guardian Signs" and "Trainer: Black/White". Getting that hit nostalgia is one of my main goals. Maybe the name confuses, but there are no stylers here, a battler or ranger befriends Critters using words and reason (a single button click) after a tiresome (or not!) battle.

Storyline

Prologue

In the past, people and Critters of Geola used to work and live together lovingly. Until an unknown moment in history, when the normally entirely harmless creatures started attacking each other and humans! There were some exceptions, people who seemed to radiate a calming sense towards the Critters. Some of these people, trying to restore or at least keep history intact, started bonding with Critters in an attempt to stop the alienation between Critters and humans, and between Critters and each other, they named themselves "Critter Rangers".

Then, about 100 years ago, there was talk of a 'space problem', where the government of Geola decided to start attempts to erradicate all Critters to ensure safety, and living space. Scientists and rangers have worked together since, and created a natural sollution.

They observed in other biomes that with enough encridium-proteins, Critters can turn themselves into a stone-like tablet. Ever since, they've evaporated encridium into the air, enabling rangers to slowly capture encridiumised Critters. They also found out, if a Critter trusts it's capturer, it'll hand the capturer an 'awakening leaf', a leaf-like cloth which can be rubbed against the Critter to restore it from stone-like form, but only works on the Critter that gave it to you. Rangers carry Critter boxes to store the Critters and their corresponding awakening leaf.

For a great while, this ensured a peaceful life, but with more and more people, once in a while a Critter goes rampant through cities or populated area's.

These rampages have strangely started getting worse in the past decade...

Start

You (player), Clara (she/her) and Zepp (they/them), pick a Critter and join the intern-ranger Zembla (he/him), who is hoping to take over from his father, Ragnor (he/him). Ragnor is supposed to guide the 3 of them but when he joins them, a news reporter runs Clara and Zepp over, asking if he knows what has just happened.

Going outside, the air is yellowish. And everywhere that yellow colour shines, Critters are forcibly awakened from their stone form. Some of them even turning into scarier forms previously unknown. The rangers' Critters

Zembla seems to notice a source of the yellow radiation, coming from just next to a big mountain. While Ragnor tries to battle and calm many Critters at the same time, Zembla takes lead and the three interns decide to follow the source.

The yellow radiation seems to come in pulses, sometimes allowing Critters to go back into their Critter box and for the player to capture new ones, but during yellow pulses, some Critters also calm down after battle and join temporarily or ask for help.

When arrived at the site, the source seems gone, Zepp notes that he might have seen it fly off. Clara wishes he'd said that earlier. What they do find is a gigantic stage, with millions of camera's aimed at a mysterious person named Liam (he/him).

Liam claims that he wants to see purity. He does not want to see a world of humans, animals and Critters... He wants the world to either belong to humans and animals, or for Critters to kill everything. He also notes that once the second option has been achieved, the Critters will calm down and go back to their peaceful selves.

Clara screams that without rangers, Critters would have been extinct, either by humans or by fellow Critters. Liam just smiles, turns the microphone away, and whispers that that has been a trial by his organisation.

Zembla wants to climb up the stage to capture Liam for questioning, but falls instead, and Liam dissapears, after which the stage falls off the cliff and creates a huge schockwave.

TODO: More storyline to be written out.

Technical Details

Using Gleam's immutable data structures and a pure MVU architecture, we implement two frontends:

  1. A web/tauri frontend using Lustre.
  2. A CLI frontend.

These share the same 'core' module, which contains the game logic and data structures. This very pure 'Doubled' MVU architecture implementation essentially means that the game logic and data structures are shared between the two frontends, allowing for a consistent experience across both platforms.

graph TD
    %% Nodes
    Init((Initialisation))
    Runtime{Lustre<br/>runtime}
    Update[Update]
    View((View))
    OutsideAction(Outside action)
    Interaction((Interaction))
    Core{Critter-core<br/>/<br/>Game logic}

    %% Hoofd Flow (Zwart)
    Init -->|Start Model| Runtime
    Runtime -->|Message| Update
    Update -->|New model| Runtime
    Runtime -->|Model| View
    View -->|Message| Runtime
    Interaction -->|Event -> Message| View

    %% Side-effects & Outside action
    Update -->|Side-effect| OutsideAction
    OutsideAction -.->|possible message| Update

    %% Critter-core Connecties
    Update -->|Message| Core
    Update -->|Model| Core
    Core -->|Residual message| Update
    Core -->|Altered model| Update

    %% Initialisatie Paden (Groen/Gestrept)
    OutsideAction -.->|Initialisation from existing data| Init
    Core -.->|Initialisation by residual messages| OutsideAction

    %% Styling
    style Runtime fill:#fff,stroke:#333,stroke-width:1px
    style Update rx:10,ry:10,fill:#fff,stroke:#333,stroke-width:1px
    style View fill:#fff,stroke:#333,stroke-width:1px
    style Core fill:#fff,stroke:#333,stroke-width:1px
    
    %% Kleuren voor de specifieke lijnen
    linkStyle 9,10 stroke:#2e7d32,stroke-width:2px,stroke-dasharray: 5 5

Example of the Lustre/Tauri frontend.

Defending choices made

Usage of the relatively young 'tauri' Gleam package...

...instead of the older, better documented 'lustre_tauri' package.

One: Dependency resolution. The old package is stuck on Lustre 4 and the old decoder API. I am not willing to have to deal with the old decoder API for this right now.

Two: The code in beeauvin/tauri is simple and to the point. I could've written this myself.

Three: I've spoken before to the maintainer of the younger package, making future issue resolutions just a little nicer.

Web-based technologies versus an actual game engine.

This was a personal decision. I very much dislike the way one usually communicates with the GPU, before I used Bevy for this exact same game (hidden repo) and it frustrated the heck out of me. I am very much against throwing web-based solutions at things, but in this case it was justified, ranger among Critters will never run on Electron (which I think is a reason that many things in software are wrong right now.), but for it's limited performance needs, Tauri certainly suffices.