[Home] [Buy] [News] [Family Trees] [Leaderboard] [Photos] [Update Log] [Polls] [Forums] [Tech Tree]
Update: Curved Tracks
January 24, 2020


Forum member Wuatduhf made an important discovery: recent changes to the way object patterns work had suddenly made curved cart tracks much more reasonable to implement.

It turns out that I already had the graphics drawn for these curves, and they looked really good back in the day, but I had to scrap them because of the combinatorial explosion that they would entail. For example, north-moving carts already had three "leave" cases (leaving from south ends, north-south tracks, and cross tracks) and three "entering" cases (entering north-south segments, entering north ends, and entering cross tracks). To handle all the combinations, 9 distinct transitions were required for each cart direction, resulting in a total of 36 transitions. That's a lot, but as soon as we add in curves, it blows up even more, with something like 25 transitions needed for each cart direction, or 100 total. That's a lot of transitions to author correctly, and way too much to keep track of along the way, resulting in tons of room for error.

So what changed with object patterns to help with this problem? Something pretty tiny and simple, actually. Part of the bottle update a few weeks back involved emptied bottles that made a final sound as they were emptied. Roughly half of the bottles held liquid, and the other half powders, requiring a different empty bottle state for each to play the "glug-glug" or "swish-swish" sound. All the bottles were part of one big 18-item pattern, but how could I flesh out the empty state for this pattern? Since an object can only occur in a given pattern once, I would need to create 18 separate "empty" bottles, even though they all pretty much did the same thing (half of them playing the powder sound instead of the liquid sound). That's a lot of extra objects that essentially do nothing. But why couldn't a pattern have repeated objects in it? In other words, why couldn't a pattern "converge" on a few common end states? These bottles could be different all along, with 18 variations, but once empty, end up as one of two empty-state bottles to play one of two sounds. Each of the 18 slots in the pattern would contain one or the other of these two bottle objects. I updated the pattern editor to support this, and that was it.

Wuatduhf's observation was that these new "converging" patterns were exactly what was needed to cut through the combinatorial explosion for tracks. As a simple example, when a track cart moves north out of one of five possible north-bound tracks, each of these needs to potentially land in the same connecting track. This can be implemented as a pattern, then, only if the pattern can contain repeats of the same destination track.

Thus, instead of 25 separate north-bound transitions, I was able to implement one set of north-bound transitions describing what happened to a north-bound pattern, and then fill the pattern with all the cases.

This also allowed me to implement tracks that pass through spring-loaded doors pretty easily, preserving the insulation bonus for the room that the track emerges from.

In the end, each of these patterns had 25 elements each (with repeats to cover the various combinations), and the north-south patterns had 36 elements each (due to the extra combinations needed for passing through spring doors). And there were five separate patterns for each direction, resulting in a grand total of 610 items listed in these patterns (all passing through only a small handful of transitions).

There was still a lot to keep track of when fleshing out these patterns, and the whole thing felt about as close to an IQ test as I've experienced while working on this game. My moth-holed, 42-year-old brain muddled through it all, but barely.

But those curvy tracks sure do look nice. Great to dust off 17-month-old artwork and finally put it to use.
[Link][4 Comments]

Update: Baby Placement
January 17, 2020


My wife was out of town all week, so I was left with the task of being a full-time parent as well as a game developer. I did manage to get a few things done, though.

First, there was the question of Eve frequency, and how that tends to spread civilizations out over time. Eve placement is related to baby placement (we place an Eve instead of a baby under certain conditions), and in thinking about the baby placement code, I realized it had grown into a multi-scarred monster over the years of trying different methods inside and outside the rift. Seemed like a good time to start clean and really think about what baby placement is supposed to accomplish.

Our highest priority in placing a baby should be to make sure there's at least one family in each of the specialist skin tones, and if all of them are already present, bolster the population of the weakest skin tone. After that, our next priority is to bolster the population of the weakest family, and place girl babies when the number of potentially fertile females in a given family gets too low. Of course, we also want to respect each mother's birth cool-down when possible, and also each player's previous-life area bans (so they don't get born to the same family over and over). But we should also be willing to ignore cool-downs and area bans if there are no other mothers available. No one should be able to area ban themselves, through suicide, into being an Eve, and we'd rather overload a mother on cool-down than spawn an Eve.

Finally, we need to make sure that the server is never overloaded with babies relative to the adult population (more than 2/3 babies), nor that a few remaining mothers are overloaded with babies (more than 4 babies per mother).

And of course, through out all of this, we respect curses, never placing a cursed baby near a player who cursed them, ever ever ever. If there's no place for a cursed baby to go, they are sent to donkey town.

With those priorities cleanly stated, we can see that we only place Eves in two situations. First, if there are too many babies for the existing adult population or population of mothers. And second, if we're missing one of the specialist skin tones.

Those cases should be relatively rare, which means that new Eves should be rare.

With the simplified code in place, the behavior is much easier to reason about. If there seem to be too many Eves in the future, I'll be able to figure out exactly why.

Next, the Genetic Fitness leaderboard has clearly been getting out of hand, with top scores climbing into the 500s. In looking closely at the top-scoring players, I found something distressing: many of them had very low average lifespans themselves. By keeping their own lifespans low through regular suicide, the were able to farm points whenever they lived an occasional long life. Furthermore, they were essentially handing out free points to everyone else through these occasional long lives. It was also clear that quantity was trumping quality. When scores are potentially infinite, playing a lot of lives is the only way to reach the top.

Implementing a suggestion from Wondible, we're now back to scores that are asymptotically capped at 60, while still solving the problems that the older capped system had (where you got punished for having a new player as a baby). You now gain points whenever you help an offspring player live longer than expected, but the amount you gain is scaled relative to your own score. Thus, the closer you are to 60, the less you can gain from each offspring, but the more you stand to lose if you actually hurt an offspring and cause them to live a shorter life than we expect for them. You also gain points for yourself when you live longer than expected, with your score approximating how long we expect you to live.

Thus, there's no longer an exploit possible through suicide. The best way to get a very high score is to live very long lives yourself, and never suicide, and help all of your offspring to live as long as possible, too.

Returning to a capped score demands a new formula for mapping score to tool slots, which can be seen in this graph:


As part of this investigation, I made more of the leaderboard data public. You can now click on the top-scoring players and see the recent lives that contributed to their score:


Thus, if another exploitative way to boost score emerges in the future, it will be easier for everyone to study and identify it.

But looking at the data now, we're off to a good start. All of the top-scoring folks have very high average lifespans themselves.

There are also a bunch of little fixes. More stuff can be bottled, and bottles are a bit easier to work with.
[Link][9 Comments]

Update: Bottle It
January 9, 2020


Still working my way through this list of issues:


Some of the issues provide inspiration about obvious holes in the game's content space. This week, I fleshed out bottles, which had previously only been used for wine. Now they're used for almost every liquid and powder in the game. Wall shelves were fleshed out too, to go along with this, so now colored walls can have shelves too. Colored wall shelves full of colorful bottles.

More bottles means you're going to need more glass, and Tarr pointed out that glasswort was the current bottlneck there (bottleneck, see what I did there?). Now you can cultivate glasswort, but of course, it's a desert-loving plant. And yes, in real life, glasswort doesn't grow in the desert, but instead along the edges of brackish bodies of water. We don't have a beach or salt marsh in the game yet, though, so we can at least imagine that our desert is an ancient sea bed.

Fleeing rabbits now avoid floors when digging their new holes.

Together, all these changes resulted in 138 new objects, most of them varying states of the 18 new types of bottles. But yeah, that's a lot of new bottles.
[Link][10 Comments]

Update: Fixes Continue
January 4, 2020


Still plowing through this list, with only 168 more to go:


Some of the fixes this week involved quite a bit of new content, as I fleshed out the dye possibilities for knitted clothing and roses, and patched some gaps in hat decorations. Over 135 new things, but most of them are the result of combinatorial explosion (red hats with blue roses and blue hats with red roses). Regardless, there's a lot more visual variety in clothing now.

Tables are useful for storing a few things even when you're not feasting, way stones no longer block movement, grapes can be removed, and a bunch of things that weren't containable are now containable. Rabbit holes can be dug up. You can no longer dump fresh water back into a water source, so there's no more confusing situation where you gain or lose a unit of water by doing that. Drunkenness has been refined a bit and clarified with a blushing emote.

The little photo icons in the family tree are back, for anyone starring in a photo. A few cases of spurious tool learning have been fixed (you no longer learn the knife when taking it apart, for example).

And most exiting of all: another cause of the bouncing-forever (wild bug appeared) has been found and fixed. Hopefully, that's the last one (this mysterious issue has been lurking for more than a year now, it seems).

I gird my loins to plunge back into that list of 168 and make another dent next week.
[Link][22 Comments]

Update: More Fixes
December 21, 2019


It's not glamorous. It's not exciting. But it needs to be done.

This week, I plowed through all reproducible code bugs, as reported here:


It's amazing how long it can take to fix even a simple-sounding bug. This project is huge and complicated (117,000 lines and counting), and figuring out what's going on when something's going wrong can be really difficult. This is not fun or interesting work, but I'm getting through it.

Next week, I'll be trying to make a dent in the stupendous pile of content-related bug reports:


There are lots of these, but fortunately, content problems are usually a bit easier to find and fix.

Have a nice holiday time, everyone!
[Link][9 Comments]

[Home] [Buy] [Wiki] [Food Stats] [Fail Stats] [Artwork] [Credits]