Note: The submitted movie file only contains a fraction of the TAS, as the full version was too large to upload in the submission form. Please replace the submitted movie with this userfile which contains the full version.
Astrosmash is a game where you're a laser gun that has to shoot everything out of the sky. Shoot more things, the more points you'll get. Be careful though, if you let asteroids hit the ground, you'll lose points. Let a spinner hit the ground and you'll lose a life! You'll also meet hazards like pulsating missiles which home in on the player, and UFOs which give the most points when killed. There is also a teleport button that moves your gun to a random location and can be helpful when in a sticky situation!
20,000 points (UFOs begin spawning) surpassed at 2m 39s - 1m 59s ahead of world record
100,000 points (last scoring multiple increase) surpassed at 6m 49s - 9m 02s ahead of world record
1,000,000 points (last difficulty increase) surpassed at 29m 25s - 1h 20m 11s ahead of world record
6,171,485 points (world record high score) surpassed at about 2h 20m - about 11h 22m ahead of world record
9,999,995 points (max nominal score) surpassed at 3h 43m 08s - never achieved by a human
32,767,995 points (max possible score) reached at 11h 49m 43s - never achieved by a human
Basic Game Info
Score table:
Score
Multiplier
Big Rock
Small Rock
Big Spinner
Small Spinner
Missile
UFO
Big Rock Miss
Small Rock Miss
Death
0
1x
10
20
40
80
50
—
-5
-10
-100
1000
2x
20
40
80
160
100
—
-10
-20
-200
5000
3x
30
60
120
240
150
—
-15
-30
-300
20,000
4x
40
80
160
320
200
400
-20
-40
-400
50,000
5x
50
100
200
400
250
500
-25
-50
-500
100,000
6x
60
120
240
480
300
600
-30
-60
-600
An extra life is awarded every 1,000 points
Large rocks will sometimes split into two small rocks when shot
If a spinner hits the ground, you instantly die
The teleport button will move you to a new random position - useful for sticky situations
Difficulty Selection
Hardest difficulty, or "top speed" rather, is selected by pressing the disc, side buttons, or keys 4 through Enter on the title screen. There are three easier difficulties which simply introduce more lag frames to make the game slower, with no other differences to my knowledge.
2 Controllers
Both controllers are utilized in the script extensively to minimize button-press conflicts. For instance:
Controller 1 handles the following:
Disc inputs
Small asteroid targeting (lower-left side button
Large asteroid targeting (lower-right side button)
Missile, UFO, and Spinner targeting (Upper side button)
Random firing for RNG manipulation (lower-right side button)
Starting the game (Upper side button)
Controller 2 handles the following:
Teleportation (Key 3)
Large asteroid targeting (lower-right side button)
This TAS is a little different from my usual submissions. It is 100% script-generated. Now, I don't do programming for a living, so don't expect the code to be well-organized or optimized. In fact, I started this project in late 2021 with the goal to get better at programming; I couldn't imagine making something on par with TAS quality. I remember how difficult it was getting started with the basics like how to get the gun to even move at all xD Most of the programming skills I have today were probably learned in this one project. Of course, ChatGPT helped some when it came out in late 2022, ha! It's to date the largest coding project I've ever undertaken and honestly, I'm astonished the thing even works at all.
How does the bot work at a basic level?
If there are no targets spawned, move to the screen center
If there are targets spawned, move the gun left/right until it can target something
Shoot a laser if it is anticipated to intercept a target's current trajectory
Shoot two lasers simultaneously at a big rock to also get the small rocks it may split into
Move on to the next target if a laser is already on its way to intercepting the current one
Target spinners with highest priority, then UFOs, missiles, big rocks, small rocks
If the bot needs to decide between two targets of the same type, move towards the one with the least distance to travel before interception
If a spinner is uninterceptable before hitting the ground, teleport until it can be shot at
If a spinner is uninterceptable before it despawns at the left or right screen margin, ignore it.
If a hazard comes within a certain rectangle of the player position, press the teleport key
How the hell did I get this to be Deathless??
OK, so the way I have this bot programmed, it honestly isn't that good, and would frequently die if it wasn't for one little magic trick I used. Basically, every time the bot dies, a save state is loaded to have the bot try that part again and again and again until every death is eventually avoided. In the final movie, all of these fails are cut out, giving the appearance of a much more robustly coded bot, and many insane superhuman moments. But now you know my secret ;) Here are the specifics:
Save a state approximately every 30 frames, each time toggling between save slots 1-5
Load the last state saved if a death is detected
Do one of nine predetermined actions at random every frame for ten frames to see if the bot can escape the death
If it cannot escape the death after ten attempts, load the state before that to see if it can escape death then
Repeat this process until the death is avoided. Eventually, this process will work every time.
Benchmarking
Due to the random nature of this game, the rate at which points are gained can vary significantly between attempts. This is a very long TAS to record, so I want to make sure the bot stays on the right track, forcing the bot to attain certain score thresholds by some fairly strict time limits. Here are the thresholds that were important to me personally, along with their benchmarks:
Save a state at slot 6 when starting the game
Load the state at slot 6 if 20,000 points is not attained before 2 minutes, 40 seconds
Save a state at slot 7 if 20,000 points is reached before 2 minutes, 40 seconds
Load the state at slot 7 if 100,000 points is not attained before 7 minutes
Save a state at slot 8 if 100,000 points is reached before 7 minutes
Load the state at slot 8 if 1,000,000 points is not attained before 30 minutes
Save a state at slot 9 if 1,000,000 points is reached before 30 minutes
Load the state at slot 9 if 10,000,000 points is not attained before 3 hours, 45 minutes
Save a state at slot 10 if 10,000,000 points is reached before 3 hours, 45 minutes
Load the state at slot 10 if 32,767,995 points is not attained before 12 hours
The Maximum Score
After the maximum score of 32,767,995 points, the score underflows to the smallest possible score of -32,768,000 points, resetting the difficulty, speed, and scoring multiple back to level 1. When the score rollover occurs in this TAS, the bot hits a UFO at 32,767,650 points, instantly underflowing the score to -32,768,250 points, thus missing out maximum score target! But don't worry, after input has ended, we incur 2 deaths, miss 3 small rocks, and miss 5 big rocks for a loss of 255 points. Only now is the peak score registered as 32,767,995 for a moment, officially satisfying the maximum score criteria.
This TAS is suboptimal
I think the biggest barrier for this submission being accepted to the site might be the technical quality of the run, so let's address that.
Quoting TASVideos Movie Rules:
Your submission does not have to be absolutely perfect and unimprovable, but it should be as optimized as you can make it. Judges will check your movie's technical quality: they should not be able to easily improve your movie by large amounts of time.
This submission certainly is not perfect and unimprovable, although it is as optimized as I could practically make it. And while improvements are easily findable, they would not save large amounts of time and would certainly not be easy to implement. Introducing a manual improvement anywhere in the run means the remainder of the run must be redone. If you leave that up to my script, there's no guarantee time will be saved in the long run. And if you leave the remainder up to manual TASing just imagine how painstaking going through the game, manually positioning and firing the gun optimally for each target, manipulating RNG for the highest-scoring enemy spawns, and manipulating teleportation RNG to get from point A to point B faster would be. This would be an ABSOLUTE FREAKING NIGHTMARE for any sane human being. Therefore, I believe this submission meets the technical quality guidelines of the site.
Furthermore, I believe this TAS also has merit as a demonstration, showing that even a game with this level of complexity can be TASed to a reasonable optimization level 100% by script. After all, there will always be tradeoffs between design quality, development time, and cost in any engineering project. This TASing method allowed me to put out a product of reasonable quality in an efficient time frame. Sure, there may be some kinks final product, but I saved a mountain of personal time and sanity doing it this way.
Could the script itself be improved?
Absolutely, but there are quite few issues I'm aware of! Here are the known ones:
The script is completely reactionary. It does not analyze RNG to predict when, where, or what hazards will spawn. It also has no idea where it will teleport to when it decides to teleport.
If a target spawns and is immediately at the edge of acceptable targeting range while the player is moving away from it, the script will signal to fire but by the time the shot goes off, the player may have moved outside targeting range and miss.
Missile trajectory changes every 36 frames to head straight for the player's current position. The current script assumes missile trajectory is static which leads to many missed shots.
Thank You
Thank you to everyone who watched the TAS and read my notes on it. This is the TAS I am most proud of to date, and will probably be the last one I submit for a long while.
eien86: Replacing with full length movie provided by the author
eien86: Awesome work; it's always great to see different ways in which games can be botted. You can tell a lot of effort has been put in this one and it shows. The result looks -- if anything for its length -- beyond what manual TASing would deem reasonable.
The goal makes sense, since this game seemingly has no ending, so reaching the positive maximum score possible is the natural alternative.
Joined: 1/24/2018
Posts: 371
Location: Stafford, NY
Yeah, I've poked around with this game just to see how far I could push it (and that indeed "deathless" is truly possible with TAS tools), but I would always get bored after a little while of manual positioning and shooting and move on to another project. I guess now I won't have to worry about this one anymore. :)
EDIT: I should mention that this game in general is very laggy (due to sound effects and the computational overhead for calculating trajectories, etc.) but trying to engage in lag reduction would be 100% a waste of time IMO.
c-square wrote:
Yes, standard runs are needed and very appreciated here too
Dylon Stejakoski wrote:
Me and the boys starting over our games of choice for the infinityieth time in a row because of just-found optimizations
^ Why I don't have any submissions despite being on the forums for years now...
Joined: 11/14/2014
Posts: 996
Location: South Pole, True Land Down Under
I love seeing runs that are too cumbersome to TAS, being destroyed like this by a BOT. Way to go Winslinator!
I recently discovered that if you haven't reached a level of frustration with TASing any game, then you haven't done your due diligence.
----
SOYZA: Are you playing a game?
NYMX: I'm not playing a game, I'm TASing.
SOYZA: Oh...so its not a game...Its for real?
----
Anybody got a Quantum computer I can borrow for 20 minutes?
Nevermind...eien's 64 core machine will do. :)
----
BOTing will be the end of all games. --NYMX
one thing that immediately came to mind is whether the bot could learn how to warp closer to targets, especially ones that it would otherwise miss. Of course, warping probably also affects all future target spawns.