Alice Community move along a track?

 move along a track?
 axeraider131 Guest   Status: Posts: n/a move along a track? - 02-10-2007, 12:33 PM hello again, my new idea was to have a game where a character moves along a hidden track (that isnt in a straight line). somewhat like Kirby 64. with curves and turns. if it is possible to do this, please respond, any help would be greatly appreciated. thank you.
 See example in text for a start.
 DrJim Guest   Status: Posts: n/a See example in text for a start. - 02-11-2007, 05:49 PM This will take a little work, but is definitely possible. For a start, I suggest you look at problem 4 in Chapter 6 of the textbook by Dunn, et all. This outlines the basic approach, which is to have the object move from point to point along a mathematically defined curve. This works well for some motions - swimming with sine waves per the example, ringing effects with sine waves that also decrease with time, parabolic curves for missle or cannon shells, etc. For arbitrary curves, you will need to do curve fitting of some type - for a start, see the links at http://en.wikipedia.org/wiki/Curve_fitting. These generally do point by point fits - however this is still quite helpful, since it doesn't take a lot of points to define a fairly complex path. You just have to experiment a bit. It would be nice however to be able to simply fit to a drawn curve - anyone have any links for that?
 The Tick?
 madden Senior Member     Status: Offline Posts: 322 Join Date: Mar 2006 Location: My own little world 0.0 The Tick? - 02-17-2007, 11:55 AM What do you mean the Tick? COOKIES!
 Sorry
 madden Senior Member     Status: Offline Posts: 322 Join Date: Mar 2006 Location: My own little world 0.0 Sorry - 02-17-2007, 01:04 PM Sorry Wrong thread.
 chuck Guest   Status: Posts: n/a 02-18-2007, 07:36 PM I like the curve fitting method suggested by Dr. Jim, but is does require some math skills. Parametric equations work well for this. Think of it as plotting a curve, but the object will move from plotted point to plotted point. If you are only vaguely familiar with the math, then this is a good way to learn more about it while playing around with Alice. A second approach is to place objects, such as the cone from the shapes gallery, along a path, then have the moving object move from one to the next, then the next, and so on, using the "move to" command together with the "turn to face" command. I suggest something like the cone because it is very simple object (only 2kb). You can leave it visible until you get the path the way you want it, then make the marker objects invisible by changing either the opacity property or the isShowing property for each of them. You could also set up either a list or an array of the marker objects, then iterate through them with a loop. Chapter 8 in my first Alice book (An introduction to Programming using Alice) and chapter 5 in Joel Adams' first book (Alice in Action) cover arrays and lists. The Dann, Cooper and Pausch book (Learning to Program with Alice) does as well, but I don't have a copy handy to look up the chapter reference.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge