What I Learned in 100 Days of Game Dev - WIP

This is an ongoing article about my experience and learning over 100 days of game dev. #100DaysOfGameDev

What I Learned in 100 Days of Game Dev - WIP

On June 23, 2024, I started a challenge to complete 100 days of game dev. The goal was to either work on my game or learn some functionality I needed for my game in Godot or Blender for 100 days. I wanted to try to work/learn for at least 30 minutes a day. If I missed a day, I wanted to do everything possible to avoid missing two in a row. I also wanted to document my progress with screenshots, gifs, videos, etc. This is an ongoing log of my progress and what I've learned.

Day 1 - Blender, task list

My current focus is to improve my prototype to the point where I can figure out if the game is fun. To do this, I still have some features to add, I also have to work on overall game feel. One initial thought I had to help with this was to work on the overall scale of each item to make sure they were all in line with what I expected.

Top down image from blender objects to figure out the scale of each object compared to the others.

I also played around a bit with the base design of the paddle.

Later that day, I wrote a task list to help have a plan of attack for updating the prototype. Some of the tasks will likely be post prototype, but many of the tasks I have will be excellent to work on during the prototype phase.

I also ended up watching this video which talks about Blender from the perspective of game dev. Surprisingly enough, there aren't as many videos out there as I would expect. Many videos are focused on learning blender and having the 3d modeling in blender be the end goal.

Day 2 - Second paddle and improve impact of collision to moving bricks.

For Day 2, I added a second paddle on the opposite side of the stage and introduced some code to inverse the direction of it so it would go in the opposite direction of the bottom one. I ended up commenting this code out later as it was being a bit odd. I also feel like it was awkward to have the paddles go in the opposite direction.

Second paddle added

I also updated the logic so that when the ball collides and applies force to a brick to potentially move it, that would use the remainder of the ball's velocity as opposed to applying the force from the center.

Day 3 - Refactoring setting brick colors

One thing I noticed was that since I was setting a material as local to scene that I was using many copies of it as opposed to one. I did some refactoring to try to help with this.

I tried a resource, child nodes, and a few other options. I suspect I'll have to work on this more in the future. I will likely end up using a shader to do this and that may change what I have to do. This was bad in that it was refactoring too early.

Godot 4 interface showing new child nodes, some code, and mesh properties

I need to organize things a bit better to keep more focused on the important tasks.

Day 4 - Shaders

On Day 4 I started exploring shaders:

A visual shader that sets the color of the material and also adjusts the alpha depending on another variable

The above is a visual shader. If you don't know what shaders are, they are used by the GPU to draw specific things pixel by pixel. Often times these are VFX. If you see a cool effect in a game, it's most likely a shader.

The above shader sets the color of the material (this one is for the bricks) then will adjust the transparency (alpha) depending on if that color matches a separate color. I ended up having to change the "All" dropdown to Any to get it to work. Realized that on Day 5.

Day 5 - Level Creator Tool

I've been thinking about how to approach this for a bit. Day 5 was my first crack at it. Ultimately, this isn't done, but it is a solid starting point. My biggest issue with the current implementation is I'm unable to stagger the bricks. I'm only able to stick to the same vertical lines.

Gif showing me add to bricks to a level creation tool

Day 6 - More Level Creator Tool

I tried a few different methods to get the level creator to work better. No luck yedt. I may try an approach using two gridmaps and then instantiate the scenes from there. Not ideal, but would be helpful in laying out levels. I was able to add a way for me to save off the bricks I add as a level by itself. This will let me easily instantiate it later. I will need to tweak this just to make it flow a bit better I think.

I also updated the paddle to use a shader and laid the groundwork for the ball to as well.

Code for saving a set of nodes as a scene.

Day 7 - Adjusting overall game feel and explosions (sorta)

On Day 7, I worked on adding the explosion idea I had for my bricks. Certain bricks can be marked to explode and when destroyed they can potentially take out other bricks. There isn't an explosion effect just yet, I have to look a bit more at the best way to create that.

I also adjusted some of the overall feel of the game. One thing that can frustrate me is when the ball starts to bounce nearly horizontally or vertically and you end up having to wait quite a while to actually do anything again. I made it so after 3 bounces like this, the ball would adjust to go more towards the bricks/paddles so you could start playing the game again sooner.

I also added a lot more bricks just to see how the game performs and how it feels.

Added more bricks to check performance and game feel

Day 8 - Menus and bug squashing

Not as much progress on day 8. I added some basic menus just and will tweak them in the coming days. I also worked on squashing a few bugs that had crept in.

I tweaked a bit on the overall game feel including adjusting the angles for the wall bounce mentioned in day 7.

One big adjustment is I decided to adjust how the colors interact. Previously, you had to make the ball the same color as the blocks to hit them, but I felt like this ended up making it a bit harder to keep track of the ball. So I adjusted it, you need the opposite color to hit bricks. So if the ball is orange, it can break blue colored bricks.

Adjusting the angles of the wall bounce