HNHacker News
TopNewBestAskShowJobs

blackmat

23 karma · joined July 22, 2015

submissionscomments
blackmat··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Yeah! Long live Lua! :-)
blackmat··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Comparative benchmarks are a big task on their own, and usually the author's library wins in them. I have internal benchmarks in the repository, but they are not designed for comparison or for evaluation by outsiders. Maybe I'll get to that someday.

As for the SoA approach, here you can find a small and exaggerated example: https://luajit.org/ext_ffi.html

blackmat··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Honestly, it's just a fancy way of saying I learned a few things from earlier attempts and made some tweaks. I just think "evolved" sounds cool!
blackmat··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Not yet, but I wrote this library to use in a project of mine. When I finish it, I will add a link to the README. As for a small demo project, I have one in mind, but I haven't started it yet.
blackmat··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Yeah, tiny-ecs is good, but it doesn't quite fit my needs. With these thoughts in mind, I started this project.
blackmat··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Hmm! I haven't heard of JECS before. I need to check it out :-) Thanks for the kind words!
blackmat··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Yes, organizing components as SoA can provide a significant performance boost in Lua, especially with LuaJIT. Both iteration and element access become faster, and it also reduces memory allocations and GC pressure when creating entities. And yes, Lua tables can be contiguous in memory if you use them carefully.