loading...
Cover image for Power-ups, Sound Effects and Level Progression!

Power-ups, Sound Effects and Level Progression!

rcarlson profile image Robert Carlson ・3 min read

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.

TLDR;

Demo of me playing around in my game :)

Removing Asteroid Collisions

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.

Alt Text

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.

Alt Text

Alt Text

Adding Levels

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()

Adding Scoring

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.

Alt Text

Increasing Difficulty With Each Level

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()

Added an Insta-Kill Powerup

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.

Alt Text

Adding a Death Component

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.

Alt Text

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 :)

Added Fly-in!

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!"

Alt Text

The Sound Effects are Nice!

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.

Whats Next

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 :)

Playable Download

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 :)

download game

Posted on by:

rcarlson profile

Robert Carlson

@rcarlson

Husband, Father, Coder, Gamer, Co-Founder LetsBuild.gg

Discussion

markdown guide
 

Here's what I've got after playing it for about half an hour!

  1. Easy to pick up
  2. I found it a bit frustrating when my ship went off map and popped back up on the other side. Maybe I was just moving to quickly, but that was a recipe for disaster.
  3. I think there has to be a limit to how long you can fire the laser continuously. I was able to get through most of it by just spinning around and holding laser while sometimes moving around to avoid stuff.

Other than that it was a good combo of easy to pick up, challenging enough to make me play it a bunch of times without really thinking about it, but not so challenging that I rage quit.

 

The sound fx remind me old arcade games!

 

Yeah, some of them are almost to reminiscent of Mario :) I might change a few, but the 80s vibe is definitely what I'm going for!

 

Nice, I’ve always wanted to try godot but i dont want to learn a new programming language.

 

GD script is not as bad as you might think. I came from a C# / Typescript background and the transition was very natural. What engine are you working in? Unity? Unreal?

 

Im working in unity, i was thinking of using unreal but im not as comfortable with c++ as C#. I’ll have to try out godot for my next project :)

 
 

The progress is looking good. It really feels like its coming together. πŸ˜„

 

If your using Windows make sure your display zoom is 100%, mines at 125% and the hud is hidden.

 

I'll see if I can figure out why zoom impacts hud visibility in next build. Thanks for the heads up!

 

So far I have not been able to make it past level 11!

 

The download was broken, fixed it by just giving you all the files! I'm still not sure how to properly export in Godot :) enjoy!