GameJam Day 5 and 6


Day 5

Today was a lazy day in terms of the GameJam.

Day 6

EarlGrey and I searched for the reason why PNG transparency didn’t work. After some research I found that the loading of my PNG was with the colorkey functionality and I learned that there is the per-pixel alpha variant. After understanding the different modes of transparency I changed my code and it worked as intended.

Then I tried to change the color of the waterfalls and the new made sponge on the fly. The sponge worked as intended because I only needed to replace the white parts with a new color. The waterfalls are indifferent  shades of color so it didn’t work out of the box but it wasn’t really necessary because EarlGrey painted me three separate waterfalls in different colors.

After color changing I implemented resizing of the sprites. And it looked like it’s fine.

Next step was moving the sponge around with the mouse cursor. I discovered that the cursor image format is a little bit special but for now I use the system hand cursor.

After that I looked into mouse movement and now when the game window has the focus, mouse cursor and center of the sponge should move together. The relative movement fits and was synchron but not the absolute position on the screen. I realized that by resizing the image I never updated the internal rectangle and that is where the positioning is oriented. Some try and errors and docu reading later I use now an x and y position variable in my sprite object and refresh the rectangle position in the update function that is called every frame. Because the waterfalls and potential other items (the sponge too when it is not grabbed) don’t move all the time I used a flag if the position should be updated. Now it’s working fine and I made a gif with medium quality I have to say but I think you see what is accomplished today.

Get Farbenfall

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.