Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Fooling around with dwarf DNA  (Read 842 times)

The Dog Delusion

  • Bay Watcher
    • View Profile
Fooling around with dwarf DNA
« on: November 30, 2009, 04:43:52 am »

So after extensive research and much trial and error, a team of dwarven scientists and I have isolated the gene that can give DWARVES the gift of FLIGHT (incidentally, it's just adding the [flier] tag to the raw entry for dwarves). There seem to be a few noticeable advantages and disadvantages to this genetic alteration.

Firstly, it's not so great for framerate. I guess 3-dimensional pathing is pretty intensive. I wouldn't recommend pulling this off in a large fort. At least, not without making a backup or something. Also, prepare for your announcement log to be FILLED (to the F***ing brim) with "Urist McDwarf cancels task: Dangerous terrain" messages.

Secondly, constructing tall objects no longer requires scaffolding, or careful planning to prevent dwarves from building themselves into corners. and not only is construction easier, but fortress layout can be completely revolutionized, with large, open shafts rather than stairs, and even areas of the fort completely inaccessible to non-fliers. Upon further review (based on additional observation and what was said below), it would seem that it is impossible to build special "flier-only" buildings, as dwarves will only fly-path to a place where they could normally walk-path. Moreover, it would seem that the "Urist McDwarf cancels task: Dangerous terrain" messages are not only an indicator that the game doesn't like it when dwarves fly, but it seems that a "flying dwarf" and a "falling dwarf" have very few differences. Essentially, a flying dwarf is unable to perform even rudimentary tasks while in flight, which seems to include drinking, planting, eating, fishing, and sleeping. In fact, it would seem that they're pretty much unable to do anything that doesn't involve combat, and even that, upon closer examination, seems to be littered with task cancellations.

Thirdly, sparring dwarves seem to spar in 3 directions...which is weird looking, but I imagine much more entertaining for onlookers than just normal 2-dimensional sparring. Additionally, Military dwarves can be ordered to patrol in a 3-dimensional route, which allows for myriad possibilities with marksdwarves, clever constructions, and perhaps lava.

Lastly, actual dwarf-on-non-flying-enemy combat seems to be now tilted in favor of the dwarves. Villagers can now easily flee goblin marauders in the up direction (though some still stupidly path along the ground at goblin-level), and actual attacks can, in some instances, resemble a hawk-like swoop onto the target (think hammerdwarves with jetpacks), or flying snipers, safely out of reach (provided they're smart enough to keep their distance in terms of z-levels).


On the whole, I would say that the experiment was a rousing success a perplexing yet thought-provoking failure, and I encourage any brave fortress-masters with a decent CPU and a penchant for the wacky to give this a shot. I'm sure I missed (and misinterpreted) plenty of what I observed in my brief foray into the word of dwarven genetic manipulation, but perhaps, at the very least, this should make for some interesting food-for-thought, if nothing else.

It would seem that until we can solve the flying=falling conundrum, dwarves will not be meant to fly.

« Last Edit: November 30, 2009, 05:43:43 am by Fish »
Logged
Keep in mind that the dwarves are essentially alcoholic toddlers, and act accordingly.

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Fooling around with dwarf DNA
« Reply #1 on: November 30, 2009, 05:01:33 am »

So after extensive research and much trial and error, a team of dwarven scientists and I have isolated the gene that can give DWARVES the gift of FLIGHT (incidentally, it's just adding the [flier] tag to the raw entry for dwarves). There seem to be a few noticeable advantages and disadvantages to this genetic alteration.

Firstly, it's not so great for framerate. I guess 3-dimensional pathing is pretty intensive. I wouldn't recommend pulling this off in a large fort. At least, not without making a backup or something. Also, prepare for your announcement log to be FILLED (to the F***ing brim) with "Urist McDwarf cancels task: Dangerous terrain" messages.

Secondly, constructing tall objects no longer requires scaffolding, or careful planning to prevent dwarves from building themselves into corners. and not only is construction easier, but fortress layout can be completely revolutionized, with large, open shafts rather than stairs, and even areas of the fort completely inaccessible to non-fliers.

Thirdly, sparring dwarves seem to spar in 3 directions...which is weird looking, but I imagine much more entertaining for onlookers than just normal 2-dimensional sparring. Additionally, Military dwarves can be ordered to patrol in a 3-dimensional route, which allows for myriad possibilities with marksdwarves, clever constructions, and perhaps lava.

Lastly, actual dwarf-on-non-flying-enemy combat seems to be now tilted in favor of the dwarves. Villagers can now easily flee goblin marauders in the up direction (though some still stupidly path along the ground at goblin-level), and actual attacks can, in some instances, resemble a hawk-like swoop onto the target (think hammerdwarves with jetpacks), or flying snipers, safely out of reach (provided they're smart enough to keep their distance in terms of z-levels).


On the whole, I would say that the experiment was a rousing success, and I encourage any brave fortress-masters with a decent CPU and a penchant for the wacky to give this a shot. I'm sure I missed (and misinterpreted) plenty of what I observed in my brief foray into the word of dwarven genetic manipulation, but perhaps, at the very least, this should make for some interesting food-for-thought, if nothing else.



Fps is a significant concern of mine.

I imagine that the biggest eater of fps would be pathing into the vast blue yonder above the fortress. But if the dwarves sealed themselves into wind tunnels under the mountain, would the hit on fps be as bad, I wonder? I'm sure the cancel spam is a significant cause of that as well.

I didn't mod flying onto the dwarves, but I did give it to a modded-in enemy. They flew over my traps and the wall I made to keep out goblin invaders, and pulled off the same swooping attacks that you record your dwarves exhibiting. Elite marks-enemies are particularly dangerous.

I do question some of what you observed - namely, that a fortress can be built with place inaccessible to non-flying creatures by flying dwarves - because as far as I know flying pathfinding is very imperfect: flying enemies generally only path to places they can reach on foot, though the paths they end up taking are through the air. Another bug is that flying enemies can be spawned in mid-air, because they are disconnected from the ground, they will never move from their starting location until they are disturbed later. They don't even attack units on the ground in this state.

My current megaproject at the time of testing was a city of towers, and once I suffered a large ambush while my masons were working on the bridges that connected the fourth level together with my sky-bridge. The enemy flew over my line of cage traps and crossed my wall, and proceeded to chase my masons through the scaffolding and open walls, or through the city's empty streets while they hovered menacingly overhead. I hastily activated all my champions, but only two responded in thing, and they were trapped on one of the towers by a squad of flying macemen. I watched one of my soldiers get blasted off the sky bridge to the ground 5 levels below, and then have the guy who did it come flying over to join the guys circling the air around my lone swordsdwarf.

I think I will test this later myself. Maybe a small fortress for ~30 fliers, with one of the options to cull cancel announcements turned on...
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Fossaman

  • Bay Watcher
    • View Profile
Re: Fooling around with dwarf DNA
« Reply #2 on: November 30, 2009, 05:06:21 am »

Quote
areas of the fort completely inaccessible to non-fliers

This also raised my eyebrows. While interesting, if true, I'm fairly certain the pathfinding doesn't allow it.

I have to say it would be fun to design a fortress for flying creatures, though. I'm thinking drilling a big old shaft straight down into a mountain and digging caves around its circumference would be the way to go. Chasms and bottomless pits would make nice ready-made fortress locations too.
Logged
Quote from: ThreeToe
This story had a slide down a chute. Everybody likes chutes.

G-Flex

  • Bay Watcher
    • View Profile
Re: Fooling around with dwarf DNA
« Reply #3 on: November 30, 2009, 05:16:43 am »

Yeah, I'm pretty sure the connectivity maps (or whatever it is) that DF generates (in order to determine which areas of the map are accessible from which other ones) assume ground travel only.

In other words, creatures will path through the air, but if a place wouldn't be accessible via ground, they won't even try to begin with.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

The Dog Delusion

  • Bay Watcher
    • View Profile
Re: Fooling around with dwarf DNA
« Reply #4 on: November 30, 2009, 05:19:32 am »

Yeah, the part about building crazy flier-forts (as well as constructing with fliers) was conjecture based on around 30 minutes of fooling around in an already-built non-flier fort. If what darkflagrance says about flier pathing is true, that would certainly kill some of the potential awesomeness (or awesome potentialness) of flier-forts, but I'll mess around a bit and see what I can do with it.

I'm not sure how much experimentation has been done with flier pathing, but adding the tag to dwarves (ie creatures you can issue commands to) certainly opens up a lot of possibilities regarding possible tests and such.

I'll keep you posted on what I can confirm/disprove in future posts.


edit: yeah, so it seems that in my haste to test dwarven flight for it's military applications, I ignored the obvious, which is that the laws of dwarven physics dictate that flying = falling. hence, flying dwarves can't really accomplish anything other than having their tasks cancelled... a pity, really.
« Last Edit: November 30, 2009, 05:45:25 am by Fish »
Logged
Keep in mind that the dwarves are essentially alcoholic toddlers, and act accordingly.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Fooling around with dwarf DNA
« Reply #5 on: November 30, 2009, 05:50:51 am »

Born to crawl can't fly. :) Pathfinding doesn't allow it, it's close to the issue with waterbreathing: if dwarves think it's dangerous to levitate or be underwater, they won't do anything (but will gladly march to a battlefield to claim a sock or dive in magma to clean some stone).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

The Dog Delusion

  • Bay Watcher
    • View Profile
Re: Fooling around with dwarf DNA
« Reply #6 on: November 30, 2009, 05:57:50 am »

if dwarves think it's dangerous to levitate or be underwater, they won't do anything

Indeed - it's like that scene in Willy Wonka and the Chocolate factory, when they drink the "Fizzy Lifting Drinks" and then float uncontrollably toward the ceiling. I imagine that the dwarves were wildly pinwheeling through the air, using any nearby surfaces for traction and momentum, and were never quite able to adapt to their new airborne status.
Logged
Keep in mind that the dwarves are essentially alcoholic toddlers, and act accordingly.