MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: Thu 17 Feb, 2005 8:45 am 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
Introduction
============
Hi again. In this document I'll research what the best possible solution is to make an animation 'player' for the game BattleCards.
After playing a card, you'll see a little animation of your character and your opponent what the effect of the played card is. This could be, for example, an animation of you shooting a fireball at your opponent or how you use heal to heal yourself.

Data
=============
Well. As you may know, BattleCards will feature different opponents, with each it's own animations. How many do we need? Let's see;
- Standing (0)
- Stricking/Attacking (1)
- Using magic (2) (opt)
- Getting attacked (3)
- Winning (4) (opt)
- Losing (5) (opt)

So in total at least 2 different animations for each character. The 2nd, 5th and 6th are optional. 0th is not an animation.

Next thing we need to determine is whether the animations sequences all have the same amount of frames or not. The answer is of course no. For example, the player's attacking animation will be longer than the slime ones. It can also be that some frames will be used more than once in a sequence (i.e.: frame 1, frame 2, frame 2, frame 3).

Last things, which is important, is whether the whole animation should move when animating or stand still and whether to loop it a certain times or not.

How to store all this? Well the best thing, which came into my mind is to store it like this:

Char_anim:
.db AMMOUNT_OF_FRAMES, LOOP_AMMOUNT, X_INC/DEC, Y_INC/DEC, FRAME1, FRAME2, FRAME3, FRAME4, FRAME5

- Well, AMMOUNT_OF_FRAMES will tell how many frames there are, which is quite important for the routine which will execute the animation.
- LOOP_AMMOUNT will indicate how many loops to do. This have to be at least '1'.
- X_INC/DEC will indicate whether to increase or decrease X. 1=Increasing with 1, 2=Increasing with 2, 3=Decreasing with 1, 4=Decreasing with 2
- Y_INC/DEC does the same for Y.
- After that all frame positions are stored.

The animation routine will receive the number of the 'character' which will be animated (Player, Snake, Slime...) and the number of the action to perform.
Every character will have a list of adress where it stores it's list of animations.

Player_animations:
.db H_Adress_of_Animations, L_Adress_of_Animations, ATTACKING, USING_MAGIC, GETTING_ATTACKED, WINNING,LOSING

If an (optional) animation has a 0 as value, it isn't avaible and the attacking animation will be played if called (which propably will not happen anyway).

When H_Adress_of_Animations,L_Adress_of_Animations adding to the startposition of all animations, you'll get the adress of the char animation.

A limitation of the approach as described above, is of course that all animations of a certain character may not have more than 255 including values for AMMOUNT_OF_FRAMES,LOOP_AMMOUNT,X_INC/DEC,Y_INC/DEC. So that's around max. 47 frames for every animation. Should be enough if you ask me.

Routine
============
So now we have all the data available we need. The routine will do the rest. Every frame (a preset value) it will display the next frame. If the LOOP_AMOUNT is set higher than 1, it will loop again. The animation routine will be called for both player and opponent. It is possible though to animate both at the same time. After playing the card a animation_loop routine will be called which will look like this:
Code:
Animation_Loop
{
   Call Animation(Player)
   Call Animation(Opponent)
   Plot_To_Screen
   Delay
   If Player or Opponent is not standing, than goto animation_loop
}


As said before the animation routine will than receive the 'character number' and the animation (Attacking, Using Magic, etc.) as input. It will delete the last frame from the buffer, plot the new one to it, and if the looped enough, it will set the inputed animation variable to 0.

The animations will have to be called from the cards, cause that's the point when it is decided which animation to be played. Of course first the values has to be set which animation to be set.

It als gives card developers the freedom to play an animation which most fits to their need.

As an bonus, there will be a custom animation, so that card developers can use that to make their own custom animation and play it. With that special effects can be used without programming this hard coded. (I know, I am to nice for this world =P). The custom animation has smaller limit than the premade ones; 25 frames can be used. The custom animation will be propably located in the saferam+1 and can be loaded with simple command ld (Custom_Animation_*Variablename*),a. (*Variablename* is in this instance of course the variable you want to load. i.e. AMMOUNT_OF_FRAMES).

_________________
Image


Last edited by kv83 on Wed 21 Jun, 2006 1:06 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu 17 Feb, 2005 10:21 am 
Offline
Maxcoderz Staff

Joined: Fri 17 Dec, 2004 5:33 pm
Posts: 790
Location: On the dark side of the moon.
It would be cool to have a standing animation. Like in command&conquer with the small soldiers cleaning their gun or doing push ups. You should consider it, it's something different from other rpg like ti83 games.

_________________
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version


Top
 Profile  
 
 Post subject:
PostPosted: Mon 20 Jun, 2005 3:34 pm 
Offline
New Member

Joined: Mon 20 Jun, 2005 3:19 pm
Posts: 2
Location: Shadows of the Night
Well, I barely just started programing, so i don't understand the routine you just displayed, but Having sprites to do all that you listed would be indeed cool, but Since i've been reading up on this game

It seems that you would have only about 1 main character sprites, the players. For the Player and the Monster. an then some weapon sprites layering them with each different card.

Maybe when it's your turn, and you deciding a car, you at the side you could have a walking animation. To show that you... um well it will just look cool, i havent seen your SS recently but i remember there was a lil space, But maybe my Idea wont work, becuase you also said stuff about "Hyper Bar" and i think other features, so i don't know if you'd have room.

Next Thing, is Like in Other Thread, Cyan had 2 layers, 21x16 (I think) and a 16x16 weapon, i dont no hu ur animator will be, but do the same thing. It should be a lot Ezier to Animate, but Since i don't program i dont how much harder it is to Load 2 srpites to the screen. So, I can't help you there, this is just an Idea.

Finally, LOL sorry for such Long Reply, This may not be relevent, but maybe when fill up your hyperbar, the players srpite changes. Just an Idea, And about the same length frames, to you couldd either double up the frames, EG. dieing, 3 frames, other dieing, 6 frames, double up the 3. Or if the bigger one is the problem, try redusing intervals.

I'll be thinking about your game, see if i can come up with ideas for the sprites. :)

_________________
-=l[l)ark-l2uner00]l=-


Top
 Profile  
 
 Post subject:
PostPosted: Mon 11 Jul, 2005 10:49 pm 
Offline
Regular Member

Joined: Mon 18 Apr, 2005 11:18 pm
Posts: 144
21 days later... Hows this coming along kv83


Top
 Profile  
 
 Post subject:
PostPosted: Tue 29 Nov, 2005 1:42 am 
Offline
Maxcoderz Staff

Joined: Sat 18 Dec, 2004 3:51 am
Posts: 1477
Location: Toledo, Ohio, USA
Apparently he's locked it temporarily.

_________________
Currently coming up with a new signature idea... since my forum avatar changer was killed by an upgrade...


Top
 Profile  
 
 Post subject:
PostPosted: Tue 29 Nov, 2005 1:52 am 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
Patori wrote:
Apparently he's locked it temporarily.

Apparently this topic hasn't been posted on in 3 months :P.
P.S. Someone is on a posting spree


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt