← writings

New Prototype: Basically Asteroids


The last prototype was promising, but it felt like it had two competing ideas: collecting items with the tractor beam, and fighting off aliens with various weapons. It was fun flying around and shooting missiles for a few minutes, but I wanted to focus more on the tractor beam mechanics.

I asked Claude to create another prototype, this time in deep space without planetary gravity, à la Asteroids. I gave it the following requirements.md file:

Galactic Repoman is a 2D game where you fly a spaceship around trying to reclaim lost items floating in space. The mechanics should feel similar to Asteroids where you fly around with momentum and acceleration.

However, the new mechanism is a tractor beam that can grab onto objects and pull them towards the ship. The player will use this tractor beam to tow items back to the base.

I want to prototype this idea to see if it's any fun. Here are the requirements:

- [ ] Player can control a space ship by thrusting forward or rotating clockwise or counter-clockwise
- [ ] Player can activate a tractor beam to grab onto whatever the player is facing.
- [ ] The tractor beam can extend a short distance in front of the ship.
- [ ] The tractor beam can latch onto an asteroid or space junk.
- [ ] The tractor beam pulls the towed object towards the ship and the ship towards the object.
- [ ] The player maintains momentum (it is space so there's no friction)
- [ ] The player has a max velocity.
- [ ] There are asteroids floating through space.
- [ ] If the player collides with an asteroid, the player is destroyed.
- [ ] If the player is destroyed, they respawn back at the center of the map.
- [ ] The center of the map has the drop zone where the player should tow space junk.
- [ ] Asteroids can collide with each other. If they collide, they bounce back from each other.

The initial prototype came out pretty good, but the acceleration and tractor beam forces were too high. Claude added a panel for tweaking the inputs during runtime.

Even after that was fixed, I still didn't like the spring-like forces of the tractor beam. Preventing an object you're capturing from smashing into your ship seemed like it shouldn't be this hard.

The last iteration changed the spring-like tether to act more like a rope. The rope had a fixed length, and if two tethered objects were closer than that length, the rope was slack and they didn't exert any force on each other. The object could drift towards the ship without being actively pulled toward it. However, as soon as the rope was taut, the objects would start pulling on each other.

Here's the final version: HTML Prototype

Ship flying through space, looking for space junk to return to my home base

I ended up playing around in this prototype for 15+ minutes, dragging space junk to my home base over and over again for no tangible gain. Being able to tether both the junk and the asteroids was fun, as the asteroids have much larger mass and exert more of a pull on the ship - it really feels like you're dragging something massive. It allowed for fun tricks like slingshotting around asteroids at high speeds, or whipping space junk in circles before sending it careening through deep space.

Even though I knew collecting this stuff didn't do anything, a part of me was hoping to turn space junk into space credits so I could upgrade my ship. That feels like something for the next iteration of this prototype.