Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarven Microcontrollers  (Read 569 times)

Asteranx

  • Bay Watcher
    • View Profile
Dwarven Microcontrollers
« on: January 22, 2010, 03:30:00 pm »

This is so not going to happen, but I like thinking about stuff like this.  ;D

A single construct, built from blocks, ropes, and mechanisms that serves to interconnect several other devices (levers, bridges, floodgates, etc).

The trick is that a simple scripting language is used to 'program' the controller.  Very basic, mostly boolean logic.  Simple branching (if/else), no subroutines (or simple assembly jmp style), likely no math at all.  The script would define a number of attachment points (or perhaps a single controller would be capped at a reasonable value), and any time anything attached to it changed state due to outside influence, it would run its script.  The script could ask for the state (on or off) of any of the attached devices, and force state changes in any of them as well (perhaps incurring a delay to run the script, or even stepping through the instructions at a fixed rate).

The number and type of components required to build the controller would depend on the actual instructions used in programming it.  Optionally the controller could require multiple tiles based on this number as well, though whether you specify the size up front and have it cap the complexity, or write the script and are then given a box you have to find room for is kind of a toss-up.

Attaching devices to the controller is done via the normal attach interface, and requires the normal pair of mechanisms, though when you select the controller you also specify which attachment point you want to attach the device to.  Optionally, each attachment point could attach multiple devices.  The single state seen by the script at each point would be some combination of the states of all attached devices.

For extra credit, the programming term 'bug' came from the idea actual insects would find their way inside the room-sized computers of yore and bridge contacts when they died, causing short circuits or similar problems.  Unchecked vermin in the area could pose a problem to a running script, causing inputs to not be read correctly, instructions to be skipped, or outputs to fail.

For extra extra credit, allow setting states on unused connections to implement a limited form of persistent memory internal to the device.
Logged

lucusLoC

  • Bay Watcher
    • View Profile
Re: Dwarven Microcontrollers
« Reply #1 on: January 22, 2010, 04:41:06 pm »

it is my opinion (and just my opinion) that improvements to levers will be enough. something like this should be properly constructed out of levers, pressure switches, floodgates and water channels. you do not want to give the player too much, they need to work for something. (plus building the microcontroller would look way cooler.)
Logged
Quantum dumps are proof of "memory" being a perfectly normal dimension in DF. ~Gazz

QuakeIV

  • Bay Watcher
  • Cant resist... must edit post.
    • View Profile
Re: Dwarven Microcontrollers
« Reply #2 on: January 22, 2010, 05:07:53 pm »

Pure.
Freakin.
Awesome.

Im all for it, and seriously, id really enjoy using this sorta thing.
The only problem i could see, would be that its still totally out of period, and i feel some people will say so.

I dont really care though, this sounds awesome, and would make the game alot more fun, as long as this sorta thing isnt so frequent as to really bungle up the genre we're dealing with here.
Logged
GENERATION 9: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
I wish my grass was emo, then it would cut itself.
Quote from: Jesus
Quote from: The Big Fat Carp
Jesus, you broke the site!
Sorry, Bro.
link to quote

fizmat

  • Bay Watcher
    • View Profile
Re: Dwarven Microcontrollers
« Reply #3 on: January 23, 2010, 05:24:31 am »

You know what "wire mod" for Garry's mod for hl2 is? Garry's mod lets you spawn and weld together objects from any Source engine game you have, like barrels and ropes and soda machines and wheels, (and enemies) while wire mod adds things like physically represented logic gates/wires to create for example auto-aiming turrets (that you can in turn weld to dumpsters with wheels to create your army of dumpster-tanks). If we get that kind of thing in DF it will become the most sandbox game ever and implode the universe by 2012.

We can already create calculators from gears, but no real application for them sadly, like firing ballistae in complex patterns mathematically predicted hit the siege with the most probability. (aka bolt-kata). So I think having more things (optionally) controllable by levers/gears will be necessary first, because we can already make logic, just nothing to use it on.

Too bad I never bought Garry's mod (eats too much time even when offline) so I never actually played with wire mod, could only create non-automated dumpster tanks = (
Logged