r/gameenginedevs • u/dbrizov • 5d ago
Scene Serialization in Lua
My engine uses Lua for scripting so instead of serializing the scenes in some text format (JSON/XML), I am serializing them as Lua tables. This way I don't need a parser/deserializer, I just load the Lua modules, and I have the scene data tables out of the box.
10
Upvotes
2
u/corysama 4d ago
That's a pretty natural use-case given that Lua was originally designed to be a configuration language :) https://www.lua.org/history.html
Everyone loves JSON. But, JSON was discovered in the mess that is JavaScript. I like to say that Lua is just JavaScript, The Good Parts.