Results 1 to 9 of 9

Thread: AS2 moving objects along a trail

  1. #1

    AS2 moving objects along a trail

    Hi,

    I have build a few themepark attraction simulations in the past (http://sims.themagical.nl)
    Not being a programmer after all, it took me 4 years to learn the basics of flash (starting from Flash 5, to Flash 8 currently) and improve the way of creating a interactive experience with well-thought coding.

    Now my problem defines the following:

    Most of the simulations are based onto one or more rollercoaster trains which are moving along a predefined track. In the past I used simple tweens, using a drawed path, because the Tween Class was not available at that time. Sadly the performance is really bad. With newer simulation, I used the Tween Class, but it somehow does not completely suits my needs.

    As the most of you know the trains are divided into coaches which basically following the track and the first in line, which determines the speed of all the attached objects.
    The speed of all coaches is all the same, but I cannot use the same script for every coach at the same point of the track because of the speed differences.
    I know a lot of Math is involved, sadly not my strongest point.

    Is there anyone who could help me out with this?
    There is always room for improvements

    Thanks in advance!
    Tijn

  2. Hey!

    Another Dutchman, awesome! I can't really say I know the best solution to your problem. If you are not looking for a solution with a lot of math involved, can't you have a coach check for the rail section it is on for rotation and maybe even speed?

  3. #3
    Try using as3, from what I hear it is better at this sort of thing.

  4. Quote Originally Posted by tkmk View Post
    Try using as3, from what I hear it is better at this sort of thing.
    :S

  5. #5
    Quote Originally Posted by ArmoredSandwich View Post
    Hey!

    Another Dutchman, awesome! I can't really say I know the best solution to your problem. If you are not looking for a solution with a lot of math involved, can't you have a coach check for the rail section it is on for rotation and maybe even speed?
    LOL, yes another Dutchman, yes
    Math is everywhere, and I am aware of the fact that it plays a key role into the solution of the problem. At the current situation, I have created 6 different tween layers, each for every part of the train.

    @tmtk: I have heard about a function in AS3 which converts a tween path into code. But therefore I need Flash CS3, so it seems about time to start saving for a software upgrade

  6. You don't need anything, this can perfectly done with AS2. However if you really want to get started AS3 you don't need flash CS3, there are other ways to code in AS3 then CS3. For example FlashDevelop is an awesome IDE that has AS3 capabilities. There are more things like that, but I really recommend FlashDevelop.

    The only reason I would start using AS3 is because I hear they are going to implant hardware acceleration into the next flash! Awesome!

  7. #7
    How about some inverse kinematics?

    You know the rag doll effect? Each body part is "attached" to another, and it "follows" it. You can probably do the same with your roller coaster.

    It is a bit math intensive, but with dedication everything is possible.

    http://www.gotoandplay.it/_articles/...Kinematics.php

  8. #8
    I thought inverse kinetics were for 3d programs? Wouldn't it be hell for flash programmers like us?

    p.s. my name is TKMK not tmtk

  9. #9
    @zuperxtreme: thanks! I will have a look at the article. The basics of a rag doll are partially the same as a rollercoaster tracks/train works. The first wagon leads the second and etc.

    @ArmoredSandwich: maybe this would be also a solution for me, will check it out directly

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012