My first game


This is my first game, and it is a simple pong clone. I know, not exciting. Some of the main challenges I faced were:

0. I wanted to use Google as a last resort; instead I tried as much as possible to rely on my own judgement & Godot documentation. Pretty self-explanatory. And when I did resort to Google, I made sure to not:

  • copy paste code
  • use somebody's suggestion/answer to the problem if I did not understand it

This advice is so wide-spread that it's practically a cliche at this point, but it truly helped me understand what I am doing a lot better.

1. I do not have a programming background & I am terrible with math. I know my way around computers/tech/documentation, and I can manage writing scripts. But designing systems is something entirely new & strange to me.

I really struggled at first with coming up with the (basic) math for accelerating the paddles, making the ball change direction dynamically and controlling the opponent AI.

What really helped me out was to define what exactly it is that I wanted. For example, I wrote the definition to acceleration, and how I would calculate it. Funnily enough, I thought I got it wrong, because I did not understand how to plug it into the movement of the paddle. So I went to Google and, lo and behold, I got it right :) That was a nice confidence boost.

Some other questions were: 

  • how do I want the ball to behave when colliding? 
  • how can I design an AI opponent that is not a perfect opponent, but also not random? What does that mean? Does it need to anticipate where the ball will be, or is an approximation good enough?

2. I can't organize my work. The project & code is pretty much a mess. There's signals all over the place. I am confident that I can improve this with some time, especially once I get more practice with Godot's tools. But right now, I bit off more than I could chew. I dipped my toes in a lot of areas that I had no clue about, and that made it harder to keep everything neat.

Perhaps all the collisions & signals did not need to originate in the ball? Perhaps I could have written some function to handle the movement, and reuse it between the player & the opponent? Perhaps. Perchance.

3. Godot is new to me, and I am new to it

It took me several hours to wrap my head around its design philosophy of Scenes - Nodes and Signals. At first, I lost my progress on several Scenes because of some weird parenting changes I made. But I did end up liking Godot's design. Towards the end, when I wanted to have SFX play on collisions, I implemented 90% of it without any outside source of information. I had to resort to the documentation because I didn't know how Godot handles string interpolation - so I can play some random sounds when hitting the walls. Besides this, the whole process was pretty much intuitive thanks to what I had learned until that point.


Closing thoughts:

I have to say that I love how the engine is committed to the same design pattern everywhere. Signals are also an interesting & new concept to me, even if they did lend a bit to the chaotic/spaghetti project structure. I really can't see this game become bigger in a sustainable way. Luckily for me, I don't plan on working on it anymore.

At first I hated it, and wished to try Unity again, but hey - I never made anything with Unity. And with Godot, I had a finished game in front of me. 

This engine is pretty fun, intuitive, lightweight and well documented. Compared to Unity: so bulky & packed with features that I frequently got stuck in the analysis paralysis phase and never got anything made.

This is the furthest I have ever gotten while making a game by myself. I really enjoyed the process, and my appreciation for FOSS grows stronger every day.

Files

epilepong.zip Play in browser
Feb 01, 2024

Leave a comment

Log in with itch.io to leave a comment.