gbadev
Game Boy Advance homebrew development forum
copyrat90profile picture

copyrat90

Member
Last seen 1 year ago
Joined:
Posts:
9
Topics:
2

It seems that it's not possible to embed videos in posts now.
It would be nice if video embedding is supported. (youtube videos, direct link to .mp4 files, etc.)

Recently, I've been reading the SFML Game Development book.
It covers a lot of topic about gamedev from scratch, including state stack based Scene class, GUI, command pattern, etc.

As a practice, I'm going to port Creepy Castle to the GBA, using Butano engine.

As it's an unauthorized port, I won't release it other than some video recordings...

Nothing much, only the GUI stuff for now;

The button implementation is a copycat of this menu implementation, but I'm not dynamically allocating it.

// buttons as member variables of the scene
ui::Container<4>           _uiContainer;
ui::SaveSlotButton         _btnSaveSlot[SAVE_SLOT_COUNT];
ui::IconTextButton<1, 4>   _btnBack;
ui::IconTextButton<2, 8>   _btnDeletion;

// initialize the buttons
_btnSaveSlot[0].setSaveFile(&_fakeTestSave1);
_btnSaveSlot[0].setPosition(SAVE_SLOT_BTN_START_POS);
_btnSaveSlot[0].setCallback([this]() {
    reqStackPop();
    reqStackPush(SceneId::GAME);
    getContext().saveFile = &_fakeTestSave1;
});
...

// add the buttons to the container
_uiContainer.addElement(&_btnSaveSlot[0]);
_uiContainer.addElement(&_btnSaveSlot[1]);
_uiContainer.addElement(&_btnBack);
_uiContainer.addElement(&_btnDeletion);

I'll work on loading 16x16 meta-tile based tilemap on this week.