Skip to main content

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

Hi! Thanks for trying the game.

The transmitter behaves like a regular Python object — every `get_component("transmitter")` call returns a *new* instance. So your script creates two separate transmitters: the first one connects to earth, the second one (used for transmit) is a fresh instance that hasn't connected yet.

Fix is to assign once and reuse:

t = get_component("transmitter")
t.connect("earth")
t.transmit("current_temperature", get_component("thermometer").get_value())
(2 edits)

Oh! Java brain made me think 'get' was getting a static object, not making a new one.

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 !

Is your intent that only people with existing knowledge of python should play?  Perhaps the tutorial should mention any of this?

No, it's not required to have knowledge of Python but for sure programming knowledge helps. The DOCS and info tabs should be pretty informational though to help guide even novice people to the field.