Not logged inOpenClonk Forum
Up Topic Community / Player Creations / [Project] Mechnisms and Mechanization
- - By MimmoO Date 2016-03-30 14:31

Mechnisms and Mechanization



Hello all,
I am currently working on an object pack that lets players connect objects ingame. The core elements of this pack will be the Library_Mechanizable and the Mechanism object, which can be crafted in the Workshop.
Objects that include this library can define any number of inputs and outputs. A Door might have the inputs "open" and "close", while a Button only has one output "pressed".
The mechanism object allows you to connect any output to any input, so pressing a button could be wired to open a door. Each output can only be connected to one input and vice versa.
The mechanized object can define a trigger(int output_index) and a triggered(int input_index) function to interact with each other. So far the Mechanism and the Library_Mechanizable have been implemented.

The other part of this pack will be a collection of constructable contraptions, like sensors, logic gates and actors. Those are a few ideas:

Sensors


All sensors simply check a specific criteria periodically. Once the criteria is met, they trigger.
  * Living Sensor: Triggers when any object living object is near
  * Enemy Sensor: Triggers when enemies are near (also glows blue)
  * Motion Sensor: Triggers when any object over a speed threshold is near
  * Pressure Plate: Triggers once enough weight is on top. Might have multiple outputs for multiple thresholds.
  * Liquid Sensor: Triggers once the sensor is submerged in water/lava/acid
  * Energy Sensor: Triggers when powered / power threshold is reached. Might have multiple outputs for multiple thresholds.
  * Fire Sensor: Triggers when burning / burning object near
  * Wind Sensor: triggers once wind reaches a threshold. Might have multiple outputs for multiple thresholds
  * Damage Sensor: Triggers when damaged, looks like a practice target
  * Switch/Spinwheel: Like the existing Spinwheel, triggers when switched. Has two outputs, one for left and one for right.
  * Button: A wall mounted button which triggers once pressed.
  * and so on..
 

Gates


These gates have no use other than to propagate a trigger-signal in different ways.
  * AND OR, XOR, NOT, ONE, NOR, etc.
  * Delay: Once triggered, waits for some time and then triggers. Might have multiple outputs for multiple delays.
  * Charge: Needs to be triggered for a certain amount of time until is triggers itself (think capacitator).
  * FlipFlop: Constantly triggers (ON), but once triggered, it does nothing (OFF) and stays like this until triggered again.
  * Frequencer: As long as it is triggered, sends a trigger signal itself periodically.
  * Splitter: One input, multiple outputs. Triggers all output once triggered.
  * And so on...
   

Actors


These are the parts that interact with the clonk world. These can also be traps that damage clonks.
  * Floor Trap: Looks like a bridge segment, but opens once triggered. Might have two inputs, one for opening and one for closing
  * Directional Trap: Can be placed and given a direction to face (from 360°). Then you can put a bow+arrow / musket+bullets / airbag / other directional item in, and it will use it once triggered (with cooldown depending on item. Might require energy?)
  * Spear Trap: Like Spring Plate, but extrudes spears once triggered, damaging whats in front of it
  * Incinerator Trap: Can be filled with dynamite / powder kegs. Incinerates and spills contents once triggered
  * Separator: Can collect stuff like a lorry (hitting from above). Once triggered, releases items. Might have two inputs to release one or all items.
  * Spring Plate: Can be placed on a flat surface (ground/wall/tunnel). Once triggered, flings objects on it in the air/away. Might have two inputs for fling and reset. Might also have to be reset manually.
  * Valve: Can also be connected to a pipe/pump, will let fluids through only when triggered.
  * Electrical Gate: Like Valve but for power.
 

Existing Objects


These already existing objects could be modified to work with this pack.
  * Gate: This gate has two inputs to open and close the gate. Could also have outputs that trigger once the door is closed or opened completely.
  * Catapult/Ballista/Cannon: Fire once triggered. Maybe the vehicle needs to be secured (unmovable) to be connected to something. Might also have multiple inputs to aim the vehicle.
  * Elevator: Can go up/down. Could also have outputs like the Gate, also an output that triggers as long as the lift moves.
  * Dynamite Box Handle: Once triggered, ignites fuse.
  * Torch: Shines when triggered.
 

Additional Notes


  * There are a lot of sensors and gates. To avoid having a huge number of objects, I thought about merging all gates into one single object. Once this object is placed, the player can decide which function the gate should have.
  * The same might work for a subset of sensors. Really, only the Switch, Button, Pressure plate and Damage sensor would have to be single objects.
  * The current framework is vulnerable to circular wiring and might result in a deadlock. Also, objects can be triggered twice in the same frame.. I thought about having an effect which represents a signal, which then traverses from sensor to actor or something.
  * Should multiple outputs be allowed to connect to the same input? This would make the OR-Gate not needed anymore, but might lead to confusion.
 

What to build


  * Combine a sensor which can distinguish between mutliple raw materials (gold, ore, rock etc), and build a autmated sorting machine.
  * Flood your crops if they start to burn.
  * Reinforce the entrance to your base by setting up some nasty traps.
  * Build an airlock for your underwater base.
  * Be notified when a volcano erupts.
  * Catch Wipfs in selfmade traps.

Thank you for your attention. Feel free to comment or share ideas :). I will attach what I already have to this post later.
Parent - - By Newton [de] Date 2016-03-30 15:25 Edited 2016-03-30 15:31
I find the idea very cool.

However, this will be as successful at it will be practical. It should be extremely easy to build mechanisms that immediately become useful. I think for simplicity's sake, you should pass on the gates altogether for the first versions as well as most sensors. I think the best approach would be to first think of applications ("What to build") and only then decide if you need more sensors or more specialized actors for that.

>  * Combine a sensor which can distinguish between mutliple raw materials (gold, ore, rock etc), and build a autmated sorting machine.


Useful in theory, but after all, most raw material goes into the foundry anyway. Plus, somehow your raw material has to get to the sorting machine. Whether you carry them there or to their proper destination does not really make a difference since the place where you mine always changes. It is not worth it to build up a stationary infrastructure to transport the material from your mine to the nearest production building. (Why build a sorting machine when you can simply build another foundry in your new mine?)

>  * Flood your crops if they start to burn.


Not useful. You could simply have your crops always slightly in water. But in reality, who cares for that?

>  * Reinforce the entrance to your base by setting up some nasty traps.


Not useful in a clonk melee. Your enemy will just dig around it and perhaps even steal the weapon that was intended for the trap.

>  * Build an airlock for your underwater base.


Yeah, cool

>  * Be notified when a volcano erupts.


Not really useful, the volcano can erupt anywhere

>  * Catch Wipfs in selfmade traps.


Not really useful as just catching them will be faster.
Parent - By MimmoO Date 2016-03-30 15:54
I didnt think so much about applications that would be useful in a regular game, but more about giving the player some toys to play. Being actually useful for the player is more like a bonus :)
The other idea I had about this was to give scenario designers some kind of easy interface to design traps and contraptions in scenarios, like the SpinWheel and StoneDoor already have.
Parent - By Newton [de] Date 2016-03-30 15:38

>  Catapult/Ballista/Cannon: Fire once triggered. Maybe the vehicle needs to be secured (unmovable) to be connected to something. Might also have multiple inputs to aim the vehicle.


Also, in theory useful to transport materials from your mine to your base. Preset the angle/strength, connect a Frequencer to continuously shoot whatever is entered. But:
* Someone still has to operate the catapult to put the stuff into it
* If you are so far away from your base / the terrain is so inaccessible that a catapult is the easiest method to transport your materials, how did you get the catapult to this place then?
* Mining a vein of material usually does not take that long. Is it even worthwhile to set up the mechanism and get a catapult?
Parent - - By Sven2 [us] Date 2016-03-30 16:56
Very cool! I agree that practicality in existing scenarios is something that could come second after some exploration.

Actor ideas:
* Conveyor belts
* Windbags with a fixed direction
* Pumps
* A display panel with various shapes (possibly with multiple inputs for different colors)

Gates:
* A single-layer perceptron that can be trained
Parent - - By MimmoO Date 2016-03-31 09:34

> * Conveyor belts


Yay! I think something like this already existed in CR. Could be remade with nice 3D graphics and stuff.

> * Windbags with a fixed direction


This was actually my first idea. But I thought having a universal "directional-use-item-actor" would be more versatile. But maybe it would just complicate things.

> * Pumps


Are there no Pumps yet in OC? Anayway, yay pumps!

> * A display panel with various shapes (possibly with multiple inputs for different colors)


Nice idea. Could also be really useful for debugging.

> * A single-layer perceptron that can be trained


I see someone played with neural nets.
Parent - - By Sven2 [us] Date 2016-03-31 14:45

> This was actually my first idea. But I thought having a universal "directional-use-item-actor" would be more versatile. But maybe it would just complicate things.


The idea would be that you can build automated transportation routes. I'm not sure if the regular windbag is versatile enough; you may need something that allows you to adjust strength, etc.

Also, hydraulics would be cool. I.e. SolidMask-objects that can push around things.
Parent - By MimmoO Date 2016-03-31 15:12
Like pistons in Minecraft :) would certainly allow for some fun.
Parent - - By Matthias [de] Date 2016-03-30 17:46
This obviously needs a random generator as sensor!
Reply
Parent - By MimmoO Date 2016-03-31 09:35
Sounds good :)
Parent - - By Matthias [de] Date 2016-03-30 17:50
Lorry contents could be emptied into something else by connecting a trigger. Also, they could drop their stuff, but that maybe looks awkward without some sort of mechanism that is tilting the lorry - which, if it was made, would solve the "has to be stationary"-problem with vehicles, though.
Reply
Parent - By Clonkonaut [de] Date 2016-03-30 19:25
I wanted to have some trigger points in the cable car system. Like "passing by lorries empty stuff here".
Reply
Parent - - By Clonkonaut [de] Date 2016-03-30 19:25
Additional sensors: The cable car is passing by sensor!
Additional actor: Cable car starts moving!
Reply
Parent - By MimmoO Date 2016-03-31 09:38
Also switches for the cable as actor! Conditional brakes! Sensors that measure if something is in the lorry or not...
Parent - By Marky [de] Date 2016-03-30 21:14
Yay, this also means that I will not have to build something like that for one of my libraries!
Parent - By ala [de] Date 2016-03-30 22:28
Just perfect for riddle towers!

I'm really growing fond of those "developer blogs". Plenty of stuff going on right now :)
Parent - By Clonkonaut [de] Date 2016-03-31 15:11
By the way your ideas reminded me of these things in Factorio: https://www.youtube.com/watch?v=AXx5fMD7ERY#t=5m45s

Just to give you an idea how it could work. Like Input == A Certain Object and so on.
Reply
Parent - By Marky [de] Date 2016-12-07 14:48
What became of this? I think that it is an interesting project and I could need it for some of my own projects.
Up Topic Community / Player Creations / [Project] Mechnisms and Mechanization

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill