Jump to content

Stack Animation Development


atreiu

Recommended Posts

  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Great! you can help me then! I still haven't even been introduced (in school) to grade 10 trigonometry yet :slant:. Can you write a direction (in radians) function from 0 to 2pi in math? Arguments are x1,y1,x2,y2. Return from 0 to 2pi radians

Edit: so if (x1,y1) was the center of a circle, (x2,y2) is a point on the circle represented as (cos θ, sin θ) and I need θ :P

Edit2: either arctan((y2-y1)/(x2-x1)) isn't working, or my bug lies elsewhere.

Edit3: I don't know delphi either :P I'm really just learning as I go along. Take a look at online pascal tutorials.

Edit4: I'm an idiot, I figured it out :)

Edit5: Hehe, I've almost got it now. Just need to make a matching fan animation and I'm all set :)

Edit6: Alright. I released it into the other thread. It's now available in all its bezier-curve goodness :P

Where did you post your new bezier-curve goodness animation. In the skins, you have the wobble and expand, but not bezier-curve.

And what's the difference between expand and wobble, I tested them both out, 1 after the other, and can't see a difference.

EDIT: ok so the Wind animation is the bezier-curve animation.

Also, to be truthful, I personally like fountain better than fountain2. Also, I cant decide which animation to use, Deal or Wind, because they're both awesome. Hopefully in newer versions, different stacks can have different effects.

Link to post

Fireworks has been made :D need more ideas!

@Atreiu: I haven't yet gone and taken a detailed look at fan stacks. However, I can report that index 0 is the topmost icon, and index count-1 is the lowermost icon. Could you do a dump of the following?

Width

Height

Width2

MaxCount

I have no idea what they might be... Max Count might be the "auto mode threshold" in the settings.

Edit2: ugh... having come up with a much simpler implementation of bezier curves, I want to shoot myself.

Link to post
Fireworks has been made :D need more ideas!

@Atreiu: I haven't yet gone and taken a detailed look at fan stacks. However, I can report that index 0 is the topmost icon, and index count-1 is the lowermost icon. Could you do a dump of the following?

[...]

I have no idea what they might be... Max Count might be the "auto mode threshold" in the settings.

Edit2: ugh... having come up with a much simpler implementation of bezier curves, I want to shoot myself.

Hi Andrew, your tutorial on Animation will help a lot, i think! Thanks.

To do a Dump add this to the end of your GetFanRect()

  // *** here you put together, what shall be dumped in one line. ***
// use IntToStr(value) to dump Integer values
// use IntToStr(round(value) to dump Real values rounded to Integer or
// use FloatToStr(vaule) to dump Real values completely.
outStr:= IntToStr(k1)+';'+IntToStr(k2)+';'+IntToStr(width)+';'+IntToStr(height)+';'+
IntToStr(Width2)+';'+IntToStr(Index)+';'+IntToStr(Count)+';'+IntToStr(MaxCount)+';'+
IntToStr(Result.Left)+';'+IntToStr(Result.Top)+';'+
IntToStr(Result.right)+';'+IntToStr(Result.Bottom)+';';

// *** here you write your String to the dump-file ***
assignfile(datei, 'C:dump.txt'); // <-- File name of the dump
if FileExists('C:dump.txt') then // if File exists, append the line, if not, create the File
Append (datei)
else
rewrite(datei);
writeln(datei, outStr); // write your Line
closefile(datei);

To your var-section add:

var
datei: Textfile;
outStr: String;

Link to post
haha yea but how would that work? 1 item coming from the top to bottom, then they all explode into position? Sounds pretty cool.

Yes I was gonna ask how it works too o_O

@Panta: Could you draw out (in paint or whatever) the path the icons will follow? I'm having troubles visualizing the direct path... I figured we were going for the mushroom cloud effect, but I'm not sure if I can do that without a: intense coding, or b: ugliness :P

Edit: this is what I was thinking:

post-87077-1233028055_thumb.jpg

Link to post
Yes I was gonna ask how it works too o_O

@Panta: Could you draw out (in paint or whatever) the path the icons will follow? I'm having troubles visualizing the direct path... I figured we were going for the mushroom cloud effect, but I'm not sure if I can do that without a: intense coding, or b: ugliness :P

Edit: this is what I was thinking:

Funny, i had a very similar idea last evening. I call it "snake" (you remember the number-eating ascii-reptile? :P) It would be something like in the screenshot. Red-path would be easier, I guess, something like the green-path would be more interesting (i love asymetrical animations like Wind)

I can never do this, but if Andrew likes the idea, maybe he does :D

post-90085-1233050552_thumb.png

Link to post
Funny, i had a very similar idea last evening. I call it "snake" (you remember the number-eating ascii-reptile? :P) It would be something like in the screenshot. Red-path would be easier, I guess, something like the green-path would be more interesting (i love asymetrical animations like Wind)

I can never do this, but if Andrew likes the idea, maybe he does :D

Ugh.... looks like a huge pain in the... to implement :( Both paths look pretty hard. For one thing, I can't tell how many icons are in every row/column because the last row can be different, and anything past the first column can be different :(

I'd have to loop through everything once, store the values somewhere, and re-call them. Way too much work for just a simple animation :P

Link to post
Ugh.... looks like a huge pain in the... to implement :( Both paths look pretty hard. For one thing, I can't tell how many icons are in every row/column because the last row can be different, and anything past the first column can be different :(

I'd have to loop through everything once, store the values somewhere, and re-call them. Way too much work for just a simple animation :P

hehe, no problem. ;)

Link to post

Could someone link me to a page on working with arrays in pascal/delphi and possibly the functions that have to do with arrays? Since this animation is really complex, I figured I'd need to store things in a 2d array...

Gah. This is gonna hurt :(

Link to post
Could someone link me to a page on working with arrays in pascal/delphi and possibly the functions that have to do with arrays? Since this animation is really complex, I figured I'd need to store things in a 2d array...

Gah. This is gonna hurt :(

http://delphi.about.com/od/beginners/a/arrays.htm

http://www.delphibasics.co.uk/RTL.asp?Name=Array

(Both sites are very good for Delphi-Ressources. First one for tutorials, second one for fast information)

Link to post
http://delphi.about.com/od/beginners/a/arrays.htm

http://www.delphibasics.co.uk/RTL.asp?Name=Array

(Both sites are very good for Delphi-Ressources. First one for tutorials, second one for fast information)

Hehe. Good. I love dynamic arrays. So much less work :P. Any programming language without 'em should be shot o_O.

Thanks for the link. Everything is working well.

Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...