Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Smooth animations  (Read 3429 times)

Idiom

  • Bay Watcher
  • [NO_THOUGHT]
    • View Profile
Smooth animations
« on: July 02, 2008, 08:55:54 pm »

Just suggesting this as the 1st step of the presentation arc (or a quick fix for now).

Quote
A healthy, unencumbered dwarven peasant takes one step every 10 frames.

How about having that dwarf be animated sliding to the next step across the 10 frames, rather than the 'blip-blip-blip'? It would look much cleaner, be easier to make sense of, you'd get a better sense of velocity, crowds would make more sense looking at them shuffle about...
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Smooth animations
« Reply #1 on: July 02, 2008, 08:57:55 pm »

No arguements here... however I can only guess there is a technical issue involved or something...
Logged

Reasonableman

  • Bay Watcher
  • ...Probably.
    • View Profile
    • Twitter is dead, long live Cohost
Re: Smooth animations
« Reply #2 on: July 02, 2008, 08:58:59 pm »

I have dabbled in the dark arts of programming, and I couldn't even get a basic grid to function properly. At my skill level, I have no clue what level of Hell trying to get this to work would be. I can't be sure of Toady's programming expertise, though the excellence that is DWAAARF FORTRESS lends some credence to the idea that he is an unstoppable programming god. Still, not a bad idea. Could cause even more CPU lag though, so I'd go for something else.
« Last Edit: July 02, 2008, 09:01:51 pm by Reasonableman »
Logged
A sane man must be reasonable, but a reasonable man need not be sane.

ivegotgoodabs

  • Bay Watcher
  • Horo
    • View Profile
Re: Smooth animations
« Reply #3 on: July 02, 2008, 09:11:13 pm »

eh, this is a pretty bad idea...
Logged

Idiom

  • Bay Watcher
  • [NO_THOUGHT]
    • View Profile
Re: Smooth animations
« Reply #4 on: July 02, 2008, 09:13:38 pm »

How would it lag more? Its the same path-finding calculated, it's just displayed differently.

OpenGL wasn't it? How can it be that hard to output something sliding between A & B when it's already been calculated for moving between A & B?
« Last Edit: July 02, 2008, 09:15:16 pm by Idiom »
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Smooth animations
« Reply #5 on: July 02, 2008, 09:16:22 pm »

because you expanded the moving animation budget by 10 times?
Logged

Idiom

  • Bay Watcher
  • [NO_THOUGHT]
    • View Profile
Re: Smooth animations
« Reply #6 on: July 02, 2008, 09:25:29 pm »

Just turn down the [G_FPS_CAP] in the settings then if you don't want it or if it affects performance.
This would be handled by the graphics card, wouldn't it? I don't see how that could slow the processor. The processor still calculates 10 frames either way.
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: Smooth animations
« Reply #7 on: July 02, 2008, 10:18:39 pm »

When the game is paused, do the dwarves keep moving into their destination square, or do they stop in between?  Either way, I think this could be a really big problem in terms of the way it currently cycles between different creatures it's displaying.  It would make the icons very difficult to read.  Frequently, one icon would be overlapping another.  How do you determine which belongs on top?
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Smooth animations
« Reply #8 on: July 02, 2008, 10:24:40 pm »

The game's engine as it is can not - and that is a very big not - display any number of tiles per cell greater than one.

But if it could... Oh how nice that would be.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Puzzlemaker

  • Bay Watcher
    • View Profile
Re: Smooth animations
« Reply #9 on: July 02, 2008, 10:30:37 pm »

Separate game frames and display frames, and it should be fairly easy to do?
Logged
The mark of the immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one.

Sylverone

  • Bay Watcher
    • View Profile
    • http://sylverone.deviantart.com
Re: Smooth animations
« Reply #10 on: July 03, 2008, 05:26:50 am »

The game's engine as it is can not - and that is a very big not - display any number of tiles per cell greater than one.

But if it could... Oh how nice that would be.
It will probably happen eventually, meaning that it will either come with the presentation arc or something, or it will come when the game can't be expanded any more without allowing it. For now, the current presentation is enough while other things are worked on.
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: Smooth animations
« Reply #11 on: July 03, 2008, 10:55:41 am »

Dwarf Fortress is fundamentally a grid-based game. While you can have smooth animations of things moving from one grid to another, it needs to happen "instantaneously" (i.e. between ticks) to avoid having the problem of things happening to creatures who aren't visually in the right cell. E.g. what happens if your peasant, halfway between cells, gets shot by a bolt? Or maybe he's right on the edge of a bridge as it collapses.

Every grid-based game I'm aware of that uses animations to move from one grid to another basically pauses all aspects of the game except for movement while movement resolves. This ensures that creatures are solidly in their grids when it comes time to resolve things like attacks, terrain deformation, and the like. However, such an approach is counterproductive for DF as it would mean more time taken just to show movement; an effective FPS drain for no significant gain.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Idiom

  • Bay Watcher
  • [NO_THOUGHT]
    • View Profile
Re: Smooth animations
« Reply #12 on: July 03, 2008, 08:10:32 pm »

And I suppose when DF goes 3D (or 2.5D) finally, the 'blip-blip-blip' will still be acceptable?
This will have to be implemented at some point. It can't remain this rigidly grid based forever.

And no, it won't remain 2D forever, as eventually there will be too much detail per tile to cram into the "/" flips. And don't forget boats will come eventually too.
« Last Edit: July 03, 2008, 08:15:24 pm by Idiom »
Logged

Drunken

  • Bay Watcher
    • View Profile
Re: Smooth animations
« Reply #13 on: July 04, 2008, 04:03:09 am »

It wouldn't necessarily have to be an fps drain, in theory a tick lasts for 1/40 of a second (thats what my frames are currently capped at) pausing the game for this 40th of a second already happens in theory. If the dwarf moves every 10 ticks he could move 1/10 of a square each tick and for the first 5 count as being on sqaure A, and the second 5 be counted as being on square B. I don't see this suggestion as being much harder to implement than some of the other more complicated ones.

Having said this I wish to point out that I believe DF is about gameplay and was never meant to be pretty. It's ascii, grid based and low resolution... and yet we all love it. We have seen what Toady can do over a few months, but would we rather that time was spent on smooth movement or on something that will greatly expand gameplay like the caravan arc, or improving adventure mode?
Logged
A stopped clock is right for exactly two infinitessimal moments every day.
A working clock on the other hand is almost never ever exactly right.

Idiom

  • Bay Watcher
  • [NO_THOUGHT]
    • View Profile
Re: Smooth animations
« Reply #14 on: July 04, 2008, 11:40:48 am »

Quote
For now, the current presentation is enough while other things are worked on.
Quote
Having said this I wish to point out ...or improving adventure mode?
ll
V
Quote
Just suggesting this as the 1st step of the presentation arc.
Note I never said 'now'.

Quote
to avoid having the problem of things happening to creatures who aren't visually in the right cell. E.g. what happens if your peasant, halfway between cells, gets shot by a bolt?
Like Drunken said, this is already taken care of. Whatever happens in between cells is snapped to a cell. Both the bolt and the dwarf, are aimed at the same destination cell. If the dwarf is on the edge of the bridge when it collapses, and he is moving onto the now empty cell as it does, then he falls like he already does (That last few feet is rather hard to skid to a stop in I would think).

Quote
it would mean more time taken just to show movement; an effective FPS drain
Outputting text is a noticeable drain? Calculating the frames is what takes the real power, and that's already there. Things move and change in the game at different speeds, so the whole window is already re-outputted every frame anyway.
What I'm trying to point out is that my suggestion does not require any new significant calculations.

Where's Toady lately? Usually he's around the suggestion forum more often. He'd have an absolute answer for how feasible this is.

Also, last minute change to the suggestion: Projectile's remain un-animated. It would look funky if they flew smoothly straight & then smoothly diagonal. The current system is fine for projectiles, as they should move too fast to see clearly anyway. Just creatures should be animated.
Logged