Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization: Call To Power > CtP-Creation > trouble animating sprites
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
12.Sep: `CTP CHALLENGE LADDER` - SEPTEMBER UPDATE
09.Sep: EARLY BUILD SPRITE EDITOR
02.Aug: `SUPERLEAGUE` SIGN-UP

bottom of page
  - CIVILIZATION: CALL TO POWER @ GAMESTOP $9.99 - CIVILIZATION: CALL TO POWER @ AMAZON $9.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
gemini is offline gemini
Settler

Jan 1970
time: 05:13
Question  Old Post 26-08-1999 09:53
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
trouble animating sprites Increase the size of your Attachments

Hi i am trying to animate a sprite and am not sure what i am doing wrong. Basically what i want to do is repeat 2 frames back and forth for a second. I ran the makespr program and it created the sprite but when i entered the game it is not animating. Below is a copy of the script. Please let me know what the hell i'm doing wrong. It is very frustrating since this is my first sprite.
##################################################
############
# This is a sample Unit Sprite script.
##################################################
############

0 # this leading zero is required (it can be any number. A number
# here is required, but ignored currently

#
# The UNIT_SPRITE keyword indicates that this is a sprite for units
#
UNIT_SPRITE
{
# The UNIT_SPRITE_MOVE tag specifies whether this sprite has
# a Move action. It has a value of either 0 or 1. If it's 0,
# no sprite action definition block is required. Since it's 1,
# this block is required.
#
UNIT_SPRITE_MOVE 1
{
# This is the sprite action definition block. All sprite
# actions require this block if the sprite action is defined.
#
SPRITE_NUM_FRAMES 2 # number of frames of animation
SPRITE_FIRST_FRAME 0 # the index of the first frame
SPRITE_WIDTH 96 # the width of each sprite image
SPRITE_HEIGHT 72 # the height of each sprite image
SPRITE_HOT_POINTS # the hot points (center points) of
# the sprite for each of the 5 facings
49 54 # facing 1
43 51 # facing 2
50 48 # facing 3
58 38 # facing 4
74 53 # facing 5
}

# The ANIM block is required for each UNIT_SPRITE_* action block
# that is defined (set to 1, and has a sprite action definition
# block.) It describes the animation that will pay, given the
# sprite frames described in the UNIT_SPRITE_* block.
#
ANIM 1
{
ANIM_TYPE 2 # what type of animation is this?
# 0 = sequential (play through from
# the first frame to the last
# defined frame
# 1 = looped (starts over at the
# first frame when it's gone
# through all of the frames
# 2 = back-n-forth (reverses
# direction of playback when
# it reaches the last frame,
# and playes back to the first
# before reversing direction
# again.
ANIM_NUM_FRAMES 2 # How many frames of animation?
ANIM_PLAYBACK_TIME 1000 # How much time does it take to play
# back the animation (in ms.) This
# is not currently supported.
ANIM_DELAY 100 # amount of time to repeat the very
# last frame of the animation before
# continuing (when playing looped
# or Back 'n Forth animations)
ANIM_FRAME_DATA # the list of the sprite frames to
1 2 # to play (must be the same number
# as defined in ANIM_NUM_FRAMES)

#
# The ANIM_MOVE_DELTAS are nudges applied to each frame of
# animation which bump the draw location the specified offset.
# They allow an single static frame to be moved around a fixed
# location, for instance.
#
# There's one per frame of animation as defined in
# ANIM_NUM_FRAMES
#
ANIM_MOVE_DELTAS 1
{
0 0
0 0









}

#
# This is a 4 bit transparency value, ranged from 0-15, to be
# applied to each frame. This allows the sprite to fade in or
# out over the course of animation, or whatever transparency
# might be used for. 0 is invisible, 15 is opaque
#
ANIM_TRANSPARENCIES 1
{
15 15

}

}

#
# The Attack animation for this sprite. As you can see, this
# unit doesn't have an Attack animation, so the tag's value is zero.
# Because this tag's value is zero, there's no sprite action
# definition block, and no ANIM {} block associated with this action.
#
UNIT_SPRITE_ATTACK 0

#
# The Idle animation for this unit. There's no Idle animation
# either.
#
# If this sprite had an idle animation, the format of the sprite
# action definition block would be exactly the same as the format
# of the Move block above
#
UNIT_SPRITE_IDLE 0

#
# This Unit DOES have a victory/death animation. For this sprite
# action definition block, and this one only (Victory) there's
# an additional flag field immediately following the
# UNIT_SPRITE_VICTORY tag, and that's UNIT_SPRITE_IS_DEATH, which
# is set to either 0 (indicating that this animation specifies
# a Victory animation--an animation to play when this unit wins
# a battle) or 1 (indicating that this is a death animation, which
# will play when the unit is killed.)
#
UNIT_SPRITE_VICTORY 0


#
# This is the Unit Sprite's Work animation (Special Animation)
# to be used when doing special attacks or special movement.
#
# As you can see, it's not defined.
#
UNIT_SPRITE_WORK 0

#
# Unit Sprite Attributes Section
#
#
# This section specifies a bunch of unit sprite attributes
#

#
# Firepoints
#
# This block indicates where on the sprite that ammunition should
# originate when the unit attacks. This is currently ignored.
#
UNIT_SPRITE_FIREPOINTS 0

# Work Firepoints
#
# This block indicates where on the sprite that the ammunition
# should originate when the unit special attacks. This is also
# currently ignored.
#
UNIT_SPRITE_FIREPOINTS_WORK 0

# UNIT_SPRITE_MOVEOFFSETS
#
# These are sprite nudges to be applied when the unit is moving.
# They are an alternate way of specifying how many pixels in each
# direction that unit should move. There's one pair of offsets
# (x,y) for each facing (1-5).
#
# These are not currently used in the engine.
#
UNIT_SPRITE_MOVEOFFSETS 0


# UNIT_SPRITE_SHIELDPOINTS
#
# This tag's block, when defined, allows you specify where the
# unit's herald shield will appear in the sprite for each of the
# 5 facings, for each of the 5 actions that the unit will perform.
#
# Often a fixed shield position wouldn't always work, as the shield
# might cover up an important part of the sprite. This block
# allows specific points to be used.
#
UNIT_SPRITE_SHIELDPOINTS 1
{
UNIT_SPRITE_SHIELDPOINTS_MOVE
82 9
82 9
82 9
82 9
82 9
UNIT_SPRITE_SHIELDPOINTS_ATTACK
48 36
48 36
48 36
48 36
48 36
UNIT_SPRITE_SHIELDPOINTS_IDLE
48 36
48 36
48 36
48 36
48 36
UNIT_SPRITE_SHIELDPOINTS_VICTORY
82 9
48 36
48 36
48 36
48 36
UNIT_SPRITE_SHIELDPOINTS_WORK
48 36
48 36
48 36
48 36
48 36
}

}
Also to let you know i created 2 frames for each facing for a total of 10 frames. I named them GU01MA1.0.TIF, GU01MA1.1.TIF, GU01MA2.0.TIF, GU01MA2.1.TIF and so on.

Thanks in advance.

------------------
Gemini

LittleWing is offline LittleWing
Warlord
France
Apr 1999
time: 05:13
Post  Old Post 26-08-1999 14:59
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Browse Apolyton AD-FREE

You have two frames 1 and 2 so you should change SPRITE_FIRST_FRAME 0 to SPRITE_FIRST_FRAME 1. And change change the frames number of the gu01ma files from 0 and 1 to 1 and 2.
[This message has been edited by LittleWing (edited August 26, 1999).]

Morgoth is offline Morgoth
Warlord
England
Jul 1999
time: 05:13
Post  Old Post 26-08-1999 16:29
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

gemeni
There are a few things you need to do to get your animations.

Firstly,how are your tiffs numbered? ie is your starting sprite 0 or 1. I assume its 1 or I don't think it will get through makespr.

As you've said the number of tifs are two this should mean you only have tiffs ..0 and ...1. The problem then in your animation sction is your quoting numbers 1 and 2. Makespr I think loops round and thinks 2 is actually Tiff 0 (I know if you start with 1 then all the animations quoted are actually1 higher than the Tifs used and the highest frame goes back to the start!).

Also, the timings don't mean a thing (as they say). with only two animations the sequence shown is Tif 0 then your animation Tifs but this looks like this probably shows 1 then 0 again. It may be more useful to extend and repeat the same tiffs to make sure they come up.

The final thing is what version of CTP are you using. 1.1 has an option to set the animation speed. This doesn't affect the speed only how many images will be displayed! eg set to slowest and you get 12 (I think this is the max) speed it up and you get down to 1).

Also, I only use animation type 1 which is pobably the most useful type.

Hope this helps.

gemini is offline gemini
Settler

Jan 1970
time: 05:13
Thumbs up  Old Post 27-08-1999 08:44
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Okay I finally got it working. The only thing I had wrong was the ANIM_FRAME_DATA. Instead of 1 2 i should have had 0 1. I wish they would have made a little better example cos the one that activision gave is kind of confusing. Any way i'm happy now. Thank you for replying to my post and once i'm done making my sprites i'll post them.

------------------
Gemini

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:13.
Apolyton Time is 00:13.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0381 seconds (89.51% PHP - 10.49% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net