mesyeti
Home | Page list | Contact me
Sunday log - December 15th to 21st
I spent this week working on Arkas Engine, my 3D engine meant to be a spiritual successor to Ken Silverman's Build Engine (used to make games like Duke Nukem 3D, Blood, Shadow Warrior)
NOTE!! My awful markdown->html compiler makes the code blocks very ugly. Hoping I get around to replacing it next week
Arkas engine
Audio
I finally got around to setting up the audio system from PlatinumSrc (a project made by a friend, with some nice 3D audio). He also gave me some nice public sound effects, which are now included in the public domain Arkas Engine asset pack.
I also added a simple music API to the engine for games to use:
bool AudioMusicPlaying(void);
bool AudioPlayMusic(const char* path);
void Audio_StopMusic(void);
UI
I also worked on a retained GUI for the engine. Each scene has one UI manager structure which contains multiple containers. Containers contain rows which contain a variable amount of UI elements. I use this table-like structure because it will be easy to implement UI navigation for controllers (apart from the issue of switching focus to another container..)
Here's what the UI looks like:
And this is the code that makes that UI:
static void Init(Scene* scene) {
UI_ManagerInit(&scene->ui, 1);
UI_Container* container = UI_ManagerAddContainer(&scene->ui, 512);
UI_ContainerCenterX(container);
UI_ContainerAlignTop(container, 10);
UI_ContainerSetPadding(container, 5, 5, 5, 5);
UI_Row* row = UI_ContainerAddRow(container, 24);
UI_RowAddElement(row, UI_NewLabel(&app.font, "hello!", 0));
UI_RowAddElement(row, UI_NewButton("manul button", false, &ManulButton));
UI_RowFinish(row, true);
}
Future plans
I plan on making a map editor next, and I want to add collision to the engine