Snakebird is a puzzle game from 2015, which can very loosely be described as a snake with gravity. This TAS features non-intended solutions due to the use of two tricks.
Game objectives
- Emulator used: libTAS v1.4.6
- Genre: Puzzle
- Optimize realtime, not puzzle best solutions
Because most of the solutions are executed during the level fadein, I've provided an alternate movie and encode to see the whole solutions:
Route
The goal of the game is to complete 6 particular levels (star levels), to unlock the last level of the game. Completing a level unlocks all nearby levels, so one must complete levels in a path to access all 6 star levels.
The level enter and exit animations take a lot of time, so routing must first prioritize the optimal number of levels done.
Two main routes are possible:
- taking one path to stars 2, 3 and 4, and another path to stars 1, 6 and 5
- taking one path to stars 2, 3, 4, 5, 6, and another path to star 1
Now we choose the path by looking at the length of individual level solutions. It appears that the second route is faster.
Tricks
Two main tricks are used to greatly speedup solutions:
Double move
It is possible to move a snakebird twice in a single step, by using both the mouse and keyboard inputs at the same time. This saves some time, but it also have a very strong effect: gravity is only applied after the second move. This lets us do solutions that would normally be impossible with only single moves.
Death cancel
When a level has multiple snakebirds, the goal is to lead each of them to the exit. When a snakebird dies, the game triggers an undo move to forbid us from continuing the level. However, the undo is not triggered immediately! During that short time, we can take control of another snakebird and move it (only working using mouse). When the game triggers the undo, it will be applied to that last move. At the end, the snakebird that initially died is not longer in the level, and we can complete the level with the remaining snakebirds.
This has the consequence that we only need one snakebird to reach the exit. This is a little more restrictive however: the snakebird that reaches the exit must be the last one. If the last snakebird is one that needed to die, death cancel trick cannot be performed because there is no snakebird left.
Realtime optimization
The goal of this run is realtime, so there are a few cases where the shortest solution is not the fastest:
- animations: when snakebirds or blocks are falling, the game is paused and we cannot move. Sometimes longer solutions have less fall time. This is also the case for teleporters which have a very long animation.
- fruit glitch: during the level fadein, the fruits are appearing one at a time. If we move too fast and move to a fruit before it has appeared, it will glitch the level: we will be able to move freely, but the exit will be inaccessible. In a few levels, we change the solution so that picking fruits are delayed.
Solver
Finding solutions for levels was performed by modifying an existing solver by apocalyptech, for the purpose of this TAS:
- Implements double moves
- Changes the victory condition to account for death cancel
- Optimizes for solution cost (accounting for fall and teleporter animations) in addition to solution length
- General speed and memory improvements
See souce code.
Levels
We show all the solutions used in this TAS. Moves are described by their direction (U for Up, R for Right, L for Left, D for Down), one or two letters for single and double moves. When multiple snakebirds are present, they are indicated by their colour (R for Red, G for Green, B for Blue).
Two numbers are indicated for the length: the number of moves (single or double) and the evaluated cost by the solver (in move units). Sometimes, the solution used in the TAS is not the best one in terms of number of moves. In that case, the best solution is also indicated, and comments are present why the best solution was not used.
Stages are listed in the order they are completed in the run.
Stage | TAS solution | Length (cost) | Best solution | Length | Comments |
---|---|---|---|---|---|
0 | RR RD RR UU RR RR DD RR RR RU RU LL LL UL UU | 15 (15) | |||
1 | U LL LU RD RR DR UU UL UU | 9 (9) | UL UL LU RR RR UU UL UU | 8 | longer solution avoids more falls |
2 | LL LL L UR RR RR RR RU LL LU UU | 11 (12.75) | |||
3 | UL DD RU UR RD RR RU LL UU | 9 (10.375) | |||
5 | UU LL UR RU RU U | 6 (6.875) | |||
star1 | G:LD RR UU B:DD D G:UL B:RU RU R:LU UU B:LL UL G:LL LU LL LL B:LL L G:LL L LL R:LD B:DD R:LD DD G:LU U | 27 | No full solution could be computed so no cost | ||
4 | DD LD RR DD LL LD RR U RU UL LU UR RR UU | 14 (14.875) | |||
21 | UR RU UL DD LD LD DR RU UU UL UL UU LU RU R | 15 | RD DL LU UR RU RU UL D LL LU UU UU RR | 13 | Fruit glitch. We grab top right fruit first |
43 | B:UL DR RR RD R:UL DD B:DL LL UR R:RR UL LL B:RR UU UU | 15 (17.25) | |||
star2 | LD LD DL LU UL LL UU RU UR RR RD DR DD LD DL LL LU UL UU RR DD RR UU LU UR RD DR DR RR RR | 30 (30) | |||
42 | G:L UR R:RR G:DD LL RR R:RU | 7 | G:DD LL UU RR R:RR UR | 6 | Fruit glitch. We move Red close to the exit first |
41 | B:RR DL G:DD B:LU RR UU UU | 7 (9.875) | |||
25 | G:UU U B:LU UL G:UR RU UU LU UU UR | 10 (12.5) | |||
28 | B:UL G:UR UL B:UU UL G:LU B:UU LD G:UU LL L DR B:RU UU | 14 (15.75) | |||
star3 | B:UL LD R G:U LL U R:LU RR G:LL L LL LU B:DD G:UL LL LU U | 17 (25.375) | |||
26 | R:R B:DR R:UL LD B:U R:RU RU B:UR RR RR R:RU RR UR | 13 (17.875) | |||
27 | R:LL G:UR RU R:UU UL UR U UR UU U UL LL LD DD G:LD RR RR | 17 (20.75) | |||
40 | B:UL LL LD LU UR G:UU RR UU B:RD RU RU RU L UL LU UR RR G:UU B:RR RR | 20 (23.25) | |||
star4 | G:UR R:UU UL G:UU R:UR DL LU UL G:RR R:UU | 10 (12.625) | |||
24 | B:UU LL UU R:LU U B:UR RD DD R:RR RU | 10 (14.25) | |||
37 | R:UL LD G:UU LD LD R:RR UR G:DD R:RR R | 10 (11.75) | R:UL D G:DR RU RR R:DD G:RR | 7 | Avoiding teleporter is faster |
36 | G:UR R:RD G:RR R:RR DR UU RU G:UU R:RR RU | 10 (11.75) | |||
33 | LL LU U UL LU UR RR R DR RD DL DD LU UU UR UL LL LL UU UR | 20 (20) | LL LL UR RD DL LL LU LL LL LU U UR | 12 | Avoiding teleporter is faster |
34 | G:LL LU UL B:RD G:LU | 5 (7.25) | |||
star5 | R:RU B:UR UU R:UU B:U R:UL UR B:RD DD R:RR | 10 (13.625) | |||
30 | B:UU U RR U | 4 (4) | |||
14 | R:UU B:RR R:LL LL LU U | 6 (9.125) | |||
17 | G:UU R:UL G:UL R:L LU R | 6 (9) | |||
star6 | B:UL LL UU G:UL B:UL UL LU U UR RR RU G:LL LL R:DD B:UR U | 16 (21) | |||
end | B:L G:RU RR R:U G:UU R:LD G:LL R:R B:UR RU G:LU R RR B:UR RR G:RR B:RR UR RU LD LD RR R R:R B:RR | 25 (34.375) | G:RU RR R:UL G:UU R:UU G:LD R:RR B:UU G:LL UR RR B:UR RR G:UR RR B:UR RR RR UU G:RR R:UU G:RR | 22 | longer solution avoids more falls |
Thanks
Huge thanks to apocalyptech for the existing solver. Also thanks to speedrunners Calvin304 and Imanex who did a lot of work on this game