From 3a1f9fe6800ef5fe7bbf1c0a5976720383ba84fe Mon Sep 17 00:00:00 2001 From: Joel Stålnacke Date: Mon, 23 Mar 2026 19:50:18 +0200 Subject: Rewrite native code in Odin and use ECS --- lib/components.odin | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/components.odin (limited to 'lib/components.odin') diff --git a/lib/components.odin b/lib/components.odin new file mode 100644 index 0000000..56407a3 --- /dev/null +++ b/lib/components.odin @@ -0,0 +1,18 @@ +package djup + +Component :: enum i32 { + Exists, + Ball, + PlayerInput, +} + +Components :: bit_set[Component;i32] + +Ball :: struct { + position: vec2, + velocity: vec2, +} + +PlayerInput :: struct { + direction: vec2, +} -- cgit v1.2.3