Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Cyberdorf Systems: Dwarven Animation  (Read 1597 times)

BloodBeard

  • Bay Watcher
    • View Profile
Cyberdorf Systems: Dwarven Animation
« on: December 07, 2011, 02:05:28 am »

This is a little side project that i'm hoping to include in some form in my 'Dwarfputing an A.I.' fortress, but there's potentially a lot more that can be done with it that I just don't have the time for so i'm making another topic for others to perhaps do something with it.

In working on the display in my other topic that supports characters, I as a fan of dwarf fortress naturally began thinking of ways to do something more ridiculous. So I came up with this:

Spoiler (click to show/hide)

A coloured display screen that with the right linking and pressure plate/pump/gear combination would be capable of visual animation. The image posted is a white screen. It doesn't look like it up close, but take several steps back from your monitor (or when ingame zoom out).

A pressure plate triggered by water will activate all the floor hatches of a single frame (or deactivate the refuse if they're all on by default). The initial activation for the pressure plates and the hatches is instantaneous, which is good, but there's a downside. Reseting the pressure plate to reactivate the hatches takes over 100 turns and activating a 2nd pressure plate linked to a hatch that was already switched by a previous pressure plate doesn't do anything. (pressure plate A is activated, hatch dissapears, pressure plate B is activated that is linked to the same hatch, it won't reappear).

So comes the complicated solution where the pressure plate for one frame of animation needs to be activated, then deactivated before the 2nd pressure plate linked frame can be shown. I really don't want to explain all the web of linkages, but if you're crazy enough to try and attempt it it shouldn't be too hard to figure out from this explaination:

Lever is pulled, power is sent to filling pump 'A' which activates plate 'A'. Plate 'A' displays the first frame on the display, cuts power to pump 'A', sends power to draining pump 'A' (removing the water from plate 'A', starting a delayed reactivation) and sends power to filling pump 'B'. Filling pump 'B' activates plate 'B' which cuts power to filling pump 'B' and draining pump 'A' and sends power to draining pump 'B' (removing the water from plate 'B', starting a 2nd delayed reactivation).

Now, there are 2 gears that both need to be on for power to be send to pump 'C' which will activate plate 'C' and display the 2nd frame of the animation. By default, one is on and one is off. Pressure plate 'A' when activated turns off gear '1', so now both are off. When pressure plate 'B' is activated, gear '2' is turned on. Now both plates 'A' and 'B' are both set on a delayed reactivation from the water being drained, but plate 'A' has a head start and will turn on gear '1', completing the circuit just long enough to activate plate 'C' and start the whole cycle again. There's more gears to it then that but this should be enough for you to figure it out.

TL/DR, one pressure plate when activated will show one frame of animation, and the act if deactivating the plate, which is needed for the next frame to be displayed, will activate the pressure plate for the next frame.

I've linked up a little testing version and though there are a few annoying bugs it works pretty good. At 100 FPS, which is what will be played back when you record a movie, each frame will be on screen for about 1.12 seconds with 1 step between frames where all the hatches are either on or off (depends on their starting state), but at 100 FPS the human eye wouldn't even register it. When I was thinking on how to do this I was hoping I could get some rapid hatch action going so it would really look like movie animation, but with the way pressure plates and hatches function I couldn't find a way to get it to work any faster then this.


The whole setup is fairly compact, needing only 6 gears, 4 pumps and 2 pressure plates per frame, not including the power source and the display screen. The animation can have as many frames as you can bear to link, which would probably your biggest trouble, and the reason I don't want to try it right now. To have a screen that can display an animation of some complexity will probably need hundreds of linkages per frame. The example display I posted is made up of nearly 900 hatches, and i'm wondering if you need one even larger to have recognizable visuals. Of course you can make a display only in black and white, which would be much much easier to design each frame. Here's some more images of how the 3 colour system would look for each colour:

Spoiler: Cyan (click to show/hide)
Spoiler: Magenta (click to show/hide)
Spoiler: Yellow (click to show/hide)
Spoiler: Green (click to show/hide)
Spoiler: Orange (click to show/hide)
Spoiler: Purple (click to show/hide)

Cyan: Adamantine
Magenta: Rose Gold
Yellow: Gold

(There are materials for blue and red, but they don't blend together as well as magenta and cyan)

So, i'd be stoked if anyone with the right balance of insane and patience gave it a go. I can only imagine how cool a decent length animation would look regardless of what it is. Happy !!SCIENCE!!ing.

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Cyberdorf Systems: Dwarven Animation
« Reply #1 on: December 07, 2011, 07:50:39 am »

Of course you can make a display only in black and white, which would be much much easier to design each frame.
It wouldn't be very Bay12 though :P

Even a short animation of 2~4 frames could be very effective. I can't wait to see if someone does something with this.
Logged

Shinotsa

  • Bay Watcher
  • Content lion is content
    • View Profile
Re: Cyberdorf Systems: Dwarven Animation
« Reply #2 on: December 07, 2011, 09:07:16 am »

This is going to be amazing, even if it's simply the symbol for magma made to look like its flowing. Just to see how it works consistently. Then maybe a dwarf being engulfed with a horrified expression. This is a masterwork animation of a dwarf and magma. The dwarf is burning.

Well I'm definately interested to see what people come up with. Seems like a challenge that at least a few people on these forums wouldn't be able to refuse.
Logged
Quote from: EvilTim
"You shouldn't anthropomorphize vehicles. They hate it"

Kofthefens

  • Bay Watcher
  • Keep calm and OH GOD CAPYBARAS
    • View Profile
    • Marshland Games
Re: Cyberdorf Systems: Dwarven Animation
« Reply #3 on: December 07, 2011, 11:25:31 am »

So cool... *Drools with anticipation*
Logged
I don't care about your indigestion-- How are you is a greeting, not a question.

The epic of Îton Sákrith
The Chronicles of HammerBlaze
My website - Free games

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: Cyberdorf Systems: Dwarven Animation
« Reply #4 on: December 07, 2011, 12:02:16 pm »

So now the AI will have a face when it destroys the internet.

Lovely.

BloodBeard

  • Bay Watcher
    • View Profile
Re: Cyberdorf Systems: Dwarven Animation
« Reply #5 on: December 07, 2011, 02:01:46 pm »

A video of an 8 frame animation on a 4 hatch display: http://mkv25.net/dfma/movie-2399-dwarvenanimation

It's not running as fast as it should and I think it's because it isn't quite optimized. It lags like hell as the FPS in the corner of the screen will tell you which could be helped with a better setup design like only having a single tile of 7/7 water to pump from rather then a basin. The less going on the better.