In game programming implemtation (think Shenzhen I/O style)

Hey everyone!

I am working on a proof a concept for a game that involves “Getting things working”. What I mean by that is the player will be presented with a puzzle that will require them to make parts using circuits and micro controllers in order to get through it. Shenzhen i/O is a good example of the type of thing I would want to create for the micro controller side for advanced player (I want to use a flow graph for less advanced players). I also want to make the game very visually interesting however that’s another story.

Basic Idea:

1. Player given a task, for example get an airlock to cycle (Detect if pressurized, use step motor to close door, use pumps to pressurize or depressurize etc.).

2. To do this the player needs to build a circuit, they will be given a semi realistic system to do so with various parts supplied such as resistors, transformers etc (hopefully players will learn something about basic electronics but we will see). They place the parts and wires and hook up various parts to the inputs and outputs on the circuit.

This will work as a semi realistic circuit system, how far this goes is down to performance. This section will go into more advanced ideas as it progresses, starting with voltage dividers etc.

1. (This is the part I am unsure about) When building the circuit they player will have an option to place micro controllers on the board, these will require power (using the +V and GND from the board).

I will give players the choice between flow graphs and code. They can use the micro controllers to detect voltage changes, activate transistors etc.

Does anyone know of a simple, flexible way to implement this kind of feature? At the moment it looks like I will be putting together my own type of code (keeping it simple), however I would be interested to know if anyone has managed to implement this kind of idea already using preexisting code libraries.

LUA, looks like a good choice as obviously it doesn’t need to be compiled each time however I doubt it would be easy to limit it within an object (so it only sees the inputs and outputs from the micro controller), also maybe its a bit too far? Unless you are running a raspberry pi level thing a micro controller wouldn’t be able to interpret LUA, also it would maybe give the player too many options to finish a task. Of course LUA controllers could be a late game thing for harder challenges.

Writing an interrupter for in game sudo code likely would not be too much of a challenge however it also kinda feels like it could be one of those black hole kinda projects were you can’t test for every eventuality, especially as a one man team.