Skip to content

Instantly share code, notes, and snippets.

@japatsu
japatsu / ecs-annotated.py
Created August 29, 2023 06:34 — forked from mvanga/ecs-annotated.py
A Python3 implementation of an entity-component-system in under 50 lines code.
import uuid
import json
# Returns a python dictionary given a file containing a JSON-based
# component definition. Every definition *must* contain a 'type'
# and 'schema' field inside a top-level dictionary. Here is an
# example of a simple schema file that defines a 'meta' component
# containing a 'name' field.
#