A lil pong game
- 3 Devlogs
- 4 Total hours
Kind of a pong game that I will recreate from absolute scratch. Time for me to learn some basic python :)
Kind of a pong game that I will recreate from absolute scratch. Time for me to learn some basic python :)
So today I basically had to deploy the game and boy was it hard. Since, I was using pygame I had to convert everything into a web format so I had to learn how to use pygbag and let’s just say it was almost a disaster. At first in my local host 8000 nothing would even load and I had to keep on trying to debug it and changing my main.py code. It was really tiring but the moment I got it to work I was super happy and I couldn’t believe it. Then, the next part was making a workflow that github can use in order to deploy it as a webpage, and there another set of bugs did pop up as I forgot that github uses linux so it’s case sensitive. After finally fixing it, I’m very happy to say that my first ever lil python game is online! Feel free to check out the simple game that almost fried my brain here: https://bangzishu-huang.github.io/A-lil-pong-game/ :)
I was basically able to finish everything I was doing. I started off today by adding an opponent paddle and this was just a simple machine where it would calculate the distance and the ball. I slowed the movement down a bit so sometimes it could make mistakes (resulting in the player winning!). Then, I added more features like score, data storing, and also a menu on start! I also found that the colors I picked were a bit unsettling to my eyes so I turned everything into blue and banana colors! I also add some subtle details which included the shadows of the paddles and also the ball. This was my first python game made and I’m very happy with how far I got! Can’t wait to see where this start will lead me :)
Worked on base, movement, and some collisions for my initial idea of recreating a pong game all by scratch. I would say I’m pretty new to python, as I just learned it 2-3 months ago and this was a cool little project for me to develop my python skills. Today, I just worked on setting up the pong objects, and also worked a lot on collisions. It was pretty hard trying to figure out how to get moving collisions to work on all 4 sides of the player paddle, but I was glad I was able to learn! Next steps I would want to make an opponent paddle and hopefully integrate an automated paddle to play against.