How do I work with floats in Lua

Hi, I’m working on multiplayer game and I need to send and receive over udp sockets a lot of data. Most of the data is encoded in floats and as far as I’m concerned Lua uses double point precision as default, and preferred type of numbers. Is there any work around that so that I could encode and decode floats? I’ve heard about compiling lua to use only floats but I wonder if that would be plausible or even possible in solar2d
greetings :grinning:

Hi. I have bindings to both lpack and struct in my serialize plugin. You should still be able to grab this here and it ought to be in the free plugins directory soon too.

Aside from that there are some projects like vstruct.

1 Like

Thanks, it works flawless :ok_hand:

1 Like