Defold-Protobuf

#1

logo

Defold Protobuf

Defold NE for work with protobuf

Defold-Protobuf Native Extension for the Defold Game Engine

This extension allow you work with google protobuf protocol (files .proto), encode and decode them.

Github Link
Asset Link

Short API:

local protoc = require("pb.protoc")

protoc:loadfile("/resources/test.proto")
local data = {
	values = {
		first = {
		number = 1.5,
		unumber = 20,
		string = "hello"
	}
}

-- some.Example - name of message from test.proto
local bytes = pb.encode("some.Example", data)
local unpackage = pb.decode("some.Example", bytes)

Examples you can find in GitHub repository

Notes

This is extension, what we use in Family Age
If you will use our extension and find some bugs or have some suggestions, you are welcome, tell about it!
NE wrapped by @vergil12345678

19 Likes

#2

Great work! I was planning to build NE for Flatbuffer and this will guide me a lot.
Thanks everyone from Family Age team for those great NEs

6 Likes