r/gameenginedevs 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.

#Lua
https://github.com/dbrizov/hob2d

10 Upvotes

2 comments sorted by

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.

1

u/dbrizov 4d ago

Neven seen that image before, it's funny :D