Skip to content

Commit

Permalink
New mesh animation system
Browse files Browse the repository at this point in the history
Scrapped the old crappy animation system because it made absolutely
no sense and was horribly limiting. The new system is based on two
mechanisms. The first is a new section in PIE files called ANIMOBJ
that modify the position, rotation and scaling of frames for the
given mesh level. The second is a new directive in PIE files called
EVENT which tells the game to use a different model instead when
the given event is triggered for the game object, such as burning and
moving.

There used to be three animations systems in the game - texture
coordinate flipping, key frames, and skeletal. Key frames are now
merely expressed in terms of skeletal frames in which scaling for
all but the key frame is set to a fixed -1000, which disables the
frame entirely.

The reason that this information went into the PIE files is simply
because it was easier. Making a new file format when there is current
exactly two models with proper animation (supercyborg and oil derrick)
made little sense. In the long run we should reconsider the whole PIE
format.

Scaling now actually supported, in all three dimensions. It used to
possible to specify in ANI files, but was never used. Each level can
now have separate animation framerates and cycle counts (how many
times to run an animation, zero for infinity).

Currently implemented for structures and droid bodies (which includes
cyborg feet).

The treatment of burning running and burning dying babas needs
further elaboration, but is currently broken anyways. Dying animation
needs to be triggered and removed somewhere.
  • Loading branch information
perim committed Dec 22, 2015
1 parent 98e0c1e commit b0ff2f4
Show file tree
Hide file tree
Showing 60 changed files with 1,226 additions and 3,503 deletions.
14 changes: 0 additions & 14 deletions data/base/anims/anim.cfg

This file was deleted.

91 changes: 0 additions & 91 deletions data/base/anims/blderik.ani

This file was deleted.

11 changes: 0 additions & 11 deletions data/base/anims/cybd_run.ani

This file was deleted.

44 changes: 43 additions & 1 deletion data/base/components/bodies/cybd_run.pie
Expand Up @@ -47,6 +47,13 @@ POLYGONS 16
200 3 20 14 22 29 201 39 213 29 213
200 3 25 21 24 39 187 29 187 29 199
200 3 25 24 15 39 187 29 199 39 199
ANIMOBJECT 166 0 6
0 0 0 0 0 0 0 1000 1000 1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
4 0 0 0 0 0 0 -1000 -1000 -1000
5 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 2
POINTS 24
12 0 -10
Expand Down Expand Up @@ -90,6 +97,13 @@ POLYGONS 16
200 3 18 12 20 40 201 49 213 40 213
200 3 23 19 22 49 187 40 187 40 199
200 3 23 22 13 49 187 40 199 49 199
ANIMOBJECT 166 0 6
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 1000 1000 1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
4 0 0 0 0 0 0 -1000 -1000 -1000
5 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 3
POINTS 26
12 0 8
Expand Down Expand Up @@ -135,6 +149,13 @@ POLYGONS 16
200 3 22 12 20 50 201 57 214 50 214
200 3 25 24 23 57 187 50 187 50 200
200 3 25 23 13 57 187 50 200 57 200
ANIMOBJECT 166 0 6
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 1000 1000 1000
3 0 0 0 0 0 0 -1000 -1000 -1000
4 0 0 0 0 0 0 -1000 -1000 -1000
5 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 4
POINTS 26
-4 9 -15
Expand Down Expand Up @@ -180,6 +201,13 @@ POLYGONS 16
200 3 23 22 15 39 201 29 213 39 213
200 3 20 25 14 29 187 39 187 39 199
200 3 20 14 24 29 187 39 199 29 199
ANIMOBJECT 166 0 6
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 1000 1000 1000
4 0 0 0 0 0 0 -1000 -1000 -1000
5 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 5
POINTS 24
-4 0 -10
Expand Down Expand Up @@ -223,6 +251,13 @@ POLYGONS 16
200 3 21 20 13 49 201 40 213 49 213
200 3 18 23 12 40 187 49 187 49 199
200 3 18 12 22 40 187 49 199 40 199
ANIMOBJECT 166 0 6
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
4 0 0 0 0 0 0 1000 1000 1000
5 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 6
POINTS 26
-4 0 8
Expand Down Expand Up @@ -267,4 +302,11 @@ POLYGONS 16
200 3 22 21 20 57 201 50 201 50 214
200 3 22 20 13 57 201 50 214 57 214
200 3 25 24 12 50 187 57 187 57 200
200 3 25 12 23 50 187 57 200 50 200
200 3 25 12 23 50 187 57 200 50 200
ANIMOBJECT 166 0 6
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
4 0 0 0 0 0 0 -1000 -1000 -1000
5 0 0 0 0 0 0 1000 1000 1000
1 change: 1 addition & 0 deletions data/base/components/bodies/cybd_std.pie
@@ -1,6 +1,7 @@
PIE 2
TYPE 200
TEXTURE 0 page-14-droid-hubs.png 256 256
EVENT 0 cybd_run.pie
LEVELS 1
LEVEL 1
POINTS 26
Expand Down
2 changes: 0 additions & 2 deletions data/base/components/bodies/cybdpjmp.pie
Expand Up @@ -115,7 +115,6 @@ POLYGONS 44
200 3 63 56 57 118 197 112 186 112 197
CONNECTORS 1
-16 4 40

LEVEL 2
POINTS 62
-4 1 3
Expand Down Expand Up @@ -227,7 +226,6 @@ POLYGONS 44
200 3 61 54 55 118 197 112 186 112 197
CONNECTORS 1
-16 4 40

LEVEL 3
POINTS 64
-4 8 16
Expand Down
1 change: 0 additions & 1 deletion data/base/components/bodies/cybdplnd.pie
Expand Up @@ -115,7 +115,6 @@ POLYGONS 44
200 3 63 56 57 118 197 112 186 112 197
CONNECTORS 1
-16 4 40

LEVEL 2
POINTS 62
-4 1 -7
Expand Down
5 changes: 4 additions & 1 deletion data/base/components/bodies/exbloke.pie
@@ -1,6 +1,9 @@
PIE 2
TYPE 200
TEXTURE 0 page-7-barbarians-arizona.png 256 256
EVENT 0 runanim.pie
EVENT 1 fireknee.pie
EVENT 2 runflame.pie
LEVELS 1
LEVEL 1
POINTS 16
Expand Down Expand Up @@ -30,4 +33,4 @@ POLYGONS 10
4200 3 11 10 9 2 1 8 18 7 146 1 146 1 162
4200 3 11 9 8 2 1 8 18 7 146 1 162 7 162
4200 3 15 14 13 2 1 8 18 158 98 152 98 152 114
4200 3 15 13 12 2 1 8 18 158 98 152 114 158 114
4200 3 15 13 12 2 1 8 18 158 98 152 114 158 114
22 changes: 21 additions & 1 deletion data/base/components/bodies/flamfall.pie
Expand Up @@ -25,6 +25,11 @@ POLYGONS 8
200 3 7 5 4 38 235 50 255 38 255
200 3 11 10 9 24 232 16 232 16 255
200 3 11 9 8 24 232 16 255 24 255
ANIMOBJECT 250 1 4
0 0 0 0 0 0 0 1000 1000 1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 2
POINTS 14
-11 46 -21
Expand All @@ -50,6 +55,11 @@ POLYGONS 8
200 3 9 7 6 25 234 37 255 25 255
200 3 13 12 11 138 195 126 195 126 221
200 3 13 11 10 138 195 126 221 138 221
ANIMOBJECT 250 1 4
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 1000 1000 1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 3
POINTS 12
-2 9 9
Expand All @@ -73,6 +83,11 @@ POLYGONS 8
200 3 7 5 4 153 222 169 250 153 250
200 3 11 10 9 16 232 24 232 24 255
200 3 11 9 8 16 232 24 255 16 255
ANIMOBJECT 250 1 4
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 1000 1000 1000
3 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 4
POINTS 14
-4 -5 -1
Expand All @@ -97,4 +112,9 @@ POLYGONS 8
200 3 9 8 7 126 195 138 195 138 221
200 3 9 7 6 126 195 138 221 126 221
200 3 13 12 11 37 234 25 234 25 255
200 3 13 11 10 37 234 25 255 37 255
200 3 13 11 10 37 234 25 255 37 255
ANIMOBJECT 250 1 4
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 1000 1000 1000
22 changes: 21 additions & 1 deletion data/base/components/bodies/runanim.pie
Expand Up @@ -31,6 +31,11 @@ POLYGONS 10
4200 3 11 9 8 2 1 8 18 7 146 1 162 7 162
4200 3 15 14 13 2 1 8 18 158 98 152 98 152 114
4200 3 15 13 12 2 1 8 18 158 98 152 114 158 114
ANIMOBJECT 250 0 4
0 0 0 0 0 0 0 1000 1000 1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 2
POINTS 18
9 0 -12
Expand Down Expand Up @@ -62,6 +67,11 @@ POLYGONS 10
4200 3 13 11 10 2 1 11 18 32 128 23 144 32 144
4200 3 17 16 15 2 1 11 18 52 146 43 146 43 162
4200 3 17 15 14 2 1 11 18 52 146 43 162 52 162
ANIMOBJECT 250 0 4
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 1000 1000 1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 3
POINTS 16
9 0 -12
Expand Down Expand Up @@ -91,6 +101,11 @@ POLYGONS 10
4200 3 11 9 8 2 1 8 18 7 146 1 162 7 162
4200 3 15 14 13 2 1 8 18 158 98 152 98 152 114
4200 3 15 13 12 2 1 8 18 158 98 152 114 158 114
ANIMOBJECT 250 0 4
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 1000 1000 1000
3 0 0 0 0 0 0 -1000 -1000 -1000
LEVEL 4
POINTS 18
9 0 -3
Expand Down Expand Up @@ -121,4 +136,9 @@ POLYGONS 10
4200 3 13 12 11 2 1 11 18 43 146 52 146 52 162
4200 3 13 11 10 2 1 11 18 43 146 52 162 43 162
4200 3 17 16 15 2 1 11 18 23 128 32 128 32 144
4200 3 17 15 14 2 1 11 18 23 128 32 144 23 144
4200 3 17 15 14 2 1 11 18 23 128 32 144 23 144
ANIMOBJECT 250 0 4
0 0 0 0 0 0 0 -1000 -1000 -1000
1 0 0 0 0 0 0 -1000 -1000 -1000
2 0 0 0 0 0 0 -1000 -1000 -1000
3 0 0 0 0 0 0 1000 1000 1000

0 comments on commit b0ff2f4

Please sign in to comment.