Compare commits

...

6 Commits

Author SHA1 Message Date
45e3bc83a9 Update README.md 2025-05-31 03:08:38 +01:00
40b5bb1634 Add README.md 2025-05-31 03:08:26 +01:00
054a3bbdd7 Update .gitignore 2025-05-31 03:06:46 +01:00
Abdelrahman Said
f8b859b4e8 Fix submodules 2025-05-27 15:22:52 +01:00
Abdelrahman Said
d94c7f8c63 Switch to using https for submodules 2025-05-27 15:20:50 +01:00
Abdelrahman Said
cdb02bd209 Enable rendering 2025-05-27 15:06:51 +01:00
5 changed files with 16 additions and 12 deletions

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@ raylib-build
*.data *.data
*.ods *.ods
*.dSYM *.dSYM
*.out

4
.gitmodules vendored
View File

@@ -1,6 +1,6 @@
[submodule "wapp"] [submodule "wapp"]
path = wapp path = wapp
url = git@git.thewizardapprentice.com:abdelrahman/wizapp-stdlib url = https://git.thewizardapprentice.com/abdelrahman/wizapp-stdlib
[submodule "raylib-src"] [submodule "raylib-src"]
path = raylib-src path = raylib-src
url = git@github.com:raysan5/raylib url = https://github.com/raysan5/raylib

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# Data-Oriented Design Test
Playing around with [DOD](https://en.wikipedia.org/wiki/Data-oriented_design) concepts and comparing performance of resulting applications.

4
dod.c
View File

@@ -92,7 +92,7 @@ int main(void) {
SetTraceLogLevel(LOG_NONE); SetTraceLogLevel(LOG_NONE);
InitWindow(WIDTH, HEIGHT, "DOD test"); InitWindow(WIDTH, HEIGHT, "DOD test");
// SetTargetFPS(target_fps); SetTargetFPS(target_fps);
Allocator arena = wapp_mem_arena_allocator_init(MB(20)); Allocator arena = wapp_mem_arena_allocator_init(MB(20));
assert(!wapp_mem_allocator_invalid(&arena)); assert(!wapp_mem_allocator_invalid(&arena));
@@ -134,7 +134,7 @@ int main(void) {
ClearBackground(BG_COLOR); ClearBackground(BG_COLOR);
// render_entities(manager.tags, manager.rects, manager.count); render_entities(manager.tags, manager.rects, manager.count);
DrawFPS(10, 10); DrawFPS(10, 10);

View File

@@ -50,7 +50,7 @@ f32 get_random_float(XOR256State *state);
int main(void) { int main(void) {
SetTraceLogLevel(LOG_NONE); SetTraceLogLevel(LOG_NONE);
InitWindow(WIDTH, HEIGHT, "No-DOD test"); InitWindow(WIDTH, HEIGHT, "No-DOD test");
// SetTargetFPS(120); SetTargetFPS(120);
Allocator arena = wapp_mem_arena_allocator_init(MB(20)); Allocator arena = wapp_mem_arena_allocator_init(MB(20));
XOR256State state = wapp_prng_xorshift_init_state(); XOR256State state = wapp_prng_xorshift_init_state();
@@ -84,13 +84,13 @@ int main(void) {
ClearBackground(BG_COLOR); ClearBackground(BG_COLOR);
// for (u64 i = 0; i < ZONE_COUNT; ++i) { for (u64 i = 0; i < ZONE_COUNT; ++i) {
// render_slow_zone(&(zones[i])); render_slow_zone(&(zones[i]));
// } }
//
// for (u64 i = 0; i < WANDERER_COUNT; ++i) { for (u64 i = 0; i < WANDERER_COUNT; ++i) {
// render_wanderer(&(wanderers[i])); render_wanderer(&(wanderers[i]));
// } }
DrawFPS(10, 10); DrawFPS(10, 10);