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

Username:   Password: 
 RegisterRegister   
 star animation
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jubjub500




PostPosted: Thu Apr 23, 2009 9:03 pm   Post subject: star animation

I need some ideas for an animation my idea is to show the life cycle of a star.
i wanna include an explosion like a supernova and some text telling what is going on in each stage
So what should i start on first im so lost.
(noob at turing)
Sponsor
Sponsor
Sponsor
sponsor
Dusk Eagle




PostPosted: Thu Apr 23, 2009 10:19 pm   Post subject: Re: star animation

Try something less ambitious? You really shouldn't start programming with graphics until you understand basic programming concepts. You are doomed to make a mess of this project if you do not first learn a bunch of the concepts in the Turing Walkthrough.
tjmoore1993




PostPosted: Fri Apr 24, 2009 8:41 am   Post subject: RE:star animation

When accomplishing a project you must think small. If you start going into detail before you start; you may come across multiple problems durring the start of the project.


Tips:

Make a project that is similar to the star animation but acts more like a debugging program.

Why?:

When making projects you will come across a lot of problems if you start going straight into animation. It is best at times to just write the program based off number and words. This helps a lot especially when you come across errors.

Problems will be easier to find and fix with a simple put or get statement. Also when the project works the way you want it to work start off by implementing the graphics or what ever you wish to do.


Any questions feel free to ask.
BigBear




PostPosted: Fri Apr 24, 2009 9:23 am   Post subject: RE:star animation

You can use picture files of the different stages then put text for each stage and change the picture

Press F10 then look up Pic.File
DifinityRJ




PostPosted: Fri Apr 24, 2009 12:52 pm   Post subject: Re: star animation

First research the stages in a stars life.
DifinityRJ




PostPosted: Fri Apr 24, 2009 1:31 pm   Post subject: Re: star animation

You can set up your program like so :

Variable to keep track of which step in the life cycle of the star it is in. (In this case lets say we are using the variable "step"

Turing:

var step:int:=0



(If you are going to use pictures)

Set up a variable, example:
(number_of_stars can be a variable if you want, but it depends on how many star pictures you have)
Turing:


var stars: array 1..(number_of_stars)
for a: 1.. (number_of_stars)
stars(a) := Pic.FileNew ("star" + intstr (a) + ".jpg")
end for


you can change ".jpg" to any type of file you saved the picture as.

Then depending on what the user is able to control in your program, you could do something like.

If user enters "left key arrow" it goes to the next stage in the cycle.

or

If user clicks the mouse, it goes to the next stage, etc.

When this happens you can add '1' to the variable we declared earlier called 'step'

Then in a for statement you draw the star it is at using 'step'.

Turing:


Pic.Draw (stars(step), 100,100,picMerge)



This is obviously just one way of doing it.

Oh, and btw 'ItsAHamster' its not a Hamster, its a bunny!!!! Sad
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: