Hey everyone! It's been a week since my last devlog and for the first time I feel like I have a game and not a prototype! There was a ton that I did so lets get going!
By the way, I still don't have a name for this game, so if you have any suggestions please leave a comment below.
Demo of me playing around in my game :)
Turns out my bright idea for making asteroids difficult to predict by having them collide with each other made the game crazy hard. Allowing the asteroids to pass-through one another allowed my brain to manage 20+ asteroids on the field and I really liked the way the game felt with more asteroids.
I probably spent 3 days trying to figure this out how to make asteroids collide with the ship but not themselves. Turns out Godot has a neat feature where you can specify what layer you occupy and and what layer you collide with.
Level progression is pretty basic. I have a spawner that is configured to generate a specific number of asteroids over time. Once the spawner has created all the asteroids I set
spawner.exhausted = true. The player then is responsible for destroying the remaining asteroids. Once the level is cleared I reset the spawner and the level increases.
func _process(delta): if over == true: gameover.visible = true if Input.is_key_pressed(KEY_R): get_tree().reload_current_scene() if spawner.exhausted == true && spawner.get_asteroid_count() == 0 && levelClearTime.is_stopped() == true: levelDone()
Even with levels, I wanted to give player something more precise to measure how they are doing. I decided to add a simple scoring element that gives the player points for destroying asteroids, picking up powerups and completing levels.
With each level I try to make the game harder by tweaking the number of asteroids, frequency of spawning and overall speed. Here is a bit of the code I use to make the levels more difficulit after a clear. You can see at a certain point I stop modifying the variables.
func _levelClear(): levelClearTime.stop() levelClearLabel.visible = false level = level + 1 points = points + 1000 if level <= 20: spawner.maxSpawned = spawner.maxSpawned + 5 if level <= 10: spawner.minSpeed = spawner.minSpeed + 0.125 spawner.maxSpeed = spawner.maxSpeed + 0.25 if level <= 5: spawner.spawnTime = spawner.spawnTime - .1 spawner.reset_spawner()
This is where the game started becoming really fun! I modified the spawner to have a 2% chance to generate an insta-kill laser powerup. This power-up gives you insta-kill on asteroids for 15 seconds.
When you die I added a simple restart mechanism. Right now there are 2 ways to die. 1) you run out of health and 2) you run out of fuel.
Fun fact: when play testing this feature I ran into a bug where you can run out of fuel and die, but if you just wait eventually a fuel canister will spawn and bring you back to life. I fixed this bug by disabling fuel pickup after you die :)
I wanted to add a fly-in to give the player a sense of purpose when the game first starts. It's not much, but simply by having the ship fly-in for the first few seconds of the game communicates to the player "you just entered an area of space filled with asteroids! Try to survive!"
Probably my favorite part of this week was adding sound effects. I tried a few free ones, but I didn't like the tone of the game. I ended up purchasing a monthly license to a sound site where I was able to download a bunch of royalty free sound effects.
I want to add some more powerups, maybe a shield! Also the powerups need to show duration while you have them. I plan on tuning the difficulty and maybe adding camera shake if you get hit. Next week is all about the fine tuning :)
From this point on I will include links to download the game. Checkout this version using the link below!
Controls: arrows for movement, space for shooting :)