Duke4.net Forums: Custom .ANM support - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Custom .ANM support

User is offline   TerminX 

  • el fundador

  #1

I've been bored lately and have been rewriting another of what I considered to be one of the worst bits of code in all of EDuke32, which is the .ANM support. This code was originally directly based on rather poorly written reference code from 1989 or 1990 and I've decided to rework the majority of it to meet my personal standards for code cleanliness and hand optimization.

At the same time, I'd like to finally add some control over .ANM playback. What would you guys like to see? I'm thinking each .ANM will have its own entry in an internal table; all of the original .ANMs will have hardcoded defaults which can be overwritten and there will be a new CON command similar to definesound which will set up these parameters and allow you to add in custom animations. Along with this will probably be a CON command to start playback of the animation at a specified index. There will probably be flags to control stuff like looping the animation or being able to skip it with keypresses.

I believe I will add control for which sounds are played during the animation by creating a new event that occurs once for each frame of animation; the RETURN var will default to whatever frame is being drawn, allowing new sounds to be played, and whatever the value of RETURN is at the end of the event will be the frame passed to the internal function that each hardcoded .ANM has to dictate which sound is played on a given frame. This means that overriding the sounds from the default animations will be as easy as a switch/case setup that plays different sounds and a "setvar RETURN -1" at the end of the event.

Questions/comments?
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#2

Will there still be a limit on how many frames can be in a single ANM, currently I think it is 255 or 256.

Ninja edit: I still say that someone should add this at some point... I would pay money for it to be. <_<
http://theora.org/

This post has been edited by The Commander: 14 March 2010 - 10:05 PM

0

User is offline   TerminX 

  • el fundador

  #3

Well, it looks like the rewritten version would support more than 256 frames, but it depends on whether the ancient utilities to create the things will make them with that many I suppose.
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#4

View PostTX, on Mar 15 2010, 10:17 PM, said:

but it depends on whether the ancient utilities to create the things will make them with that many I suppose.

I dont think it does, So is it possible to define them ourselves using some sort of command like the "animtilerange"

Although, I think this isn't possible?
0

#5

I'm liking the ideas for more control over .anm, that would be very useful.

As for the limitations, I'm sure I made an .anm with more than 255 frames once and it was the game that told me off for it... but I am probably wrong. I suppose it could be done the way tat 3DR did it and split long animations into several sorter ones to work around the limitation. I suppose it isn't too unlikely that if the 255 frame limitation were removed that someone would make a better utility for creating the files, the limitation that worries me is the fact that you are bound to the games palette in the anm files. ProASM came up with an alternative that might be worth taking a look at where you could use a .zip file full of images to replace an .anm file for SW.
0

User is offline   necroslut 

#6

Being able to define when the ANM:s will play would be useful, like before first episode or even between levels in an episode.
0

User is online   Hendricks266 

  • Weaponized Autism

  #7

Posted Image

See here for my thoughts.
0

#8

just how do you make these things anyway? I never really looked into it, but I guess I always wondered.

This post has been edited by Colon Semicolon: 15 March 2010 - 05:32 AM

0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#9

View PostColon Semicolon, on Mar 16 2010, 02:30 AM, said:

just how do you make these things anyway? I never really looked into it, but I guess I always wondered.

You need this program here.

http://archive.dukertcm.com/knowledge-base...rt/anim2pcx.zip

A real pain in the ass to work with, I am not aware of any other programs.
0

#10

wouldn't it be pertinent to have something more modern to work with then? very few people are going to really benefit from updated handling code if the programs for creating the animations is totally unfriendly.
0

#11

View PostHendricks266, on Mar 15 2010, 12:42 PM, said:



I guess pigs do fly after all!
0

User is offline   TerminX 

  • el fundador

  #12

View PostHendricks266, on Mar 15 2010, 04:42 AM, said:


A lot of that stuff is irrelevant. You don't need specific definitions for which sounds play or how many animations are used when they're divided up or what episode it's for or anything like that, all you need is a command to inform EDuke32 of the animation's existence, a command to start playback of an animation, and an event that runs once per frame during playback. Everything else mentioned there will be possible with those key things. If you want an animation to be separated into multiple files, just start playback of another file on the last frame of the current one.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#13

- Ability to change the original ones. For example, moving episode The Birth to slot 5 alogn with the intro and ending sequences.
- Ability to set sequences before level, beetween level and in the episode end. All of them to be ignored in DM mode.
- Support to Avi video or similar.

This post has been edited by Fox: 16 March 2010 - 02:49 AM

0

User is online   Hendricks266 

  • Weaponized Autism

  #14

View PostFox, on Mar 16 2010, 05:49 AM, said:

- Support to Avi video or similar.


OGG Theora.
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#15

View PostFox, on Mar 16 2010, 11:49 PM, said:

- Support to Avi video or similar.

View PostHendricks266, on Mar 17 2010, 01:28 AM, said:

OGG Theora.

View PostThe Commander, on Mar 15 2010, 07:03 PM, said:

I still say that someone should add this at some point... I would pay money for it to be. <_<
http://theora.org/

My offer still stands. <_<

This post has been edited by The Commander: 16 March 2010 - 05:11 AM

0

User is offline   Gambini 

#16

any modern format support would be really an improvement.
0

User is offline   HellFire 

#17

Cool Stuff TX.
And IMO the .MNG (or another animated png) is the best choice for ANMs for the HRP or other hires projects.
0

User is offline   supergoofy 

#18

It seems that the new eduke32 r1617 has problems with some mods.

For example Zombie Crisis was working fine with eduke32 r1612, but it doesn't work with eduke32 r1617 (crashes right after it is launched).
0

User is offline   EHCB 

#19

I like these ideas very much, very much indeed; it's always felt kind of like the missing ingredient for Dule modding tools for me.
0

User is offline   TerminX 

  • el fundador

  #20

View Postsupergoofy, on Mar 16 2010, 11:00 AM, said:

It seems that the new eduke32 r1617 has problems with some mods.

For example Zombie Crisis was working fine with eduke32 r1612, but it doesn't work with eduke32 r1617 (crashes right after it is launched).

I'll have to test that out. Can you see if it starts up with -nologo?
0

User is offline   supergoofy 

#21

I tried to play with eduke32 -nologo but it still crashed.

This post has been edited by supergoofy: 16 March 2010 - 03:43 PM

0

User is online   Hendricks266 

  • Weaponized Autism

  #22

I also forgot about MNG/APNG. JonoF recommended MNG years ago.
0

User is offline   TerminX 

  • el fundador

  #23

No crashes here, so maybe the changes I've made since my last commit fixed it.
0

User is offline   supergoofy 

#24

I used the pure r1617. I downloaded also the compiled from http://hendricks266....duke32_r1617.7z , thus to make sure that it wasn't my fault (wrong way/errors in compilation of the source).

I will wait till your next commit to the svn repository. Till then I think I will stick with r1612 (and in a worst case scenario I will use r1599 or older).

This post has been edited by supergoofy: 16 March 2010 - 05:46 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options