ECS engine in C++ in Lua

This page summarizes the projects mentioned and recommended in the original post on /r/gamedev

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. flecs-lua

    Lua script host for flecs

    I think this is my best bet if only the maintainer stabilises the library. The last commit says this is still WIP and has some issues https://github.com/flecs-hub/flecs-lua/commit/895d3cb670827236a2740ccd6d4d477b899590df. Shame because the library looks great. The Lua API is pretty much perfect and I'd love to use it. But the repository has had 2 commits in the last 2 years, and the 3.2.x bindings are not stable yet.

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. luaffi

    Discontinued Standalone FFI library for calling C functions from lua. Compatible with the luajit FFI interface.

    But there are better abstractions available. Look at either luajit's ffi or the standalone luaffi to see how you can define structures from lua that write directly to memory instead of using tables.

  4. nata

    Entity management for Lua.

    You could also consider a pure lua ECS like nata. Writing perf-critical stuff in C++ and everything else in lua with completely separate ECS might not be as terrible as it sounds if they're different domains (all rendering done from C++ but all gameplay in lua). You can probably afford to do more in lua than you expect (it's quite fast and most games are quite small).

  5. awesome-love2d

    A curated list of amazingly awesome LÖVE libraries, resources and shiny things.

    love2d is open source and runs on PC and phones. Someone's even ported it to Nintendo3DS/Switch homebrew. nata is the ECS I use, but you can also checkout more libraries on awesome-love2d. I really enjoy using love2d (especially if you enjoy the engine building parts), but one caveat is that major version number bumps will break compatibility. It's usually easy to port and they deprecate functions long in advance. But there's lots of old libraries out there for older versions that won't just work on the latest love2d (like the code for Harvard's CS50 course).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • what should I use to create games in lua? raylib vs love 2d

    1 project | /r/raylib | 11 Jun 2023
  • Beginner question: is there any coding standard for documenting Lua functions or tables emulating OOP?

    4 projects | /r/lua | 1 Jun 2023
  • What are the first game engines/frameworks that come to mind when you hear "code only?"

    2 projects | /r/gamedev | 16 May 2023
  • What are some good libraries for UI and other common needs nowadays?

    2 projects | /r/love2d | 15 Apr 2023
  • Question about game menus and ui

    1 project | /r/love2d | 4 Mar 2023

Did you know that C is
the 6th most popular programming language
based on number of references?