Day 4 it is (was), so time for another small update for yall! I was a small busy bee on streams, so there were major additions compared ot last time!
Treasure system
The game was extended with the items you will need to sort! Treasure were added with different sprites and gems styles. At this point I did not realize a problem with this, but we were happy that now there were items spawning, and the player was able to pick them up and put them down!

The code itself for this isn’t that complicated. I have a dedicated “pick things here” zone marked for the player with the dot you can see. Then when you press the button I do an AABB (Axis Aligned Bounding Box) check, where basically I surround the objects with a rectangle and see if there is an overlap. If there is, mark that I have the item in my hand, and mark the item as picked up. Marked items follow the players position around (with an offset to be on head), and with the button press again, I just reset those values and place the item on the marker. (Direction is just a table, holding offsets for each direction the player can be facing)
local pickup_offsets = {
{-8, 8},
{24, 8},
{8, -8},
{8, 24}
}
local direction_table = {
LEFT = 1,
RIGHT = 2,
UP = 3,
DOWN = 4
}
if input.pressed(input.BTN1) and (not self.itemInHand) then
local pickup_point = {
x = self.x + pickup_offsets[self.direction][1],
y = self.y + pickup_offsets[self.direction][2],
collisionWidth = 4,
collisionHeigth = 4
}
for k,treasure in pairs(TREASURE_HANDLER.treasures) do
if Collide(pickup_point, treasure) then
treasure.pickedUp = true
self.itemInHand = true
break
end
end
elseif input.pressed(input.BTN1) and (self.itemInHand) then
self.itemInHand = false
for k,treasure in pairs(TREASURE_HANDLER.treasures) do
if treasure.pickedUp then
treasure.pickedUp = false
treasure.x = self.x + pickup_offsets[self.direction][1]-8
treasure.y = self.y + pickup_offsets[self.direction][2]-8
end
end
end
As you can see items and icons were differentiated by colors, which honestly should not be the way, because of 2 reasons:
- 1: Technically the gameboy doesn’t have fix colors, you can change palettes, so me saying move green is just not “platform” valid.
- 2: If you have a gold ring with a blue gem, and a blue ring with a gold gem, if I say keep gold rings, which you keep?
The easy fix
The one obvious fix for this is remove the color ambiguity altogether. Switch the colored orbs and gems to actual iconography, so you can always differentiate between them. Now we have circles, stars and moons!
![]()
With this change, there is no confusion anymore. Bring me the circle vase. Keep everything that is not a star etc… I think this will be a major upgrade over the old system, and if I want to, I can package the game with more color schemes now! No promises though!
The other change you might have noticed is that the dragon is now animated a bit. The eyes follow you around! Always wanted this and maybe a rotating head, but the second is not really possible due to jam limitations. Since the GameBoy didn’t have sprite rotations, we are not allowed either and even though I could pre-render the sprites and draw them that way, I feel like that is a bit going around the rules.
Thankfully the eyes were much easier and after a little bit of tinkering the original code it works almost flawlessly. Basically I’m using the atan function to find the angle between two points (the player and a rough point around the dragons head (128, 25)) and offset the pupils by that amount (and a little bit more) so it is moving around more and not just a few pixels.
-- draw dragon eyes
local eye_positions = {
{132, 10}, {148, 19}
}
-- figure angle so it looks at player
local angle = math.atan(25 - PLAYER.y, 128 - PLAYER.x)
-- multiply it so it offsetss more
local angx = -math.cos(angle)*2.5
local angy = -math.sin(angle)*2.5
for i=1,#eye_positions do
local cx, cy = eye_positions[i][1], eye_positions[i][2]
gfx.circ_fill(cx+angx, cy+angy, 5, COLOR.BLUE)
end
Aaaand sadly that is all my progress. Due to work and an unfortunate migraine afternoon my progress is way slower than what I’d like. Hoping I can fix this the next few days, to at least have a vertical slice of the game, so at least I can have a small loop instead of nothing done, but you will have to wait for the next update to see if I’ll be able to do that.
Till the next one, check out other posts here or on my Ko-fi (where my old stuff lives) or here where everything new resides and I’ll see you next time!
HUGE thank you for my current supporters, Csöndi, Nerdy Teachers and Fletch! Thank you from the bottom of my heart!

If you want to support my work you can do so with a price of a coffee! It really helps me find more time to do all this, and keep my hobby afloat.
Until the next article, take care, have a nice day!