☜ Back to Index

Desma 199 - "Thicket"

March 30, 2020

an animation study I did for thicket

Thicket is a turn-based game inspired very loosely by Hunt the Wumpus, Dou Shou Qi(鬥獸棋) and the animal novels of Felix Salten. In the game you play a young, deer-like animal who is hunted by a wolf. The game takes place on a field of hexagons that can be rearranged into different maps. Other animal pieces have their own habits and goals, including a bear, which can kill the wolf. Some animals may be nocturnal, assuming there is a day/night cycle. Some animals could be protecting young, looking for mates or hunting different animals. The player may not always see what lies in the adjacent areas, but can smell what animals have wandered through the hex they are currently in. From this information they must guess how close the wolf is. Likewise, the player leaves a scent, which the wolf can detect and will follow. The implication is that to escape the wolf, the player must lure the wolf into situations in which she is removed from play.

My goal with Thicket is to create a reusable framework for making turn-based hex-grid games and cellular automata experiments. I’d also like to use this opportunty to experiment with a pipeline from my 2d frame-animation practice using Toon Boom Harmony into Unity. I’d like to create a flexible system where hexes can be given properties (a tunnel, an obstacle, a trap, water, light or dark, animal scents), peices can be given properties, and the whole thing can be run with n number of players, including zero players. Art should be easy to replace /add so the whole system can be skinnable for different games. I’ve entertained the idea that you simply add more types of actors and terrains and they can all be combined in any manner of ways, so that each game is really just a new problem posed on a multipurpose board, Thicket being the first of many.

This will be a preparation for my senior project, as well as an exercise in integrating Unity into my regular creative practice.

I tried to prototype an early idea for this game as interactive fiction some time back with limited success (this barely works and is unwinnable, but it implements a couple of things, like scent)

Downloads:

thicket moodboard/ images


Videos:

Dou Shou Qi

I used to play this game (under the name Animals Chess ) as a child. It’s also called Let’s catch the Lion or Jungle. My set had the small wooden chip peices with line art like shown in the video. These icons have stuck with me, especially the wide circular eyes on the animal faces. In terms of game mechanics, I like the looping hierarchy of pieces- the weakest peice can take the most powerful peice. In my mind Thicket might incorporate a similar system.

Hunt the Wumpus - TI 99-4a

Hunt the Wumpus is a turn based game with fog of war, using blood marks to hint if the enemy lies waiting in a nearby space (could be scent trails in Thicket). We played this game on the TI in elementary school.

Fresh

Fresh is a film about a powerless actor manipulating powerful actors into eliminating one another. Thicket is a game about the least powerful peice on the board manipulating more powerful peices into removing each other from play.

Ogre Amiga

Ogre was an asymmetrical turn-based game where one player controlled a whole army and one player (or the computer) controlled a single, super-powered tank. Things I like about this- hex grid, asymmetricality, variable number of players

Hedgehog in the Fog

😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍

2d tilemaps in unity (including hex)

rendering tilemaps with built-in 2d tilemap tool

Making Unity 2D Levels with Hexagonal Tilemap

This may be the most relevant one- uses the built-in Unity tilemapping, goes into detail, includes fog of war, shows how to do tiles with “height”, which I will probably use, since I’d like to have characters that kind of stand up off the hext tiles and can be larger than the hex. (ahhh boo, it’s not click to move, it’s keyboard movement, so no pathfinding, no getting hex co-ordinates for the mouse etc.)

more tilemap painting
tilemap click to move
creadte A* nodes from unity tilemaps
unity delegates
turn based AI logic

Posts:

fov.png

Field of View pt 2

Field of view is working now. There were a couple of issues previously- one was related to a rounding error in hex line drawing, which James helpfully caught. Another was a missing hex-to-offset coordinate conversion. Now I have very nice looking FOV erasure of fog tiles. Next steps will be to turn the fog on always and to map the vision range to time of day, so you see further during the day than at night, rather than night happening all at once, also I need to redraw the fog each turn so the fov is turn-by-turn rather than cumulative.

More ➜

Field of View

I haven’t posted about Thicket lately because I’m in a 6 week long compressed summer statistics course which is kind of kicking my ass. I am still consistently working on Thicket though. Right now I am working on field of view for fog of war. This consists of a couple of functions that I ported from the Red Blobs site with the help of James Curry. Field of View uses a rangefinding function and then uses a line drawing function to draw a line to every tile that range finds. If the line hits an obstacle then we dump the hexes from that line, if not, we add them to the array. Then I clear that array of hexes from the Fog tilemap by adding a null tile to them. Right now the range function works and the line drawing function mmmmmostly works? (It draws some slightly irregular lines sometimes and I’m not sure why) But the whole field of view function is choking for some reason on the method I use to check for obstacles, which are a type of object I call scenery which can have a bool called “opaque”, instead of using the pathfinding tilemap which is a whole different thing. Now why this scenery check is causing a problem, I can’t yet determine. I’m using it in the Spoor script (spoor is the scent object that animals leave behind) to check for water tiles, and it works fine there, and uses the same kind of coordinate (offset) input. for some reason in my field of view function it hangs everything up, however, with no error. I miss having a class instructor to bounce problems like this off of- James doesn’t know/have Unity so he’s best to ask about things like the psuedocode on the Redblobs hexgrid site, not stuff deep in my unity project like this.

More ➜

Scope creep

An idea:

More ➜
hexcube.png

Offset to cube coordinate conversions

I was able to make my own functions to convert from offset coordinates (what unity tilemap and SimplePathFinding2d use) to cube coordinates (what I presumably need to be able to get hex ranges and line of sight). I replaced the square range finding for highlighting moves (which was complicated and distorted every other column you moved) for this hex one- this is currently just moving out in each direction in a star shape, but with a little more puzzling I should be able to get the whole range (I hope).

More ➜

Game thoughts

The original model I had for Thicket was for exploring the problem of how a powerless actor defends themself against a powerful one (the solution is still pretty ugly). So, what happens when we also design for the perspective of the predator that is just trying to survive? Or for the chicken that potentially gets sacrificed to distract the wolf from the deer? What happens when we say, “what’s the least awful solution to this problem?” (presumably one that kills the least number of pieces on the board). How do we design for a game that doesn’t conveniently end when the predator animal is killed or put in check or the prey animal is eaten? The answer is we try to imagine the best possible outcome for the situation, one where you can’t just redesign predation itself, and that’s one very much like the actual balance that happens in nature. Predators cull older, less healthy animals and the populations are relatively stable in this relationship. The other option would be to eliminate predators, in which case the prey animals might overpopulate and die of disease. Rather than treat the scenario as just a chess game, make it a simulation where the game never ends, but different kinds of stasis can be reached, like- everybody dies, or populations stabilize. So the original strategies of manipulating powerful animals into eliminating each other are still there, but that’s not the only level the game operates at- the game would continue if the player dies or the predator dies and you see what happens. Then use the engine to move on from the predator/prey problem and model different problems, the problems should represent themselves- they don’t need to be metaphors for anything to be valuable or meaningful outside of the idea that problems can’t really be solved by just ‘eliminating’ an enemy.

More ➜

𐂂 Thicket End of Quarter Summary

This stage of developement has necessarily been primarily a study in programming skills and design patterns for games. I learned a lot about creating event driven state machines, delegates, pathfinding, using singletons, and more. All of these things are currently incorporated into the game and will influence the development I plan to continue on it after this course.

More ➜

scent

Scent trails are looking really nice now. Water removes scent from its space.

More ➜

𐂂 week 10

I’m not sure if I have posted about the current structure of how things work, and it’s probably time to start documenting it now that I’m reaching my first sort-of-milestone: i.e. the end of the quarter.

More ➜
nap.png

nap

The wolf is now napping when she eats something (pictured: post-chicken dinner nap)

More ➜

Offset vs Cube

So There’s a few ways of adressing a hex on a hexgrid. One is regular square grid style co-ordinates (just offset), and another is Vector3 cube co-ordinates- For a better description and visual aids, check out this page on red blob games.

More ➜

night

The beginnings of the day/night cycle are (sorta) working.

More ➜

fog of war

The beginnings of fog of war are working.

More ➜
badplace.png

bad place

I revisited the interactive fiction version of the game I tried to make a long time ago and forgot how dark it got. The wolf den is just called “bad place” 😕

More ➜
squishhex.gif

squishex

Switched to “tilted” hexes and added a text window.

More ➜
thicket-eat.gif

refactoring

Ok, refactoring was a very good idea. Nick suggested that we separate a bunch of stuff out from piece into behavior scripts, then get rid of the GameController script, make a pieceManager that is in charge of looping through pieces turns, and then have lists of behaviors on each piece that execute in order. Anyway, now enemy movement and eating pieces both work.

More ➜

refactoring

The suggestion for my AI movement woes is to refactor and create a player script and an ai script that both inherit from piece. This kind of depresses me a little but I’ll try it.

More ➜
thicket-stuck.gif

Why won't you move?

I’ve been stuck all week trying to figure out why my AI pieces aren’t moving when they seem to be correctly making paths. I’m sure it’s probably something easy about the way the simplepathfinding2d package I am using works, but I am stumped.

More ➜

Thicket week 5

path movement works correctly now

More ➜

not quite

huhhhh…

More ➜

GetPathPointList?

So, I made a lot of progress the other day with the addition of Simple PathFinding 2d… I’m successfully drawing debug paths that conform to my hexgrid. The next step is figuring out how to grab a list of Vector3Ints for grid locations along a path and then turn them to world positions with CellToWorld and then step through them one at a time (each piece has a range var that represents how many spaces they can move each turn).

More ➜

pathfinding

pathfinding

More ➜

tiles and pieces

I played with those hexgrid helper classes for a while and then put them aside. I’ve decided to start from scratch and then return to them later. Right now I want to just conceptualize the most basic objects in the game, and if there’s something I don’t know how to do immediately I’ll pseudocode it.

More ➜

Hexgrids

click to move

More ➜
Thicketicons/thicket_sketch2.png

sketches

More ➜

Thicket week 1

Set up a page and post tag to serve as my process book for a solo game project for school, these are now hidden from the main feed.

More ➜

Documents: