Structs's icon

Structs 1.0 Scripts 4.2 Community

Submitted by user Anaxarchus; MIT; 2024-06-05

A struct implementation in gdscript using Godot's Server/Resource pattern. Structs are an abstraction over type safe and highly memory efficient data pools.

Tests comparing memory overhead of Objects, Resources, Nodes, and Node2D's have shown at least 25x less memory usage for cheaper Objects and over 35x less memory usage for more complex objects like Node2D's while maintaining comparable get/set speeds.

The Struct "server" extends Resource, and is inherently able to serialize/deserialize entire struct collections.

See the repository for usage information and examples.


View files Download Submit an issue Recent Edits