[Models] New option to apply animations to sprites

Moderator: Graf Zahl

Locked
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany
Contact:

[Models] New option to apply animations to sprites

Post by Tormentor667 »

Okay, I have no idea how hard or easy it is to implement that, but from a modders perspective, it would be very useful. As of now, model definitions look like this:

Code: Select all

Model SteelCrate
{
   Path "Models/Crate"
   Model 0 "Steelc.md2"
   Skin 0 "Steelc.png"

   Frame COL1 A 0 "frame01"
}
For each animation frame, you have to define one sprite for the actor. This works fine for static decorations like clocks, crates and trees. But what about complex actors with countless animation frames?

I am workong on some converted HL models, one of them has several complex movement animation frames which makes up a total of 300 frames for this actor. This would mean, that I have to create an actor that might look like this:

Code: Select all

Model ComplexActor
{
   Path "Models/cact"
   Model 0 "cact.md2"
   Skin 0 "cact.png"

   Frame COL1 A 0 "frame01"
   Frame COL1 B 0 "frame02"
   Frame COL1 C 0 "frame03"
   Frame COL1 D 0 "frame04"
   Frame COL1 E 0 "frame05"
   Frame COL1 F 0 "frame06"
   [..]
   Frame XYZ1 K 0 "frame300"
}
For my taste, that's definitely too many lines of code, and now imagine what happens if I want to add about 15 different monster actors that are as complex as this one.

Now I had thought about a solution and came up with this: What about the possibility to assign a whole animation sequence to one decorate sprite/frame instead only one animation frame?

Code: Select all

Model ComplexActor
{
   Path "Models/cact"
   Model 0 "cact.md2"
   Skin 0 "cact.png"

   FrameSeq POSS A 0 "index_start" "index_end"

}
What does that do? Let's imagine, the index_start is the frame number for the monsters first attack frame of the model, and index_end is the last attack frame of the model. Now, GZDoom would run through each model frame number beginning with the start and ending with the end in exactly the time, that the DECORATE states the duration for this sprite in the actor definition.

For better understanding, here is an example:

Code: Select all

DECORATE:
actor ZombieManModel : ZombieMan
{
   states:
      Melee:
          POSS E 35 A_CustomMissile(...)
          Goto See
}

Code: Select all

MODELDEF:
Model ComplexActor
{
   Path "Models/cact"
   Model 0 "cact.md2"
   Skin 0 "cact.png"

   FrameSeq POSS E 0 "10" "40"

}
In this case, when the Zombieman attacks the player with his melee attack, GZDoom shows the model animation from frame number 10 to 40 during the 35 tics the sprite is displayed.

Having this feature would absolutely rock and help me a lot during the development of TCotD3. I use a lot of HL conversion models that fit perfect for that setting but creating all the entries in the MODELDEFS for each of the 20 monsters and their 200 - 300 animation frames, it would take ages for me. With something like that, I could finish the monsters within one day.

As I said, I am no coder and I don't know in how far this is doable, but it sounds easy to me and I am sure there must be some little workaround that makes these things more comfortable to handle :)
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

If this were to happen, it would be in the form of a new model format, which has been discussed several years ago...
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany
Contact:

Post by Tormentor667 »

At least several years ago... that keeps me hoping :)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [Models] New option to apply animations to sprites

Post by Graf Zahl »

Sorry, I have no time for this. So unless I get some genuine help you are stuck with what you got.
Locked

Return to “Closed Feature Suggestions”