1001 Spikes is a platform game released in 2014, consisting of a series of levels with various traps and hazards. This TAS completes the whole game (both Ukampa and Antartica worlds) with the main protagonist Aban Hawkins.
Game objectives
- Emulator used: libTAS 1.3.4
- Genre: Platform
Framerate settings
The game runs at 60 fps, but if we set the framerate setting of libTAS to 60 fps, it will cause perdiodic lag frames. From what I understand, the game runs a busy loop at the end of each frame to wait for the correct frame length, but because libTAS advances time at exactly 1/60 second, the game often don't consider that enough time has passed (maybe because of large vs. strict comparison operator). Thus, libTAS failsafe mechanism operates to prevent the softlock, advancing the time slightly. Eventually, all those extra times add up to a full frame time, and libTAS adds an extra lag frame to compensate.
The function that queries time in the busy loop is clock_gettime(), which has a precision of a nanosecond. So, to make sure that the game always validate the frame length, we choose a frame length by rounding up the theoretical one to the next nanosecond, which leads to a frame length of 16666667 nanoseconds. Thus, the framerate setting in libTAS for this movie is 1000000000/16666667, or 59.9999988 fps. This fixes the issue, while minimizing the discrepancy of the movie length compared to the theoretical one. One last thing: libTAS 1.3.4 GUI does not allow such high numbers for the framerate, but it is only a limitation of the GUI, not the underlying code. Thus, the framerate will be displayed incorrectly but is correct inside the movie and is handled correctly by the game.
Basic gameplay
The move set of Aban is simple, he has two jump buttons of different height (one and two tiles height), without any gradation possible. He can also throw a knife, with a maximum of three on-screen. When close to an enemy, pressing forward+attack triggers a stab attack, with a high speed but a long recovery. Jumping or stabbing does not save time on flat ground over walking.
Stab clipping
When stabbing, Aban's hitbox is slightly moved forward, so it's back enter inside a wall. If he turns around at that point, the game will push him toward the closest free space, which can be downward, upward or to the side. When performing a high jump and a stab against a three-tiles wall, we have just enough height so that we can clip upward, resulting in doing a three-tile jump. The major limitation of this tech is that we need an enemy nearby to perform the stab. Also, at the exact frame when we clip upward, Aban is considered on the ground so we can jump immediately, or use coyote time to jump a few frames later.
After a level is completed, it is faster to exit to the map, then select the next stage.
Randomness manipulation
There are very few random elements in this game, but some of them do matter for the speedrun:
- The flame throwers in level 2-5 aim at a random angle. One of them had to be manipulated to be able to jump under the flames
- The fireballs in level 5-1 have a random angle. The last ones needed to be manipulated to take the door as quickly as possible
- After the Ukampa boss and the jewel sequence, the right path opens at a random time. We needed the block to break as soon as possible
The only two ways of manipulating the randomness is to change the seed (set using the initial system time), or to break blocks that spawn pieces in random directions.
Thanks
Thanks twyn and berumondo for their advices and suggestions!
feos: I compared this run closely to its human speedrun counterpart. While in some areas their times are really close or even match, this is only due to obstacles and platforms moving on a set timer, or no maneuvers to execute in a level. Otherwise in every level this movie is superior in optimization and also has tricks not seen in a human run, so in general it's never slower, and most of the time quite a bit faster.
Having to create a text file (only containing this game's Steam ID which doesn't change) to be able to TAS this game is a justified exception from
this rule:
"no renaming/copying/deleting/replacing/editing files that affect game-play. However editing environment settings or utilizing standard third party tools in order to get a game to load is allowed as long as the game runs as it's supposed to."
But the movie is quite boring due to monotonous gameplay, having only single player, and timed patterns that slow you down all the time. And it got no feedback. This means all the routing choices made in this run ought to result in the fastest possible gameplay to serve as a
fastest completion category. Since using more characters or just other characters requires unlocking them, and since you can't switch to them mid-game, the character use is optimal here. Accepting to Vault.