Game Maker Community YoYo Games

Welcome Guest ( Log In | Register )

> Advanced Users Forum Rules

This is a Q&A forum for advanced GML users ONLY. Moderators will remove inappropriate topics. Make sure that you READ these rules prior to posting: Advanced Users Forum Rules

4 Pages V   1 2 3 > »   
Reply to this topicStart new topic
Making Animation Programs, ** Old Experts Topic **
AdilFaQah
post Oct 11 2006, 03:03 PM
Post #1


Whiz Kid
Group Icon

Group: GMC Member
Posts: 2933
Joined: 10-December 04
From: Pakistan
Member No.: 17641



Hey!
There are different ways of making an animation programs. But what is the most efficient way?

What my idea is, is to save the x, y, and image_angle etc of an object to a variable then. Each of this "packet" is related to a frame number. Like in frame one, I make all these changes, so when I go to frame two, the changes of the first frame are saved.

Hence, when I go to frame one the objects reset to the instructions in the packet for frame one. But is this method efficient? Or is it going to be slow with hundreds of frames, if so, then what is the better way? And how can other aspects of animation program can be implemented.

Here is what I have made so far. It is 8.80 KB and opensource. So you can learn from it or extend it instead of starting from a scratch. But you are not allowed to take it an mark it as your own creation.

Direct Download



-AdilFaQah

This post has been edited by xot: Apr 13 2008, 06:09 AM
Reason for edit: ** Old Experts Topic **
Go to the top of the page
 
+Quote Post
DarksideX
post Oct 11 2006, 07:30 PM
Post #2


GMC Member
Group Icon

Group: GMC Member
Posts: 547
Joined: 30-January 05
From: Sweden, Stockholm
Member No.: 20999



Ive never tried making a animation program so i decided to give it a go. Heres what i got.

ClickHere

It saves the objects x , y , image_angle , image_alpha in arrays. And in every frame it sets the object to the correct position and angle of that frame. I dont think this is the most efficent way to do this. But this is a good start i think.

Press F1 for controls

-Ali
Go to the top of the page
 
+Quote Post
MooCow
post Oct 11 2006, 11:22 PM
Post #3


GMC Member
Group Icon

Group: GMC Member
Posts: 260
Joined: 3-January 05
Member No.: 19162



On something where there will be a lot of frames, arrays will be slow. I reccomend using datastructures.
Go to the top of the page
 
+Quote Post
Josh
post Oct 12 2006, 01:29 AM
Post #4


eTronic Gaming
Group Icon

Group: GMC Member
Posts: 254
Joined: 1-June 04
Member No.: 10054



INI files? I'll give a shot at this. But the thing is you wanna know how to make a program where you animate the objects? Or something where people can import images/sprites and loop them or not and export them?
Go to the top of the page
 
+Quote Post
Juju
post Oct 12 2006, 09:08 PM
Post #5


GMC Member
Group Icon

Group: GMC Member
Posts: 922
Joined: 27-November 03
From: London, England
Member No.: 2708



QUOTE
What my idea is, is to save the x, y, and image_angle etc of an object to a variable
I would only record the variety of variables when and if they changed. For example, in frame 1 a blue circle would be at (0,0) then in frame 4 it could suddenly move to (5,0). It's more processor effecient and memory effecient only to record the changes of a value rather than record the value itself at all times.
Go to the top of the page
 
+Quote Post
AdilFaQah
post Oct 13 2006, 07:56 AM
Post #6


Whiz Kid
Group Icon

Group: GMC Member
Posts: 2933
Joined: 10-December 04
From: Pakistan
Member No.: 17641



MooCow: Ah yes, data structures will definitly be more faster. But I do find arrays easier to use. But at how many "frames" will the difference show?

Josh: I have seen only one frame-by-frame animator made with Game Maker. I mean fbf is so much better. I lets you make animations a lot more easily. And I am talking only about exporting. Importing will be difficult, but it should only be possible for file made WITH the program. I am talking about something like Flash.

theman: Yes, that will certainly make it faster. Why didn't I think of it...

-AdilFaQah
Go to the top of the page
 
+Quote Post
percsich.hu
post Oct 14 2006, 05:16 PM
Post #7


GMC Member
Group Icon

Group: GMC Member
Posts: 503
Joined: 24-January 05
From: Budapest, Hungary
Member No.: 20605



I also prefer data structures.
ds_lists are extremely powerful and easy to use. I have a 3D animation program 3D Animation Creator which uses ds_list. You can set keyframes, then the program calculates the inbetween frames.
Go to the top of the page
 
+Quote Post
Juju
post Oct 14 2006, 10:08 PM
Post #8


GMC Member
Group Icon

Group: GMC Member
Posts: 922
Joined: 27-November 03
From: London, England
Member No.: 2708



QUOTE
Yes, that will certainly make it faster. Why didn't I think of it...
I've done this kind of this before in other programming languages, you learn a few tricks on the way. Bear in mind that using a system of tweening, for example applying a horizontal speed and a vertical speed over a certain number of frames can also yeild good results.
Go to the top of the page
 
+Quote Post
AdilFaQah
post Oct 15 2006, 02:33 PM
Post #9


Whiz Kid
Group Icon

Group: GMC Member
Posts: 2933
Joined: 10-December 04
From: Pakistan
Member No.: 17641



DarksideX: I finally got around to seeing yours. It is pretty good, add a GUI and it could be better.

percsich.hu: Does your program only offer motion tweening? Shape tweening would be cool too.

theman: You sir, have solved my problem of adding motion tweeing. Thanks!

Hmm, and hey I was wondering instead of only discussing speed issuses, we could discuss things like tweening etc.
Go to the top of the page
 
+Quote Post
Pie Person!
post Oct 15 2006, 02:41 PM
Post #10


GM 6+ Lover
Group Icon

Group: GMC Member
Posts: 2063
Joined: 13-May 06
Member No.: 49850



You might see me every where, and you might see me doing many different things.
Well, the truth is, I am. I have MANY projects, and the crazy thing is that iv'e keped up with all of them at an avarage pace.

I have been intrested in software creation to, and Iv'e been planing some thing for along time.
It will be a highly complex task, I have already recorded someth'n 50 D&D effects like flames, 2 Image effects like motion blur, and I have encountered many MANY cool tools like multi alpha brushes!
It focuses on making a simple MS Paint, and increasing the content.

It will also include an animation tool.

My problem starts here, how can I save all of the subimages and then put them to gether in the right order to combinde it into an animated .GIF file in the click of the save button?
Go to the top of the page
 
+Quote Post
AdilFaQah
post Oct 15 2006, 02:47 PM
Post #11


Whiz Kid
Group Icon

Group: GMC Member
Posts: 2933
Joined: 10-December 04
From: Pakistan
Member No.: 17641



Actually, I know how to do that and I got my answer from the GMC. It used some external program to combine images with ascending numbers like "image1.gif, image2.gif,image2.gif" etc. Try searching the Extending GM forum.

And are you saying you have added those effects for fbf?
Go to the top of the page
 
+Quote Post
Pie Person!
post Oct 15 2006, 03:08 PM
Post #12


GM 6+ Lover
Group Icon

Group: GMC Member
Posts: 2063
Joined: 13-May 06
Member No.: 49850



Im say'n Those effects are currently in progress for my new program.

Thanks
Go to the top of the page
 
+Quote Post
AdilFaQah
post Oct 15 2006, 03:27 PM
Post #13


Whiz Kid
Group Icon

Group: GMC Member
Posts: 2933
Joined: 10-December 04
From: Pakistan
Member No.: 17641



I mean those effects will be able to be edited frame by frame? And is your program a frame by frame one?
Go to the top of the page
 
+Quote Post
ChipChamp
post Oct 15 2006, 03:41 PM
Post #14


ChipChamp Games
Group Icon

Group: GMC Member
Posts: 1170
Joined: 30-June 06
Member No.: 53759



I'm making a drawing program too and for the animation I just got this code from some guy in the nivice answers and questions forum about that. Although I decided to just save all the frames and then compile them in the sprite editor because the code is too long fo rme to understand... Lol
Go to the top of the page
 
+Quote Post
Pie Person!
post Oct 15 2006, 05:54 PM
Post #15


GM 6+ Lover
Group Icon

Group: GMC Member
Posts: 2063
Joined: 13-May 06
Member No.: 49850



It depends what mode you are animating in.

Frame by Frame mode-This mode does NOT support pre-animated effects, triggered paths, triggered rotations and triggered settings.etc
It DOES support redrawing and editing the animation images.etc

(You have to do all the frames your self)

Trigger Mode- uses paths for rotation and position and every thing is animated by a trigger.etc.

It supports only pre-animated effects (This mode does not support painting new pictures or non-triggered events.)
Go to the top of the page
 
+Quote Post
OpticalLiam
post Oct 15 2006, 07:13 PM
Post #16


GMC Member
Group Icon

Group: GMC Member
Posts: 868
Joined: 1-September 05
From: 127.0.0.1
Member No.: 34376



One word. Tweening.
Go to the top of the page
 
+Quote Post
Juju
post Oct 15 2006, 08:13 PM
Post #17


GMC Member
Group Icon

Group: GMC Member
Posts: 922
Joined: 27-November 03
From: London, England
Member No.: 2708



QUOTE
One word. Tweening.
laugh.gif Own'd.

QUOTE
My problem starts here, how can I save all of the subimages and then put them to gether in the right order to combinde it into an animated .GIF file in the click of the save button?
CODE
sprite_add_from_surface(ind,id,x,y,w,h)
I'm sure you'll think of an imaginative way to use that function.
Go to the top of the page
 
+Quote Post
coolsmile
post Oct 15 2006, 11:30 PM
Post #18


Programmer
Group Icon

Group: GMC Member
Posts: 1443
Joined: 24-March 05
From: USA :)
Member No.: 24617



Hey! lmaosmiley.gif I was working on a program like pivot and some other stick animation things, I have a simple example that I gave up on a couple months ago, it's not finished and not everything works but here is the link: Download Here

Edit: The link isn't working right now, but it is the right link sad.gif, just give it awhile wink1.gif

This post has been edited by coolsmile: Oct 15 2006, 11:40 PM
Go to the top of the page
 
+Quote Post
AdilFaQah
post Oct 16 2006, 09:32 AM
Post #19


Whiz Kid
Group Icon

Group: GMC Member
Posts: 2933
Joined: 10-December 04
From: Pakistan
Member No.: 17641



Pie Person!: Ah okay then.

OpticalLiam: Yes that is what I think too. I will be working on implementing it.

coolsmile: Hey it is really welldone. The frames system is pretty flexible.

Anyways check the first post. You can use it to add more things, and use it instead startong from a scratch.
Go to the top of the page
 
+Quote Post
Seeker
post Oct 16 2006, 11:55 AM
Post #20


GMC Member
Group Icon

Group: GMC Member
Posts: 435
Joined: 23-February 06
Member No.: 45109



Here's the link to a topic where I put together a script that lets you easily combine images from different files into a single animation. Click Here It may be of use to you. After that's done, if you want to export the image as a gif or whatever, you'll need an external program. I've heard that GMMagick can do that for you, but haven't investigated it myself.
Go to the top of the page
 
+Quote Post

4 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 9th February 2010 - 04:59 PM