Jump to content

Walking animation speed


Recommended Posts

I think the walking animations of xenonauts are a bit off. The units seem to "float" and "glide" and not have a proper connection to the ground. I think it's because of the animation speed is a bit too slow compared to the speed the sprites are moving. Fixing this little thing (either by slowing units a bit or speeding the animation, or a bit of both) should make a world of difference in grounding the units in the game world.

Maybe there could even be an option to alter unit movement speed

Link to comment
Share on other sites

Even though movement is tied to the grid, i believe animation speed can be fine-tuned without re-rendering.

Skitso, if you'd want to, you can research a bit.

Download standalone (it has it's assets unpacked), and tinker with the animation xml's. Last time i've seen they got an obvious frametime="35" parameter. Even without knowing how the engine works you can change the numbers and see what will happen.

Then proceed to the Modding section, create a thread there and show people the results.

Link to comment
Share on other sites

mmm. very unlikely. they're all 2d renderings and it'd take a massively long time to rerender them. you'd have to drop frames to speed them up.

yay crappy game engine.

It's not like you would need to re-render everything. Just display the existing frames faster to fit the speed xenonauts are moving in the gameworld.

I myself am not a technically gifted, so this was just kind of a tip for the developement team to consider to make the game even better and more polished.

Link to comment
Share on other sites

The animation speed is just a text file number. It's in the run_(direction)_spectre.xml for each of the weapon / armour combos in the game, so it's easily editable with Wordpad or Notepad. I think those files are only in the standalone, though - they're zipped up in the Desura version.

I'm happy to tweak the run speed for all the soldiers - we can probably do a global search and replace on it once we settle on a worthwhile value.

They're presently being displayed at a frametime of "35". You think this should be sped up? The unit move speed is also an option we can customise but I think we sped it up originally because people complained their soldiers took too long to move, so I'd rather speed up the animation than slow down move speed.

If anyone wants to play with the animations to come up with more "realistic" values too, I'm happy to hear what they find.

Link to comment
Share on other sites

After a study i've made yesterday i should say it's not that simple i've been thinking at first.

Skitso, you are looking in the right file.

If you look here: assets\units\xenonaut\armour.basic\weapon.AlienHeavyPlasmaRifle\run_*.xml, you'll see the tag "<timeline name="main" frametime="35">", but it's absent in almost all of other armour/weapon combinations. Except from the MAG-weapons, which have a timeline tag, and, weirdly enough, a frametime of 50. That means, the units with such weapons have slower run animations now.

That's also means that simple search and replace will not work. And there are 1401 of these files.

Some files also have a "D:\Chris England\New Task\Received File\Basic_unarmed\unarmed\SW\run_sw.xml" instead of proper sequence name.

I can't clarify this situation and Chris is probably busy with the bughunting, so we're gonna wait.

Link to comment
Share on other sites

Okay, I changed xenonaut with basic armour armed with machine gun to use frametime of 25 in running animations and it sure looks a lot better already! Maybe should be a bit slower value .. (maybe 30?) I don't know if other animations like shooting and going prone should be fixed too, but the running was the most important and it looks much better this way as the animation speed matches better with the units running speed. Maybe jumping over obstacles should be made a bit faster too..?

Edited by Skitso
Link to comment
Share on other sites

I'd personally look upon standing/sitting animations too, as the delay sometimes bother me.

About the best value, it could really help if someone will make some kind of media (video or animated gif) with several animation speeds compared. My hands are full at the moment, sorry.

Link to comment
Share on other sites

It's not only about the animation speed but the relation to xeno's moving speed. It's really fast to experiment on your own actually. Just alter one troop (for example a xeno with basic armour and machine gun) it's only 8 files. Then in game equip all troops with machine gun and move troops around.

Edited by Skitso
Link to comment
Share on other sites

Yeah, too much work to be done by hand. (and without salary :)) I really hope Chris gets this fixed in the final game as it makes the otherwise good looking animations seem a bit unfinished.

If the formatting of "<timeline name="main" frametime="35">" is always the same, you can do a multi-file search&replace.

Something like Textpad 5 will do that.

1. Use the windows search to get a list of all relevant files,

2. drop them into the editor,

3. do a search&replace in "all open documents",

4. "save all open documents".

If you didn't close them, you can restart at 3. and keep experimenting with like zero effort.

Link to comment
Share on other sites

If the formatting of "<timeline name="main" frametime="35">" is always the same, you can do a multi-file search&replace.

It isn't, as i said earlier. Some effort have to be applied.

Also, i doubt textpad 5 will support 1400 files simultaneously, but it will speed the process, of course.

Link to comment
Share on other sites

Max_Caine, i believe that's about moving speed, e.g. speed with which the units are moving. That speed is set in just one place.

We're talking about animation speed, with which the frames are changed to create animation. This speed is set for every animation in corresponding xmls.

Link to comment
Share on other sites

Yes, to clarify:

There's a global movement speed attribute for all units that control how fast they move across the screen, set in gameconfig.xml.

There's also an individual attribute for each animation that controls how long each frame is displayed for, set in the _spectre.xml file accompanying each animation.

The one we need to modify en-masse is the second one, which controls the animation frame speed. The default animation speed is 50 (also used if there is no "frametime" set), but we want it to be 35 for the run animations. If 35 turns out to be too slow then it could be sped up to 25 or 30 or whatever works best.

Two problems: one, it appears not all the spectres have been correctly set to 35 in the first place. Having inconsistent run animation speeds is a bad thing in general, but it also means changing the move speed won't help as not all run animations are set to 35 anyway.

Secondly, as others have noted it is a big job to change the run speed in all of the spectres - there's 8 run spectres for each weapon / armour combo, of which there are several hundred. Lots of files to change.

So what needs to be done is this - all the run spectres need the following lines added to them (35 to be replaced with whatever the final animation speed is):

<timeline name="main" frametime="35">

<keyframe frame="1" />

<keyframe frame="2" />

<keyframe frame="3" />

<keyframe frame="4" />

<keyframe frame="5" />

<keyframe frame="6" />

<keyframe frame="7" />

<keyframe frame="8" />

<keyframe frame="9" />

<keyframe frame="10" />

<keyframe frame="11" />

<keyframe frame="12" />

<keyframe frame="13" />

<keyframe frame="14" />

<keyframe frame="15" />

<keyframe frame="16" />

</timeline>

Some of these files already have those lines, some don't. We use notepad++ at Goldhawk and that can search and replace throughout an entire directory, and does so fairly quickly. It can also support regular expressions, including wildcard characters.

One of the major problems would be only changing the run animation spectres, though, as every other animation has similar text in it so we'd need to somehow filter the files affected down to only those with "run" in the title.

Link to comment
Share on other sites

Done and done. Normalised all the xml files and changed speed to 28 (Skitso, i'm rely on your data, but it's gonna be easier to batch-replace now if speed isn't right)

https://dl.dropbox.com/u/60491525/xeno/assets.zip

Unpack this in your xenofolder. While it shouldn't kill the game right away (checked), it would be wise to have a backup.

Oh lawd, regular expressions are so sexy! I should've learned them a long time ago!

Link to comment
Share on other sites

Whaa...? Impressive. This'll certainly save us a bit of time, thanks for that.

All the other animations work in the same way (except for the number of frames) so if people feel the need to change the speed on them I assume that can be dealt with in a similar manner.

Link to comment
Share on other sites

Someone mentioned making a gif or something to showcase different frame rates. Perhaps once several different values are selected, there could be a vote on the community involvement board to decide which looks the most realistic, if that'd help. I for one would like to see the differences between the original and the new one/s, at any (frame) rate (see what I did there?).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...