Build 1503 Available for Download

201503311602

Wow, where to begin? There have been a lot of changes this month.

First up, probably the biggest change: is the introduction of offspring. If you start the game with the log window open, you’ll see a whole lot of text rushing by pretty quickly as the game runs what I’ve been referring to as a “pre-history simulation”. Once the game starts, take a little while to read through some of the text to get a feel for what the simulation is doing. Many characters are born, find partners, have kids, and die of old age before the game even begins.

Debug bars

Debug bars

Unfortunately, I don’t have that many visual indications of what’s occurring, so you’ll have to read through the log if you want a detailed picture of the world, but things like family trees and relationship graphs are planned for the future. For now, I have added a few debug bars on the right-hand side of the screen which list (if you have them): your current spouse (marriages are essentially arranged; you don’t yet get any say in the matter), your children and whether or not your character is pregnant, and your siblings. Next to each name is either an A or a D, indicating that the person is either alive or dead, respectively.

Secondly, bringing the game significantly closer to a feature-complete alpha, is the change to the respawn methodology. In 1502, when the player died, the game would compile a list of all living characters in the world, pick one at random, and transfer the player’s consciousness into it. Now, using the family structure outlined above, the game first looks for any alive children, and if none are found, looks for living siblings. If still nobody is found, the game reverts back to 1502’s respawn handling. No matter who the game picks as a respawn target, time advances by a few in-game years before performing the mind-swap, and then play resumes.

To handle things like pregnancy/childbirth and the decaying of corpses (a world with large piles of many-hundred-year-old corpses can get very laggy), I (with help) implemented a timer framework that tracks in-game time rather than real-world time, like the built-in timer manager does. For instance, when someone is killed, their body drops to the ground, and they send off a note to the in-game timer requesting that their corpse decay (be destroyed, really) somewhere between 8 and 12 years in the future. If, in the intervening time, the player dies and world time jumps forward, the date at which the first corpse will decay doesn’t change and doesn’t have to be recalculated as it would if the real-world timer had been used, and will decay when it is supposed to. The hardest part about this whole process was wrapping my head around function delegates, but thanks to some people in Twitch chat (which I’ll get to later), I finally was able to wrap my head around the concept. There was also an issue with a B-tree sort, but that was because I was too tired to function and was pushing myself a bit too far.

A fallen Character taking damage

A fallen Character taking damage

Damage visualization is also now in the game, at least when receiving damage. I still haven’t added any sort of attack indicator other than the cooldown bar, but since the attack function has been unplugged from the AI, that isn’t too much of an issue yet. The damage visualization – momentarily blinking red – triggers when anyone takes damage from any source.

Stamina now drains when sprinting, and drains a little more slowly when running. Walking will slowly regenerate stamina, while standing still will regenerate it much faster. This system will be entirely torn out and remade when food and calories are added, but it will do just fine for now.

Speaking of sprinting, you can now only sprint forward, not backwards or side-to-side.

Last, but nowhere near least, I started streaming on Twitch! Going into it, I thought that most people would find watching someone else write a program to be immensely boring, and I was a bit worried that the chat would turn out to be horrible. Thankfully, and – I must admit, to my surprise – I was totally wrong; not only do people actively seek out programming streams to watch (so much so that there’s an entire subreddit dedicated to it), but they participate in the chat, and they’re helpful, funny, and positive to boot! Most viewers seem content to kick back and watch me code and (I assume) learn a bit about the technique or engine, but a pretty substantial portion of them participate in the chat, asking questions, correcting my spelling mistakes (this happens embarrassingly frequently), or offering help, tips, pointers, and ideas. Oftentimes I’ll find myself not just asking or answering questions, but having full-on, half-hour conversations with the chat that I’ll have to break off to get back to work.

A few of these conversations have produced either code or ideas that show up in 1503, and I fully expect this tradition to carry over into future releases. Serge_david originally suggested the newly-added CongaTime function, which lines up all living characters in the world in a conga line. Music and animation hasn’t been added yet, but will be included with the forthcoming AI revamp. Slatey79 and dead_p1xl helped me to understand delegates and function pointers for the  in-game timekeeper, and slatey went so far as to whip up a pretty slim B-tree sort that was slightly modified and put into service.

I don’t have a set schedule, but I’ve set a personal goal of streaming at least once a week. If you have a Twitch account, you can add me as a favorite and get notified by email when I go live, provided you have that feature enabled. Even if you don’t have an account, stop on by!

All in all, I regret not streaming sooner; it’s a huge help. If anyone reading this has considered streaming but hasn’t done it yet, I highly recommend trying it, at least once.

 

Changelog

upgraded engine to UE 4.7.1.

added some simple random variation to terrain material.

added some structures up on the eastern hill.

added warning text to the damage-causing brick area in the courtyard so that it’s a little more obvious that standing on it will cause damage to the player.

added damage visualization: people momentarily blink red when taking damage from any source.

added names to PostRenderFor text.

added marriage, mating, and offspring to the prehistory simulation. the first child born in the world was named First Last because I screwed up the name assignment and it used the defaults.

added CongaTime function to line up all living characters in the world. no music or dancing yet. thanks to serge_david in Twitch chat for the suggestion.

added a timer system that works on in-game time rather than the included timer that works on real-world time.

added debug bars to show population breakdown by mortality and gender, current spouse (if any), children (if any), and siblings (if any)

added alive/dead marker to all debugbars involving people.

added a target population cap so that population doesn’t spiral out of control and lag the game to death.

added stamina drain when moving. sprint drains a lot, running drains some, and walking will slowly regenerate stamina. standing still (resting) will regenerate stamina fairly quickly.

removed attack from AI.

changed beginning-of-game character seeking behaviour so that it prefers characters with children.

changed respawn behavior: respawns will seek first the player’s children, then siblings if they have no living children, and, failing all that, will choose from the world at random. time advances by a random, arbitrary amount for each respawn.

changed birth rate and death-from-old-age years so that the species only very rarely goes extinct before the player gets a chance to play

changed breeding rate so that people will breed with a greater sense of urgency if the population is teetering on the verge of extinction. forwarded code to the Smithsonian National Zoo for use with their pandas, but was rejected by spam filter.

changed health bar so that it decreases from left to right.

moved new character spawning code into the creature manager so that registration and name assignment is handled automatically.

fixed occasional CTD on game start caused by the player controller de-posessing a childless character in favor of one with children, which resulted in calls being made on a controller-less character.

fixed childbirth so that it occurs at the end of a gestation term rather than the beginning. partners report that intimacy is far less awkward now.

fixed age debug bar so that it now reports actual age instead of birth year.

fixed sprinting so that it only changes speed while moving forward; you can no longer sprint backwards.

fixed beginning-of-game character seeking behavior to prevent it from indefinitely forwarding time if the species goes extinct.

Known Bugs

The ocean is solid, preventing you from swimming in it.

The [esc] menu is reluctant to give and take focus, requiring the user to click once to focus it upon opening and click once again to defocus it after closing the menu.

Turning headbob off will cause the player’s head to move through the camera while running or sprinting, temporarily obstructing your view.

Running out of living people to spawn into upon death will cause you to freeze in place and will display a debug message onscreen. To “fix” this, open the console and type RestartLevel, then press [enter].

During periods of high CPU use, ragdolls may occasionally fall through terrain.

There is a very small chance that everyone alive may die before the player has a chance to start playing.

Download

You can download 1503 as a self-extracting archive (297mb, 673mb decompressed) directly from icannotfly.net.

Starting this month, downloads are also being offered as a .torrent or magnet download (both 673mb, uncompressed). This is only experimental at this point and isn’t guaranteed to be available in the future.

If you find any bugs, please let me know.

Please Note

To start the game, extract the contents of the archive and run PlayGame-1080p.bat. You can edit this file if you’d like to change the resolution to better match your screen.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *