An agnostic game engine made in Lua
Go to file
Fierelier 3460748bc8 Allow elements to have multiple parents 2022-12-01 23:59:42 +01:00
engine Add basic script element 2022-11-26 19:27:58 +01:00
lib Allow elements to have multiple parents 2022-12-01 23:59:42 +01:00
LICENSE Initial commit 2022-11-25 22:36:18 +01:00
example.lua Initial commit 2022-11-25 22:36:18 +01:00
readme.txt Abolish element path 2022-11-26 02:13:11 +01:00

readme.txt

This is an agnostic engine that implements a simple system for creating abstract objects. You can implement any engine you want in it, and use it with this. By itself, this engine doesn't do much. You can check out my raylib-lua implementation of the engine here: https://git.lumen.sh/Fierelier/engine-raylib -- This has implementations for cameras, models, etc.

See engine/example.lua to see how an element type is implemented. There are two memory regions for each element: memhi and memlo.

memhi:
Memhi is high-level memory, this what you should generally write to. Only store numbers, strings, booleans and lists in it. Do not have references to the same list in multiple elements. This is how your game's state will be saved/loaded. You are intended to make a memhi metatable, as shown in the example element's self.create. If you, for example, make a model element, you observe changes to memhi.modelPath, and load/unload models as necessary from that change.

memlo:
Memlo is low-level memory, this is what you should generally read from, or write to in response to memhi changes. You can store anything in this. But you should make sure that as many writes as possible come from observing memhi, so the state can be restored. For example, with the aforementioned model element, if memhi.modelPath is changed, you would unload the old model in memlo.model (if there), and load the new model into memlo.model as well.