Thank you for your reply. I realized how mammoth of a task this is so I think I'll just try to get better at gba dev in general while making games with butano. But, I'll try to make my code modular and have my own tools to help me. Thanks.
Hello. I have made a GBA game before using butano and have general game dev experience with Godot. I want to learn to make a gba game engine but I don't know how to begin or how to go about it. I am not very good at cpp and had a tough time making the game with butano but I am looking to learn.
Yes, thank you.
My Code:
#include "bn_core.h"
#include "bn_log.h"
#include "bn_sprite_ptr.h"
#include "bn_sprite_items_egg.h"
int window_x = 240;
int window_y = 160;
int main()
{
bn::core::init();
bn::sprite_ptr egg_sprite = bn::sprite_items::egg.create_sprite(0, 0);
int direction = 1;
int speed = 1;
while (true)
{
// how to print egg_sprite.x()
if ((egg_sprite.x() >= window_x / 2))
direction = -1;
else if (egg_sprite.x() <= -window_x / 2)
direction = 1;
egg_sprite.set_x(egg_sprite.x() + speed * direction);
bn::core::update();
}
}
I tried bn::log(egg_sprite.x());
but it gave me this error: no suitable user-defined conversion from "bn::fixed" (aka "bn::fixed_t<12>") to "const bn::istring_base" exists
.
I checked out the logging example for butano, but I was so confused and couldn't understand the code.
Thank you.