Hi guys, I've been working on a cross-platform ECS...
# gamedev
j
Hi guys, I've been working on a cross-platform ECS, if you don't mind to take a look and give feedback I'll really appreciate it. Thanks! https://juan-medina.github.io/kecs/
r
Are you actually getting gains from the data-oriented design?
You still have objects that won’t necessarily be contiguous in memory and may be shuffled around by the GC (at least with Kotlin/JVM or Android)
👆 1
j
data memory allocation is not my main driver, is more about separate data, behaviour a don't need complicated hierarchies . Still a simple while loop is feel much better than dozen of corutines
r
Right but your page says “Due to data-oriented design allow modern processors to highly optimize it for an over perform of more traditional systems.” which is what I was referring to 🙂
So does your solution implement any form of parallelism on the user’s behalf?
j
it will eventually 🙂
well is a ECS so you just have a main loop and all the system iterates over the data, so is event-loop style
check the example, https://juan-medina.github.io/kecs/example/ it gives you an idea
r
Yeah that’s why I was asking
It seems there’s no parallelism going on
So I’m not sure why you mention fibers/coroutines
j
that I don't need any 😄
in a ECS world everything can run in the same thread
r
That’s not specific to ECS?
j
not is not, it what even loops do, like reactor, or proactor
r
Anyway your APIs look nice but I would recommend rewording some of your claims about performance gains and the mentions of fibers/coroutines
👌 1
j
good feedback I'll take a note
it has an playground if you like to experiment with it, again thanks for the feedback
r
Just to set the right expectations for your users
Oh cool thanks
I’ll take a look yes
j
I'm working with it a small game engine based on ECS concept, is in every early stages but you could look how a game with ECS looks like https://github.com/juan-medina/ksge/blob/main/examples/basic/src/shared/kotlin/main.kt
r
Our rendering engine uses an ECS, I’m familiar 🙂
(but it’s C++)
j
TBH I was experimenting with Korge for implementing the game logic in ECS style, I like the separation between data and behaviour, but couldn't get it right
m
I didn't use ECS, but what are the main benefits over a simple dependency injection(e.g via koin)? It looks a little like data holder. Hmm and what I don't like at first glance is the name View in the API, people has developed some kind of standard, so if someone tells View, they immediately associate it with something that can be draw on the screen