Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Yes, totally got you, they are not static or singletons, they act like class instances pretty much. But you are absolutely right, i should probably make that more clear in the DOCS. I will add sth to clarify it a bit better.

(+1)

Yeah, wasn't even sure what language it was at first, tbh, so the standard was hard to tell. Thanks for the response!

(2 edits) (+1)

No worries, I have actually already added a reference about this in the DOCS of the game, it's a very good point. I added this to the Components page in DOCS (not live in the demo yet)

**Each call is a new instance**
`get_component(id)` is a factory — every call creates a fresh wrapper, like instantiating a Python class. For machines tied to a physical entity (rover, smelter, generator), wrappers all read and write through the same backing data, so it feels singleton-ish in practice — setting a value from one wrapper is visible from another.
For purely virtual components like the `transmitter`, each wrapper is independent:
```
# Fails — two separate transmitters, only the first is connected:
get_component("transmitter").connect("earth")
get_component("transmitter").transmit("weather", 42)
# Works — one transmitter, used twice:
t = get_component("transmitter")
t.connect("earth")
t.transmit("weather", 42)
```
Wrappers are just objects — make one, make ten, each is independent.

Thanks for the feedback and helping me make the game better ! Appreciated !