July 01, 2025
this session, I added a shield powerup. This was relatively easy, and I also added a new sprite with a shield look that updates when the shield is active. I got the code to work by adding to the if statements, that health is only lost if the sheaf condition is false. Next up, add visual timers for the powerups.
I spent this session making a health boost. I started by making a sprite and drawing it onto the screen at a random spot. I then used the collision detection logic from before to increase the health when the player collects the heart. I then spend the most time making it so the heart would appear randomly at random time intervals. I used the pygame.time.get_ticks() function, but that led to some bugs. I managed to fix it by adding a second condition so the if command only runs once (and is more accurate). I finally got it to work, with the heart randomly appearing at random times, and giving +1 health when collected. Next up, adding a shield powerup (or something else?).
I added a powerup this session. I added an ability to rapid fire for five second on the press of a key. The main problem i faced was the time limit, since I already used a time function for another ability. This time, I had to make another variable for the time to make this work. I also had to redefine the bullet to make sure it appeared on the screen and acted correctly. I also spent some time playing around to see what else I can do to add spice to the game. (For example, I played around with changing the screen size as a power up). Next up, more powers, or adding limits to using powers. (or other pickup able things).
This session, I added a health bar. I used the draw function to make a rectangle, and changed the width of the rectangle based on the health value. I also positioned the health bar so it follows right above the player. Then I added an end screen if you lose all your health. I made so it shows Game Over and then your final score. I also made it so the health bar only shows once you take damage. Next up, making the game harder and more adaptive (and possible adding more abilities).
In this session, I added text to the screen to show the score. I started by using a new file to test how to add text, and then incorporated the code into my game file. I changed the size, color, and layering so the score is shown as part of the background. I also made it so the score increases every time you hit an enemy. Next up, adding a health bar.
This session, I added collision detection to my game. I started by trying to use masks, but that was too complicated and did not work. Instead, I decided to use make a rect for each object and detect that. The main problem I faced was detecting all items in a list, no just the latest one. I fixed this by adding the detection in the action in creating each object (using a nested loop). After detecting collision for the projectile and enemy, I coded it for both that projectile and enemy to disappear. I used the same logic to detect player/enemy collision and remove the enemy if that happens. (with some troubleshooting so it detects at all times). In the end, I got the collision detection to work and applied actions if collision is detected. Next up, adding code to change score/health and display them on the screen.
I worked on adding enemies to my game. I then made it so the enemy will always follow the player around. I also made it so the enemies randomly spawn inside the screen. Then, using the lists I learned about last time, I made a list to spawn a certain number of enemies at a time, all of them following the player. Next up, add collision detection for taking and dealing damage.
This session, I worked on adding a projectile. I started by drawing a simple circle, and coded it to appear on the position of the player when I press a key. Then I used trig to code the projectile to move toward the mouse. Since I am new at python, I worked step by step, first making a circle, then changing the location, then moving it, then aiming it. I also drew it multiple times to add a blur effect. I wanted to make multiple projectiles, so doing some research, I learned about lists. I learned how to use a list and made one to launch multiple projectiles. I updates the code and tweaked a few things and finally got multiple projectiles that launch at the mouse.
I replaced the circle with a custom made sprite. Then I had to figure out how to rotate the sprite to face my mouse. After doing this, I wanted to add powerups. I wrote a script that increases the speed of the player after pressing q. I wanted it to only last a few seconds, and after some research how to do that, I was able to accomplish a powerup activated for a limited time. Next up, add a projectile to launch.
I started making my first python game. This is the first time I am making a game in python, so it is taking some time to learn the mechanics. I manages to make a screen and player, and move the player using the wasd keys. I also set a boundary so the player does not leave the screen. Next up, make a sprite and rotate it.
Fixed a few glitches in the code (like in puzzle three, there were false collision detections). Re-uploaded to GitHub and updated page to host website.
Moved the code to GitHub and created a GitHub page to host the website game.
I worked on the last page of the website. I wanted to add an animation affect and counter to the page. The counter was easy (I learned the difference between const and let in javascript), but the animation took a while. I got it to work, but then scrolling messed it up. After doing research on how to fix it and some trial and error, I eventually got it to work how I wanted. I also added a button to the bottom to take you back to the start. Done with the site. Now just a final test before shipping it.
I made the final puzzle. I decided to add a text input element and draggable pieces. The text input element and the javascript to recognize the correct code was easy. Making the draggable pieces was slightly harder, but I eventually figured out the javascript. The thing that took me the longest was figuring out the dragging feature, and then position every draggable element on the page. Using html, css, and javascript, I was able to make a dragging feature with a text input.
Finished working on the fourth puzzle (one more to go). This one was much quicker and easier than the previous two since the style and format was similar to the first puzzle. While I used the same code from the first puzzle, I had to adjust the CSS to accommodate for the large texts on the 4th puzzle. Did this by changing the class name of the element I wanted to change and adding new CSS code targeting that new class. (Now I have to think of the hardest puzzle for the final one)
I worked on make my third puzzle. This was a challenge since I wanted to add moving elements, user interaction, and collision detection using javascript (I have very little to no experience in these). I worked step by step, coding one thing at a time. I started with moving the character, then I added collision detection. I used copilot to help generate some base code, and then modified the code, adding and removing parts as well as changing parameters. In the end, after a lot of trial and research, I got the third puzzle to work.
I worked on my second puzzle. My first challenge was that I wanted an image to move when I hovered over it. With some research, I used JavaScript to make this happen. Then, I wanted to add a shadow and flashlight effect, which was hard. After using AI (and trying multiple times), I got a base code I was able to manipulate to work. I finally got my second puzzle to work.
I finished making the second (or officially first) puzzle. I also made a page you get redirected to if you fail, and then it redirects you to the home page. One challenge I faced was getting the buttons to make a grid pattern. However, after some trial and error, and looking at my previous projects, I managed to make it work.
I worked on the home page, where the user will do their first puzzle. I made a css file to make the page look nice and add some hidden elements. I also made my next two pages and linked them to the first page, finishing the welcome screen.
A webpage based puzzle game where you have to solve riddles and puzzles to advance. See if you can answer all the questions correctly and reach the final treasure.
This was widely regarded as a great move by everyone.