Gravity Ace

Respawn System

Thrust on the C64

The original Thrust gave you 3 lives to make it through all of the levels of the game. I sometimes like that kind of challenge when I play a game but I decided early on that I didn’t want to have a life system in Gravity Ace. It makes the game punishingly difficult and the days when I enjoyed that are far behind me. I think that decision gave me the freedom to make the player very fragile, avoid hit points and the healing mechanic that inevitably comes with it, and add the shield.

The player is expected to die a lot because the ship is so fragile and the levels are challenging. The player can take as many tries as they like to pass a level. That combo lead to two more decisions: restarting should be very quick and the player shouldn’t have to start over when they die.

How it works

First, restarting is automatic and it takes just a few seconds. When the player ship is destroyed, the camera lingers so that the player gets a good view of the explosion and destruction. Then the camera makes a quick move to the point where the player will appear again and the warp-in sequence begins. All together it takes about 4 seconds, there are no buttons to push, and the player is back in control, blasting away.

Second, I wanted to make the player appear in an area of relative safety. The assumption is that the place where they were destroyed is dangerous so you want them to reappear at an earlier position. The solution I decided on is checkpoints. But I didn’t want to have static checkpoints designed into each level. So I designed a dynamic checkpoint system that records the player’s position once every second:

func update_position_history():
	if not Game.player:
		return

	var history = { 'position': null, 'gravity': null, 'time': null }
	history.position = Game.player.position
	history.gravity = Game.player.local_gravity.normalized()
	history.time = OS.get_ticks_msec()

	position_history.push_back(history)
	if position_history.size() > 3:
		position_history.pop_front()

The third position back in time is used for the warp-in point – the player is moved back to a previous position, but not too far back. If the player is in a gravity field then the ship is automatically oriented towards “up” in that field. So far I’m happy with it. It’s intuitive, quick, manages itself automatically, and the respawn “placement” is good enough.

Players have just enough time to realize their mistake and make a plan for avoiding it on their next run.

Published September 15, 2019

More devlogs...

Game jams for beginners

3 methods for screen shake in Godot Engine

Creating a custom Fixed Joint in Godot Engine

More...