Dev Stream Summary - September 2020 (Patreon)
Content
Here is a summary of the work we've done on the game over the past few months via our weekly development streams on https://www.twitch.tv/pixeljamgames
Here we are sketching some basic concepts of how various dinos will be able to teaverse complex & unpredictable terrain. This is probably our biggest technical challenge of the game. The original Dino Run had a single small raptor with a circle as a physics body sliding over simple lines/polygons, which worked well enough for a game in 2007 but doesn't exactly cut it these days. We have dinos of various weights and speeds, some of which have 4 feet on the ground, and they need to gracefully traverse bumps, hills, cliffs, jumps, boulders and the like without looking like a total Spazosaurus while doing it.
We eventually arrived on a composite approach to building each dino, and it looks something like this:
The Dino is composed of one or more body segments, that include the legs and feet, which are hand-drawn for various angles (about 0 to 60 degrees both up and down). Each segment has a sensor on the bottom to determine if the feet are touching the ground and elegible to jump.
The tail is attached to the rear body segment and can be drawn by hand or code, depending on the type of dino. The upper body is probably drawn by code, because it needs to be able to bend and stretch according to the angles of the body segment(s).
The head is hand-drawn at various angles, and that angle is determined by an invisible wheel in front of the dino that rolls along the ground and tells the dino what type of angle to anticipate coming up. For example, the wheel will hit a steep upward hill before the dino does, and will inform the dino head to look up before its body actually reaches the hill.
Here we do some brainstorming about the major control and response systems of the game. The player obviously sends constant controls to the game, but the context of the controls is very important to determine exactly what the dino will do, and produces the appropriate action or response. For example, the special action key is just pressed. If the type of dino is a Stego, and both of their foot sensors are touching the ground, and the angle of their foot to the ground is appropriate, then we change into the new state of Stegoball and stay there until the special key is released.
Most of the streams have been spent coming up with interesting and exciting ways to combine various physics events in the game for emergent fun. We need to think about the metadata that each terrain chunk will have in order to help the terrain generation algorithm meaningfully combine it with other chunks, as well as making sure certain types of chunks are never combined because they might result in permanently-dino-blocking events, which is the kiss of death for a running dino...
Thanks for the continued support!
-Miles @ Pixeljam