DEV Community

Aby Noctel
Aby Noctel

Posted on

Weekly Update #8

This week I come here bringing good news!

What I Learned/Did

  • I learned how to handle game over state in a way that the game doesn't automatically close when the condition is met. Instead I made it display a game over text somewhat in the middle of the screen to indicate that the game is indeed over.

  • I learned how to randomize ball spawning and how to enumerate the different types of balls to spawn in the game.

Problems I Faced

  • One problem was with handling player score and hp, they would get mixed and would increase/decrease weirdly

  • Another one was when implementing random ball spawn, all of the spawned balls would be white and you couldn't tell which is which. Later on all of them became RED balls which are the SPIKE variant, so you'd just lose the game.

  • The last problem was with how to display the GAME OVER text in the middle of the window, I tried halving the width and the height of the window size but it doesn't seem like it works because the text would start from that position and I'm guessing the top left side of the text would start from the middle as well cause the whole text was a bit to the left and down when I tried that

Important Notice

  • I have an idea to make a small game of my own, dunno how long it would take but as always, I will keep you all updated on the progress.

  • If any one of you have an idea to help me with the displaying GAME OVER text properly in the middle of the screen, please let me know! I will really appreciate the help ^^

Until next week, stay safe, be good to one another, and I'll see you all again soon!

Top comments (0)