animation play featur request
Displaying 1-13 of 13 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
relaxis

some command like -

PlayAnimation()

that plays animated gifs, avi's, swf etc...

Posted on 2006-07-18 13:55:21

Omni

Animated GIFs are not supported.

You can break the animated GIF into a series of smaller GIF's. Then use your own while() loop and some clever use of the timer variable to display the images as an animation. (Cycle through the images, just like an animation).

I hear Verge supports very simple AVI files. It doesn't support DivX or Xvid or whatnot -- they must be basic AVI.

Posted on 2006-07-18 14:21:28

relaxis

what's your definition of a basic avi file? they come in hundreds of different codecs. if you mean anything that doesn't need a divx or xvid compressor then that means everything. if not then i'm afraid i don't understand what you mean.

I know that verge doesn't support animated gifs which is why I'm asking for the feature. like this you save a buttload of time coding because you could assign the gif animation to the object that is the entity - not to mention create some interesting introduction sequences.

Posted on 2006-07-18 14:48:25

Omni

Don't use any codecs that you wouldn't expect your players to already have installed, basically.

Plus GIF is copyrighted. Using GIF's isn't desirable, and if you already have the animation frames drawn, it's trivial to write code that will display them in order.

Posted on 2006-07-18 14:55:42

mcgrue

I think the gif era of being closed is over, Omni.

Posted on 2006-07-19 01:10:43

Omni

...Truly? ...Hmm. Nevermind then.

Posted on 2006-07-19 07:21:17

relaxis

Yeah - so you agree that it would be a good idea then - especially as.....

WIKIPEDIA -


On June 20, 2003, the United States patent on the LZW algorithm expired [4], which means that Unisys can no longer collect royalties for use of the GIF format in that country. Those bothered with the patent enforcement dubbed this day GIF Liberation Day. The equivalent patents in Europe and Japan expired on June 18 and June 20, 2004 respectively, with the Canadian patent following on July 7.

Posted on 2006-07-19 07:47:05

Overkill

Personally, I still disagree with adding support for animated GIFs, even IF the patenting issue around the file source is gone. Especially since Verge could already load GIFs into it, so really that changes very little. Verge opens all of its image formats using the Corona library, something that I'm sure most people would not want to mess with.

That, and it's fairly easy to make an animation system in VergeC, thus reducing the need for a file-format specific one written in C++. Of couse, if you don't want to make your own VergeC animation system, ask politely and I'm sure that someone could share something that works.

Posted on 2006-07-19 22:45:29 (last edited on 2006-07-19 22:47:23)

relaxis

Well. different strokes for different folks. I just suppose I'll cut and save each from from the animation I have and try to run the images ina sequence with timers.

question - pseudo code?


//load animation images
loadimage 1,2,3,4,5,6,7,8,9, blablablabla
//define variables
x = 1
//attempt to make pc count upwards
x+1
//switch statements
case x = 10 -
draw rectangle
blit image 1

case x = 20
draw rectangle
blit image 2
free image 1

case x = 30
draw rectangle
blit image 3
free image 2

etc....

Posted on 2006-07-20 07:49:26

zonker6666

heres a suggestion for animations using a single film strip file .... a sprite thats 32x32 with 10 frames of animation would be stored as a vertical (or horizontal) strip 32x320
.... then we would define the different animations ...

#define WALK 0
#define RUN 4
#define CRAWL 7


int CurrentAnimFrame;
int CurrentAnimation;

int AnimateStrip(int stripImg)
{

int retval=NewImage(32,32);

GrabRegion(0,(CurrentAnimFrame+CurrentAnimation)+32,32,(CurrentAnimFrame+CurrentAnimation)+32,0,0,stripImg,retval);
CurrentAnimFrame=(CurrentAnimFrame+1)%4;

return retval;

}


void SomeOtherFunction()
{
while(1)
{
UpdateControls();
if(key[SCAN_LEFT]) CurrentAnimation=WALK;
if(key[SCAN_LEFT] && key[SCAN_LSHIFT]) CurrentAnimation=RUN;
if(key[SCAN_LEFT] && key[SCAN_SPACE]) CurrentAnimation=CRAWL;
ClearScreen();
TBlit(myx, myy, AnimateStrip(animstrip),screen);
ShowPage();
}

}

Posted on 2006-09-11 22:48:16

zonker6666

just realized the request was for a hardcoded addition to the engine ----- so ignore my little suggestion :)

Posted on 2006-09-11 23:13:56

Gayo

From a quick Google it looks like there's free software out there to transform an anigif into a filmstrip, which could then be animated pretty easily on your own using stuff like the system we're designing in Sully. You'd need to teach it how long to pause between frames, but beyond that...

Posted on 2006-09-13 20:03:30

zonker6666

Last couple days I couldnt get the idea out of my head so I started work on a sprite editing tool -


Current features -

Editing the sprite by layers - (as you can see in the screenshot - the chick is naked - and the sword and armor are separate)
Setting animations and timing -
Merging all layers into a single sprite image.
Exporting all layers into a hardcoded sprite.
Generates all required code ( using a dma structure ) for using said sprite.

Planned features -

- Generating the code for physics and specific behaviours (such as jump heights - weapon reach - shield collisions )
- A sandbox for testing NPC behaviour.

Any comments - suggestions ?

Posted on 2006-09-17 09:23:15 (last edited on 2006-09-17 09:29:42)


Displaying 1-13 of 13 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.