summaryrefslogtreecommitdiff
path: root/lib/components.odin
diff options
context:
space:
mode:
authorJoel Stålnacke <joel@saker.fi>2026-03-23 19:50:18 +0200
committerJoel Stålnacke <joel@saker.fi>2026-03-23 19:50:18 +0200
commit3a1f9fe6800ef5fe7bbf1c0a5976720383ba84fe (patch)
treef1218eb4085a654f6bb70671b41b4a74e646c052 /lib/components.odin
parent3870982f640260822bf605e693782ce9f5d79cf6 (diff)
Rewrite native code in Odin and use ECSodin
Diffstat (limited to 'lib/components.odin')
-rw-r--r--lib/components.odin18
1 files changed, 18 insertions, 0 deletions
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,
+}