You are browsing as a guest. Sign up (or log in) to start making projects!

2h 26m 20s logged

#Development-Log #6 - The wall counters attacks

I have resumed working on new features as the execution file and the game were successfully submitted. Three new mechanics were introduced and the last one is a boss.

Resonant tunneling

The maximum charge used to be the ultimate solution to every wall situation but not anymore. Now, there is a secret hidden charge point behind every wall. If you release the charge near it, then the success percentage goes to around 95%, which explains the process of resonance tunneling in real devices with double barriers. The transmission through barriers increases at certain energies but not as it has been until now (increasing).

The problem is that the charge point is not observable. If you press O, you see the wall with the flashing charge indicator. Due to this action, you will lose one chance, which is unfair. Still, you will have the knowledge that can be applied the next time you encounter the wall.## Wave position

Tap Q to shift into the wave position. While in this form, you move at half speed and can pass through thin walls; however, you can’t charge while in this state. Press Q again to revert to being a particle, something you can’t do while inside a wall, creating a real choice between the explorer path or speedier route.

Title screen, rephrased

The previously written title screen had become obsolete due to the new controls, so I had to rewrite it as a loop containing various lines. Now, to introduce a new control, all I have to do is add just one line instead of a physically placing the lines.## Boss wall

The last wall is a boss. It’s wide and has three layers:

  • Each successful tunnel peels one layer and the wall physically shrinks, from 180px to 120px to 60px, then it’s gone.

  • A failed attempt makes it regenerate, and all three layers come back. You need three tunnels in a row.

  • Observing it never heals it, so you can scout the sweet spot safely.

  • Beating it gives +10 score and +10 seconds.

  • It’s the one wall that doesn’t get entangled with another.
    A wide wall’s normal odds are tiny, so the boss is really a test of whether you learned resonance. Finding the sweet spot is how you beat it. It’s still on its own branch so the shipped version stays untouched while the review runs.## Mistakes I made

  • I mistakenly entered a line of code meant for a loop into a class method, thus when the game launched, it crashed because the variable was undefined there.

  • I referenced an audio file that had not been defined, which caused the game to crash with the first incorrect trivia question answer.

  • The code related to the boss wall contained four errors at once: self_defeated instead of self.defeated, pygame.draw_rect instead of pygame.draw.rect, is defeated instead of .defeated, and boss_msg_timer instead of box_msg_timer. Each of these errors made the game crash only when their line was executed, so I identified them one by one at each launch of the game. Next time I will run pyflakes first because it is able to find and let know about errors and mistakes before I actually run the game.

  • I pushed the boss wall code into the main branch instead of an appropriate branch. Although I was lucky, because I made the branch after committing the document, I make sure I run the command git branch before committing it next time.

0
38

Comments 0

No comments yet. Be the first!