Week 8 - Basic Level Blocking


Initial Implementation

This week's checkpoint was basic level blocking, and as the layout of the levels in this game are not very complicated, most of the work needed to build the levels was already completed in the previous weeks. The player's start, planet location and obstacles were already in place. New additions made to the level design include a new obstacle in the form of a large circular rock which remains stationary and kills the player when hit, and the proper implementation of random obstacle generation.

I anticipated the level generation script to be a tricky thing to get working, but thankfully it didn't end up being too difficult. In short, the script cuts up the length of the level into "segments" and places a single obstacle in each. A segment represents a particular slice of the level's area, then an obstacle is picked randomly from a list and placed at a random position inside the segment. Right now there are only two kinds of obstacles (there may be more later), however the chance of one of these obstacles appearing in any particular segment is not 50/50. I can specify exactly what quantity of each type of obstacle should appear in the level, then those objects are fed into a list, meaning if I had chosen 10 debris and 5 large rocks to appear in the level, the odds are not evenly split, and every time the script will pick a single item from the list then remove it so it cannot be picked again.

Before: manual placement of obstacles


After: lines showing approximate segment boundaries


The way this level generation script is set up allows me a good deal of control over the composition of the level in terms of:

  • What obstacles may appear
  • What quantity of each obstacle may appear
  • The number of segments the level will be divided into (the more segments, the more obstacles)

The script may also be used to generate obstacles for a level of any length - it is not reliant on static values.

Some script parameters


Additional Changes:

  • Camera offset adjusted so the player can see further ahead
  • Player now resets back at the start of the level after crashing
  • Added a destructible force field around the planet
  • Added intercepting missiles which follow the player
    • Added warning icon which appears at edge of screen when missiles are near
    • Added a special particle effect when the missile kills the player (more of this to come later on!)
Gameplay showing new missile, explosion and warning icon


Player Feedback

There wasn't any feedback with regards to the level layout specifically, and I hope this indicates that the players are understanding the design easily enough.

There were two main pieces of feedback from this session:

  1. Deceleration speed is too slow to allow for effective dodging
  2. Homing missiles don't point in the direction they are heading after passing behind the player

The first point of feedback refers to the player controls, more specifically the difficulty in dodging obstacles and the sluggish deceleration. Movement controls is a common area of feedback so far, and because it is the central concept behind the gameplay, I definitely need to do some tweaking here. I don't want to make dodging too easy, but if the controls don't feel satisfying then they need to change. To address this, I'm going to have to play around with the deceleration and steering speeds to figure out something that handles better but doesn't remove too much of the challenge.

The second point is a pretty obvious graphical oversight on my part. I can make the missiles point in the direction they are heading, however I think it is an interesting point that they only face the wrong direction after having passed by the player. This makes me lean towards removing the homing ability of the missile once it has missed the player, as a clear indication that the missile will not come back and chase the player from off screen (which it doesn't). This will also bypass the graphical issue.

Leave a comment

Log in with itch.io to leave a comment.