Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Mega Man Animation
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mystify




PostPosted: Wed Nov 30, 2005 5:16 pm   Post subject: Mega Man Animation

Hey guys this is my first ever animation what do you think of it... its just a basic Mega Man animation Wink


Mega Man Animation.zip
 Description:
First Ever Animation

Download
 Filename:  Mega Man Animation.zip
 Filesize:  9.36 KB
 Downloaded:  405 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
iker




PostPosted: Wed Nov 30, 2005 6:23 pm   Post subject: (No subject)

Its a pretty darn good looking animation, but your code could have been [bold]GREATLY[/bold] decreased by using a loop.
Instead of showing " MEGA MAN ANIMATION!!!" you could of had a procedure and a locate (col,row) in it.
try something like
code:

var mmnumber, x, y : int := 0
colorback (black)
cls
procedure animation
    cls
    %Pic.Draw (animation,x,y...
    %put "megaman...
    View.Update
    delay (150)
end animation

%...

%mmnumber := mm5
%x:=8
%y:=15
animation
%mmnumber := mm6
%x:=9
%y:=20
animation
%mmnumber := mm7
%x:=8
%y:=27
animation

%...


obviously I'm not going to tell you exactly how the code goes, so that you have the chance to figure it out. I hope that this does help you out, if not, just ask again and I'll give you another hint:D

anyways, its pretty basic how to do it, good luck!
do_pete




PostPosted: Thu Dec 01, 2005 11:39 am   Post subject: (No subject)

Good job Claping You should put your pictures into an array and make you code less linear
AzureFire




PostPosted: Thu Dec 01, 2005 3:57 pm   Post subject: (No subject)

yea, an array would be much better, because you could number your image variables and put in a for loop and call it with the counter, for example.


code:
var megaman :array 1..10 of int
var x,y:int:=10
var font:int:=Font.New("serif:10")

%set each section of the array here
%using this example
megaman(1):=Pic.FileNew("pic1.bmp")
...
...


x:=0

for a:1..10 %note the 'a' counter
       Pic.Draw(megaman(a),x,y,picCopy)% put the 'a' counter in brackets after your array
       x+=1 %add one to 'x' variable this is the same as 'x:=x+1'
       Draw.Font("Mega Man Animation!",0,200,font,white)
       View.Update
       delay(150)
end for


That of course won't work as-is so you'll have to finish it, but remember you have to declare ALL of the array components.
RedRogueXIII




PostPosted: Sat Dec 03, 2005 4:14 pm   Post subject: (No subject)

i have the same comments as the ppl above but im guessing you probably want to have the user control megaman.

there are plenty of tutorials about moving a charcter so im going to skip the basics.

Just a little trick i think would be good for step by step animation when holding down one button.

in the loop have a count variable that increases everytime the loop cycles and your still holding down the button, when the count gets to a certain number then the picture changes, when it reaches the end of the animation set then the count is turned back into 0 so it repeats if your still holding down the button.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: