looking up and loaf mode. 🐱🍞
looking up and loaf mode. 🐱🍞
whiskers picked up a power star. 🐱🌟
little fan goes brrrrrrr.
#GameBoy #GameDev #PixelArt #RetroGaming #Nintendo #ProjectWhiskers
is the core gameplay for a minimum viable product working? no.
but can you chill about enjoying falling autumn leaves? HELL YES.
#GameBoy #GameDev #PixelArt #RetroGaming #Nintendo #ProjectWhiskers
I thought I was being clever by passing around pointers to values, but a pointer is 16 bits, vs 8-bit for a value. so you gain nothing unless for structs/arrays.
in fact the generated assembly got a lot smaller by removing the excessive pointer use. recovered a good 1Kb! :)
also learnt you can align sprite tiles in memory to state enums, so you can do:
set_sprite(first_tile + player_state);
this saves a lof of space because no large switch/if statements needed.
lots of space savings with pointers to structs by using a local proxy variable:
a = thing->a;
b = thing->b;
// do stuff with a/b
thing->a = a;
thing->b = b;
oh also! group tiles of the same type together in VRAM so you can see if one is if a type. for example:
bool tile_is_solid(tile)
{
return (tile >= 12 && tile <= 24);
}
instead of
bool tile_is_solid(tile)
{
return tile == TILE_SOLID1 ||
tile == TILE_SOLID2 ||
tile == TILE_SOLID3 ||
// etc...;
}