Skip to content

Instantly share code, notes, and snippets.

View alligatorjazz's full-sized avatar

Damian Thomas alligatorjazz

View GitHub Profile
@alligatorjazz
alligatorjazz / ecs-annotated.py
Created January 30, 2021 20:38 — 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.
#