Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

OverComplex Calculator

Puzzle programming game. Sometimes to create a simple outcomes require complex solutions. This is such a game. · By shalevy

Game Mechanism Sticky

A topic by shalevy created Aug 15, 2017 Views: 154
Viewing posts 1 to 1
Developer

Here is  a general description of how the game mechanism works:

A Tile is the basic execution unit of the game. There are many different types of Tiles, each has a unique execution task. Tiles share  few concepts in common:

  • Ports - each Tile has 6 ports ordered clockwise from North-East (port 1) to North-West (port 6). 
  • Ports direction - a port can either be: In port - values enter the execution unit. Out port - values exit the execution unit. No port. Changing port direction can be done using Shift-N (where N is between 1 to 6). Each press of Shift-N cycles through in, out, no port.
  • Speed - by default Tiles executes each cycle. You can change the speed to the Tile to 1/N of a cycle (N is between 2-9). This is a more advances topic that will be explained in a different discussion. Keyboard shortcut '1' to '9'.

A Value is what passes between Tiles. It is produces in the Tiles execution units and passes through the ports. Values can be Integers, Float or NA (Not a number).

When the simulation runs (you hit play) it employs the concept of cycles. On each Cycle there are 3 phases: Phase 1) Each Tile observe the values passed to it from adjacent Tiles and consider only those that are on the In direction ports. 2) Each Tile executes it's logic based on the inputs and creates a new value. 3) Each Tile Duplicates the value into each of his out direction ports. 

There are many different types of Tiles, some also have properties the user can change, for example the Constant tile can define its value in the properties pane.

CategoryNameDescriptionProperties
MathPlus (+)Adds all the values on it's in port to produce a new value on the out port.. 

- Keep Last Result: if Enabled save the last cycle results and adds it's to it's next execution cycle.
- Reset Last Result using Port Input: if enabled can be used to reset back to zero the saved value. 
Minus (-)Pick the first valid in port value, clockwise order, and reduce from it all the other valid inputs. For example, if the value '6' is on in port North East (Port 1) and '4' is on in port South West (Port 4). Then the result will be '2'.
Equal (=)Pick the first valid in port value, clockwise order, and output that value on the out ports.- Ignore Zeros: ignore in ports with zero value.
Multiply (x)Multiply all the values on it's in port to produce a new value on the out ports.Same as the Plus Tile.
Constant Tile (N)Create a constant value on it's out ports.- Value: which constant value to produce.
- Repeat: how many times to produce this value.
- In used as Reset: reset the repeat count based on any valid value on any in port.
Min Compare all in port values to produce the minimum value.
MaxCompare all in port values to produce the maximum value.
Random (R)Creates a random value on it's out ports.- Seed: use a specific seed to create a random sequence of numbers that is reproducible every run of the game.
- Use Seed: should be used or not.
- Max value: till what values to produce the random value.
- Whole numbers: produce integers of floats.
StreamsINProduces a pre-defined sequence of numbers based on a specific IN stream.- Stream Name: Choose the stream to be used by this Tile.
OUTPick the first valid in port value, clockwise order, and output this on the choose out stream.- Stream name: Choose the stream to be used by this Tile.
LogicLess Than (<)Pick the first valid in port value, clockwise order, and compare it to all the rest of the valid values. Output '1' if Less Than, '0' otherwise.
Greater Than (>)Pick the first valid in port value, clockwise order, and compare it to all the rest of the valid values. Output '1' if Greater Than, '0' otherwise.
Equal to (==)Pick the first valid in port value, clockwise order, and compare it to all the rest of the valid values. Output '1' if Equal to, '0' otherwise.


Solving a puzzle can be done in many different ways. Each Puzzle defines what Tiles are available to the user and how many of each tile can be used.