{"id":18149981,"url":"https://github.com/pietrum/godot-binary-serialization","last_synced_at":"2025-04-27T06:53:15.825Z","repository":{"id":57251772,"uuid":"116421839","full_name":"pietrum/godot-binary-serialization","owner":"pietrum","description":"Godot has a simple serialization API based on Variant. It’s used for converting data types to an array of bytes efficiently.","archived":false,"fork":false,"pushed_at":"2022-08-16T18:01:37.000Z","size":322,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-27T06:53:10.438Z","etag":null,"topics":["binary-serialization","godot","godot-packet","packet-peer","stream-peer"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pietrum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-05T19:58:14.000Z","updated_at":"2023-09-17T20:02:11.000Z","dependencies_parsed_at":"2022-09-04T23:00:26.771Z","dependency_job_id":null,"html_url":"https://github.com/pietrum/godot-binary-serialization","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietrum%2Fgodot-binary-serialization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietrum%2Fgodot-binary-serialization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietrum%2Fgodot-binary-serialization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietrum%2Fgodot-binary-serialization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pietrum","download_url":"https://codeload.github.com/pietrum/godot-binary-serialization/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251099748,"owners_count":21536155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-serialization","godot","godot-packet","packet-peer","stream-peer"],"created_at":"2024-11-02T00:06:59.233Z","updated_at":"2025-04-27T06:53:15.797Z","avatar_url":"https://github.com/pietrum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Godot Binary Serialization\nGodot has a simple serialization API based on Variant. It’s used for converting data types to an array of bytes efficiently.\n\n[![Build Status](https://app.travis-ci.com/Pietrum/godot-binary-serialization.svg?branch=master)](https://app.travis-ci.com/Pietrum/godot-binary-serialization)\n\n[![NPM](https://nodei.co/npm/godot-binary-serialization.png?downloads=true)](https://nodei.co/npm/godot-binary-serialization/)\n\nhttps://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html\n(version 3.x)\n\n## Quick Start\n\n### Install\n```bash\n$ npm install [--save] godot-binary-serialization\n```\n\n### Requirements\nGodot version 3.0\n\n## Basic Usage\n\n#### UDP\n```javascript\nconst packetPeer = require('godot-binary-serialization').PacketPeer;\n```\n\n```javascript\n// decode data - receive from Godot Engine\nconst decoded = packetPeer.get_var(msg);\n\n// encode data - send them to Godot Engine\nconst encoded = packetPeer.put_var(variant);\n```\n\n#### TCP\n```javascript\nconst streamPeer = require('godot-binary-serialization').StreamPeer;\n```\n\n```javascript\n// decode data - receive from Godot Engine\nconst decoded = streamPeer.get_var(msg);\n\n// encode data - send them to Godot Engine\nconst encoded = streamPeer.put_var(variant);\n```\n\nIt is possible to send/receive single type value into the stream.\n\n```javascript\n// @example - FLOAT type\n// decode data - receive from Godot Engine\nconst decoded = streamPeer.get_float(msg);\n\n// encode data - send them to Godot Engine\nconst encoded = streamPeer.put_float(variant);\n```\n\n##### Available \n- [x] Signed Int (8-/16-/32-/64-bits)\n- [x] Unsigned Int (8-/16-/32-/64-bits)\n- [x] Real (float/double)\n- [x] String\n\n## Already Supported\natomic types\n- [x] [BOOL](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#bool)\n- [x] [INT](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#int)\n- [x] [FLOAT](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#float)\n- [x] [STRING](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#string)\n\nmath types\n- [x] [AABB](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#aabb)\n- [x] [BASIS](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#basis)\n- [x] [PLANE](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#plane)\n- [x] [QUAT](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#quat)\n- [x] [RECT2](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#rect2)\n- [x] [TRANSFORM2D](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#transform2d)\n- [x] [TRANSFORM](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#transform)\n- [x] [VECTOR2](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#vector2)\n- [x] [VECTOR3](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#vector3)\n\nmisc types\n- [x] [COLOR](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#color)\n- [x] [NODE_PATH](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#nodepath)\n- [ ] [RID](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#rid-unsupported) (unsupported)\n- [ ] [OBJECT](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#object)\n- [x] [DICTIONARY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#dictionary)\n- [x] [ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#array)\n\narrays\n- [ ] [POOL_BYTE_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedbytearray)\n- [ ] [POOL_INT_32_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedint32array)\n- [ ] [POOL_INT_64_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedint64array)\n- [ ] [POOL_FLOAT_32_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedfloat32array)\n- [ ] [POOL_FLOAT_64_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedfloat64array)\n- [ ] [POOL_STRING_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedstringarray)\n- [ ] [POOL_VECTOR2_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedvector2array)\n- [ ] [POOL_VECTOR3_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedvector3array)\n- [ ] [POOL_COLOR_ARRAY](https://docs.godotengine.org/en/latest/tutorials/io/binary_serialization_api.html#packedcolorarray)\n\n## License\nMIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpietrum%2Fgodot-binary-serialization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpietrum%2Fgodot-binary-serialization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpietrum%2Fgodot-binary-serialization/lists"}