
-----------------------------------
Mark0213
Wed Dec 07, 2011 9:15 pm

Multiple Object Movements in Turing
-----------------------------------
What is it you are trying to achieve?

I made a game like the frog game, I understand how to move one ball back and forth on the screen, but i dont understand how to move several balls
at the same time, if anyone can help me, please post back with tips-thanks! i dont know much about velocity or speed thingies

What is the problem you are having?



Describe what you have tried to solve this problem



Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)








Please specify what version of Turing you are using


-----------------------------------
Insectoid
Wed Dec 07, 2011 9:26 pm

RE:Multiple Object Movements in Turing
-----------------------------------
Many people have asked this question before. There are many tutorials explaining exactly this. Search through the Tutorial section and the Turing Walkthrough.

-----------------------------------
Tony
Wed Dec 07, 2011 9:27 pm

RE:Multiple Object Movements in Turing
-----------------------------------
the answer, in its most basic form is that:

- you start a frame
- move the first ball
- move the second ball
- start a second frame

between frame 1 and frame 2, all of the balls have moved.

-----------------------------------
Mark0213
Wed Dec 07, 2011 9:44 pm

RE:Multiple Object Movements in Turing
-----------------------------------
Tony, how would you start a frame, if you help me with that i can figure this out, and between the primary, and secondary frame you can input as much balls as you can, or is it limited to one, and you must put multiple frames-I'll try and do it all on my own just for the frame part is my only problem-Thanks for your time and consideration! :D means alot to me Tony

-----------------------------------
Dreadnought
Wed Dec 07, 2011 10:00 pm

Re: Multiple Object Movements in Turing
-----------------------------------
Well, you want the second frame after the first, the third after the second, and so on. On each frame you are doing something very similar to what was done on the last frame (moving the balls). So you want to loop over your code for each frame.

The basic idea is:
loop

    

    % Start Frame
    
    
    ...
    % End frame

    

end loop

Note that "stuff" is just other code you might have in your loop. Also, notice that your doing something similar to each ball, maybe you could use a loop to clean that up (but its more complicated).

-----------------------------------
Insectoid
Wed Dec 07, 2011 10:02 pm

RE:Multiple Object Movements in Turing
-----------------------------------
By 'frame' Tony means one iteration of the main loop (a very, very loose definition). You do everything in one loop. Move all your balls a little bit, all in the same loop (you do NOT need more than one loop in your entire program for 2-3 balls).
