SpeedSlither

Game Design Goals
I wanted this game to start easy and gradually become harder. Two properties of this game accomplish just that:
- The total number of dots on the field increase over time (but settle at a reasonable level of intensity).
- An increasingly large percentage of the dots on field become the type that move slow, decreasing how much room the player has for dodging and navigation (but there are always fast dots, as well).
I also wanted the player to have a reason to move about the playing field, instead of just sticking to one small area and playing defensively.
I did not explicitly program SpeedSlither to do any of the above, however. I didn’t have to.
I simply built the game to drop in dots at a constant rate, with a random speed interval on each, and the desired properties were emergent products of these simple properties in relation to the environment. Most of today’s entry aims to convey why this elegant shortcut works.
Some Raw Data (Just skim. It may not be 100% accurate. :)
New dots spawn every 0.5 seconds, independent of anything else in the world (in particular, dot count/death do not have any affect on spawning), with an evenly distributed random probability of traveling vertically (281 pixels) or horizontally (500 pixels) at some random speed between 0.15 and 2.4 pixels every frame at 30 frames per second (4.5-72 pixels per second). A dot’s speed is not changed after it is spawned.
Travel Times
Slowest vertical passage: 62 seconds
Fastest vertical passage: 3.90 seconds
Average vertical passage: 32.95 seconds
Slowest horizontally passage: 111.11 seconds
Fastest horizontally passage: 6.94 seconds
Average horizontally passage: 59 seconds
Path Length in Population Distribution
If all dots traveled at the same pace, with even distribution for release frequency per edge (i.e. not proportional to edge length), over time probability favors there being more dots traveling horizontally than vertically at any given moment. Since the trip is much longer, those dots are still in the world after a vertical dot spawned at the same time already left the field.
Speed Significance in Population Distribution
With dots traveling at fixed speeds across the wider horizontal spread, those traveling most slowly accumulate for the opposite reason: they move slower, making their trip take comparatively longer, and thus over time preference is given to slow dots.
Combined Hypothesis
The red obstacle system is likely to tend toward an increasing proportion of slow, horizontal dots.
Computers are Good at Running Models
There are a ton of things happening here… which sounds to me like a perfect opportunity to do some computer modeling. Fortunately, this model is already programmed - as SpeedSlither itself. All I need to do is hijack the logic to ignore the player, write new functionality into the renderer to generate a graph of dot count across time, maybe color dots for easier visual gestalt… and… tada!

SpeedSlitherMODEL Visual Key
Brown: Vertical dot moving below half the possible speed range
Light Blue: Horizontal dot moving below half the possible speed range
Red: Vertical dot moving at least half the possible speed range
Dark Blue: Horizontal dot moving at least half the possible speed range
In addition the new dots spawning at a constant rate, they also spawn every time with an equal probability of having any given speed value between 0.15 and 2.4 pixels/frame.
The graph generated fills out from left to right, representing the number of dots in the world for each 0.25 seconds since the simulation begins. The top two fields indicate to the number of dots in a given frame below half the speed range, whereas the bottom two fields refer to the number of fast moving dots (greater than half the range) that exists at that time.
SpeedSlitherMODEL Makes the Relationship Visual
The population bias toward the slow is not a byproduct of how/when the dots are spawned in - it is instead a consequence of the relationship between a dot’s properties and its timely expiration from the world. Fast dots reach the other side faster, dots vanish upon hitting an edge; therefore, fast dots vanish less time after spawning than slow dots.
As reasoned, slow horizontal dots gradually swell to the most common generation (light blue). The second most common dot above after sufficient time has passed is the slow vertical (brown).
Question Left to the Reader
These graphs frequently come up with a bubble sometime early on, then dip back down severely before making further progress. Why is this?
Why Accumulate Slow Dots?
Fast dots present a field-wide challenge because they arrive unexpectedly and must be dodged. The limit of how many of these a player can dodge - particularly with the dragged tail - is very quickly reached with only a few high speed dots coming toward the player. The player’s inability to distribute attention to different areas of the field at once prevents all fast dots from being properly interpreted and accounted for at a distance. Altogether, these properties make fast-moving dots a poor choice for establishing a ramped skill gradient.
Slow dots present a dynamic regional challenge, breaking up areas and making them hard to use for dodging. They move slow enough for the player to move the tail dot around them safely.
As another effect of their slow, gradual movement, which areas of the field are safe/dangerous changes constantly, incentivizing the player to move about the field.
The relative predictability of the slow dots makes luck less of a factor when navigating around them than when trying to not get blindsided by fast dots.
Why Lose When Mouse is Caught?
(A.) I thought the wordplay was amusing [”Don’t let snake catch mouse!” - get it? har har.] and (B.) what was I supposed to do when the player just left the mouse still - let the snake pile up in a circle around it? Being able to sit still would make this game too easy; in the context of that decision, I wasn’t sure what behavior someone might reasonably expect to happen when the snake caught up to the cursor. To dodge this matter I just throw a game over when the mouse gets too close to the snake head, rendering that particular unanswerable question irrelevant.
SpeedSlither obstacles works the way ocean waves crash on shore
January 21st, 2008 at 7:29 pm
Is the 2nd link meant to lead to a version of the game that genuinely generates a graph?
I’d be interested to know the rationale for bringing back numerical ranks.
I theorise that the changes in proportions/numbers of dots of differing types is simply a result of random behaviour (I would be more surprised if it were a straight line…).
Great write-up.
January 22nd, 2008 at 10:18 am
Yep - link fixed. Thanks for calling this to my attention.
The numerical ranks came back because I felt like the value in this game required slightly a little more play time than usual. I.e. if the player doesn’t play deeply into it, then the emergent differences in gross obstacle composition will never come about. I borrowed the score system from PoisonButterfly as a way of trying to get a player to play just a bit longer than most Game-a-Days require.
>I theorise that the changes in proportions/numbers of dots of differing types is simply a result of random behaviour (I would be more surprised if it were a straight lineā¦).
Every time? That graph is different every time (the game uses different random numbers every time), and if I had to bet money on one of those categories winning, I would - as absolutely anyone should - put all of my chips on the light blue, every time. How is this consistent with the notion that the change in distribution is purely random, as opposed to an emergent byproduct of level dimensions and removal rules as described above?
January 22nd, 2008 at 1:21 pm
“How is this consistent with the notion that the change in distribution is purely random, as opposed to an emergent byproduct of level dimensions and removal rules as described above?”
You slightly misunderstood me. I wasn’t arguing that the relative distribution was a result of the RNG - simply the distribution within each category. The reasoning for having a greater percentage of slow horizontal dots was logical and intuitive. I’m not arguing that point at all.
Your “Question Left to the Reader” seemed - to me - to be asking why the graph doesn’t simply chart a rise at a consant gradient, followed by straight horizontal lines - at uneven heights of course - (instead ‘overshooting’, falling down, then rising and falling several times).
My theory was that though these rises and falls seem roughly evenly distributed in the example chart, it was a purely random thing.
Given that the various peaks in the charts I had assemble themselves were very differently distributed from within the other charts, I hold this theory.
January 22nd, 2008 at 1:51 pm
Oh right! I apologize for the misunderstanding; I indeed thought that you were referring to the distribution as a whole, as opposed to the bubble/falloff in the graph.
In particular, the type of anomaly I was referring to is when there is a growth bubble relatively early in the development, which then falls off steeply.
I was thinking that there was a bubble effect due to pure randomness being the only initial cause for any particular distribution; i.e. the larger or more skewed the early bubble, the harder that phase is going to crash when those dots all escape at roughly the same time, leading to a bubble roughly the width of a particular length’s slow-dot lifetime (overlapping with others and slightly offset). These graph bubbles are certainly a result of random behavior, although there does appear to me to be a (slightly) more organized pattern to the graph of that randomness over brief periods of time, in close connection to the model underneath.
That aspect of it may have been obvious though, in which case perhaps the question was a silly one for me to ask.
:)
Thanks for the comments!
January 25th, 2008 at 12:01 am
I enjoyed this game. Primarily, I noticed, because of the rank, not the score. “Rank 6, I can do better than that!”
I also noticed that similarly to TreeMind, you can whip the mouse around to avoid the “Snake catching the Mouse” scenario. So instead of keeping the mouse still, I would find a good place to leave the snake, and whip circles around the screen.
Similarly, because the red dots only move horizontally and vertically, I found that moving the snake horizontally and vertically is generally safer. This would be difficult if you moved the mouse slowly (because you’d move on top of your tail), but again, swift movements make this easy.
January 25th, 2008 at 1:46 am
OMFGWTFLOLBBQ!!1!one1!
I feel like this is a nudge in my direction. :-)
Up until this point, I’d only managed level 4. Definitely more luck-based than Poison Butterfly. Not that there’s anything inherently wrong with that.
January 26th, 2008 at 1:26 pm
Any thoughts about if the game perhaps had a rank, but no (visible) score?
It could even go so far as to display the rank on-screen during the game. The feedback wouldn’t be so immediate as to what the player is being evaluated on, although there are of course ways around the need for that… I’ll probably tinker with this idea in an upcoming GaD.
Thanks for the comments!