Not signed in (Sign In)

Discussion Tag Cloud

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 10th 2014 edited
     

    Feel free to discover the NoLimitsFramework wiki. I hope you will find an easy start to NoLimitsFramework. If you find some bugs, also feel free to report me them or just fork the repository and make push request. I would love to see some contributions to develop the most powerful and complete framework for NoLimits Coaster 2.



    Quick navigation


    Getting Started



    Block scripting



    Animation



    Splines



    Constraints







    Update 15.02.2015



    Hello Guys, Ive made an initial release of NoLimitsFramework. Please keep in mind, this is still in beta and there is lots of things to be implemented, so don´t be disappointed if you don´t find the "functions" you need. I am working on these since few days again. Ive create a github project, so feel free to check that stuff out. If you have interests to contribute some cool stuff, just fork the project and make later a push request. I also wrote to wiki articles about how getting started and basic block scripting. I am writing right now few more articles for animation, splines, intamin cable lift, etc.

    https://github.com/geforcefan/NoLimitsFramework

    Link to wiki:
    https://github.com/geforcefan/NoLimitsFramework/wiki

    Have fun guys :)




    Hello Guys,

    The time has come to make my project publicly. It is a framework for NoLimits 2.

    What can this framework?

    In short, it takes some programming tasks for you and simplifies the API. A higher layer is created. Less programming code is therefore required. Get faster visible results.

    Example : You want to create an animation . Without the Framework you will need a lot of code and the code is confusing. Especially beginners will probably can not create animations without help . The Framework will now help you to create complex animations with a few command . However, the Framework can do much more and will also in the future much more .

    A small list of supported functions:

    • Block Manager (for the " scripted mode" )

    • Animations of " Scenery Objects / Lights / Cameras / Sound "

    • Easings / blending of animations

    • Linear and Curved Splines (animations along a spline )

    • Constraints ( "look at " , "align to spline" , " attach to") on " Scenery Objects / Lights / Camera / Sound "

    • Timeline , summary of several animations

    • Timeline labels ( open door 0s - 5s , close door 5s - 10s)

    • Coaster Trigger Connector : Connect coaster triggers with timeline animation or labels


    Since the framework is still in development, is the list still " small". The list includes functions that are already implemented . For any suggestions I am open . Other functions are in planning and in the implementation phase .
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 10th 2014
     

    Animations with Easing/Blending


    What are easings? www.easing.net explains:

    Easing functions specify the rate of change of a parameter over time.

    Objects in real life don’t just start and stop instantly, and almost never move at a constant speed. When we open a drawer, we first move it quickly, and slow it down as it comes out. Drop something on the floor, and it will first accelerate downwards, and then bounce back up after hitting the floor.

    Overview of supported easings in NoLimitFramework

    Those easings can be used in the animations (default is a linear easing)

    For example we want animate a cube (Editor name of the scenery object is "cube") from position 20,5,0 to 25,6,0 in 2 seconds. Just do:


    import com.nolimitsframework.*;
    import com.nolimitsframework.animation.*;
    import com.nolimitsframework.easing.*;
    import com.nolimitsframework.scenery.*;

    import nlvm.math3d.*;

    public class TestCoaster extends FrameworkScript {
    public void init() {
    Animation CubeAnimation = new Animation("Scenery: cube");

    CubeAnimation.addAnimation(
    SceneryObject.PROPERTY_POSITION, // Which property should be animated? In this case its the Position
    new Vector3f(25.0f, 6.0f, 0.0f), // Position to x: 25, y: 6, z: 0
    0.0f, // startTime, 0:00 sec
    2.0f, // endTime, 0:02 sec
    Easing.ELASTIC_IN_OUT // How is the transition? (List of easings: http://easings.net)
    );

    CubeAnimation.start();
    }
    }


    Result



    Of course you can rotate at the same time as well, just add another "addAnimation":


    CubeAnimation.addAnimation(
    SceneryObject.PROPERTY_POSITION, // Which property should be animated? In this case its the Position
    new Vector3f(25.0f, 6.0f, 0.0f), // Position to x: 25, y: 6, z: 0
    0.0f, // startTime, 0:00 sec
    2.0f, // endTime, 0:02 sec
    Easing.ELASTIC_IN_OUT // How is the transition? (List of easings: http://easings.net)
    );

    CubeAnimation.addAnimation(
    SceneryObject.PROPERTY_ROTATION_Y, // Which property should be animated? In this case its the Y-Rotation
    (float)Math.toRadians(360.0), // Y-Rotation to 360°
    0.0f, // startTime, 0:00 sec
    2.0f, // endTime, 0:02 sec
    Easing.ELASTIC_IN_OUT // How is the transition? (List of easings: http://easings.net/de)
    );


    Result


    https://www.youtube.com/watch?v=vYICO-XfOI4&feature=youtu.be
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 10th 2014
     

    Trigger Connector and Timeline

    Just create a timeline, add your animations inside, define a label for certain animation sections and connect it with a coaster trigger. Sound easy? Yes it is:



    Only add these lines of codes, easy to understand:

    Timeline CubeTimeline = new Timeline();
    CubeTimeline.addAnimation(CubeAnimation);
    CubeTimeline.setLabel("letsRotate", 0.0f, 2.0f); // we define a label called "letsRotate" from 0:00 - 0:02 seconds

    // On "TestCoaster2" is a trigger "triggerOnCoaster", which will start the animation "letsRotate" we have defined in the timeline above
    TriggerManager.addTrigger("TestCoaster2, triggerOnCoaster", CubeTimeline, "letsRotate");


    But still very easy, right :) ?

    Result

    https://www.youtube.com/watch?v=wO6AcwcKgIk&feature=youtu.be

    Here an extended example with opening a door and closing it connected with two triggers:
    https://www.youtube.com/watch?v=sawkk7UthY0
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 10th 2014 edited
     

    Splines and Constraints


    Align to spline



    Yeah, its getting interesting. Splines and Constraints. Good, just define a spline:

    Spline Path1 = new SplineCurved();
    Path1.addPoint(new Vector3f(0.0f, 5.0f, -15.0f));
    Path1.addPoint(new Vector3f(0.0f, 15.0f, 0.0f));
    Path1.addPoint(new Vector3f(0.0f, 5.0f, 15.0f));


    We want to align a scenery object to this spline and animate it from 0 to the end of the spline. No problem:


    Constraint TestAlign = new AlignToSpline(Path1, true); // Param1: Spline, Param2: Tangential?

    SceneryObject Test = new SceneryObject("Test");
    Test.addConstraint(TestAlign);

    // Animate from 0 to the end of the spline (1.0) from 0:00 - 0:05 seconds LINEAR
    Animation TestAlignAnimation = new Animation(TestAlign);
    TestAlignAnimation.addAnimation(AlignToSpline.PROPERTY_POSITION_RELATIVE, 1.0f, 0.0f, 5.0f, Easing.LINEAR);


    Result


    https://www.youtube.com/watch?v=5k2PJ-1lSDk&feature=youtu.be


    Look at


    There is another constraint: Look at. Just do:


    SceneryObject Cube = new SceneryObject("somecube");
    Constraint TestLookAt = new LookAt(Cube);

    Test.addConstraint(TestLookAt);


    Thats it, now the arrow object will run along the spline and look at the somecube :)

    Here a full combined example


    https://www.youtube.com/watch?v=b80lWV0SiMY



    If you have any suggestions, just write down :)

    - Ercan
    • CommentAuthorJAKool
    • CommentTimeMay 10th 2014
     
    ...I love you.
  1.  
    Wow this is amazing, just fantastic =D
  2.  
    Awesome! This will really help a lot! Thanks!
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 10th 2014 edited
     

    Constraint "Attach to"

    Its easily possible to attach Scenery Objects/Elements/Lights/Sounds or Cameras to another Scenery Object/Element/etc. For this, you just need four lines of code where you first catch both scenery objects, create a constraint and add that constraint to the object, where should been attached to another object:

    SceneryObject Arrow = new SceneryObject("Arrow");
    SceneryObject Cylinder = new SceneryObject("Cylinder");

    Cylinder.addConstraint(new AttachTo(Arrow, true)); // Param1: Where attach to, Param2: Tangential? (that means, apply objects yaw/pitch/roll/position or only its position)


    Example

    You can see, the Cylinder is attached to the Arrow :)


    https://www.youtube.com/watch?v=LpuErUbJUE0&feature=youtu.be

    Note: Everything you see can be applied for Scenery Objects/Elements/Lights/Sounds or Cameras, they are all compatible together. That means you can use blending/animations to blend light colors, or change lights/sounds/cameras positions, or apply them constraints to follow a spline (useful for camera, everyone who makes videos will love this fact)
    • CommentAuthorsprog
    • CommentTimeMay 10th 2014
     
    This is amazing. Can't wait to give it a go, it all looks so much simpler now!
  3.  
    Oh wow, holy crap, this is amazing! Very nice work!
    •  
      CommentAuthorbestdani
    • CommentTimeMay 11th 2014
     
    Wow that's very useful and comes as if on cue. I'm currently working on a project where I might need splines. I think using this framework will safe a lot of time instead of creating a spline classs myself.

    Can't wait to give it a try.

    Do you also work on physics simulations accidentally (for swinging gondolas on a moving plate for instance)? It's another thing I wantet to test in the narrow future. If you are creating something like that, let me know so I don't have to care about anymore. ;-)
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 11th 2014
     
    Posted By: bestdaniDo you also work on physics simulations accidentally


    Busted! Yes I am working on something similar, just look forward.
    •  
      CommentAuthorBBSpeed26
    • CommentTimeMay 11th 2014
     

    Wow. Just. This is amazing!

    • CommentAuthorMGrides
    • CommentTimeMay 12th 2014
     
    A.M.A.Z.I.N.G.!!! I did went through the hard school of learning scripting: Trial and Error to find out what every single line in a script will do in the sim. At least i was able to modify the scripts, to animate some flatrides... now,.. THIS ^ will be revolutionize the creativity since it´s THAT easy to animate something in NL2 .. the possibilities will be endless even for non-scripter or beginner at scripting. And i think the flatride animation will be reach a new (and easy) level, too!

    Thank you VERY much for doing this! It looks awesome and will many, many user open some doors to the scripting world!!!

    Can´t wait to use this! =)
    • CommentAuthorJAKool
    • CommentTimeMay 13th 2014
     
    About the very first script, how should I write it so it's compatible with a Transfer Table after the station? Or is this a 'one script fits all' kind of deal?
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 13th 2014 edited
     
    ^ Not Implemented yet, but this feature is in planing
    •  
      CommentAuthorPhyter
    • CommentTimeNov 12th 2014
     
    Is there a link to this?
    •  
      CommentAuthorgeforcefan
    • CommentTimeNov 12th 2014 edited
     
    ^ Not yet, I paused this project, but now Its in development again.
    •  
      CommentAuthorgeforcefan
    • CommentTimeNov 16th 2014
     
    Hallo Guys. This new feature is almost full implemented.

    Intamin Cable Lift System


    You can easily create create SceneryObject with the Catch-Cars inside and place it in your Editor and label it (for example "CatchCars"). The tricky part is, to determine the spline. There are easy methods for this purpose. This method is adjusted for Cinema4D, but after the release of this Framework, other methods are welcome to determine the spline path for the catch car. After the release I am gonna show, how to determine these paths by using cinema4d.


    CatchCarSpline = new SplineLinear();

    CatchCarSpline.addPoint(new Vector3f(-27.5830f, 4.8900f, 20.7670f));
    CatchCarSpline.addPoint(new Vector3f(-27.5840f, 4.8880f, 20.7170f));
    CatchCarSpline.addPoint(new Vector3f(-27.5840f, 4.8860f, 20.6680f));
    CatchCarSpline.addPoint(new Vector3f(-27.5840f, 4.8840f, 20.6180f));
    ....
    ....
    Spline Points of CatchCar path
    ....
    ....
    CatchCarSpline.addPoint(new Vector3f(-27.6050f, 39.6790f, -62.4260f));
    CatchCarSpline.addPoint(new Vector3f(-27.6050f, 39.4740f, -62.4410f));
    CatchCarSpline.addPoint(new Vector3f(-27.6050f, 39.2620f, -62.4560f));
    CatchCarSpline.addPoint(new Vector3f(-27.6050f, 39.0410f, -62.4720f));
    CatchCarSpline.addPoint(new Vector3f(-27.6050f, 38.8130f, -62.4870f));

    BlockRegularLift Lift = new BlockRegularLift("Lift");
    IntaminCableLift CableLift = new IntaminCableLift("CatchCar, CC_", CatchCarSpline);
    Lift.attachObject(CableLift);

    BlockManager cBlockManager = new BlockManager();
    cBlockManager.setBlock(new BlockRegularStation("Station"));
    cBlockManager.setBlock(Lift);
    cBlockManager.setBlock(new BlockRegularBrake("Brake"));
    cBlockManager.setBlock(new BlockRegularBrake("Brake2"));


    Example


    https://www.youtube.com/watch?v=UDd60Ls3r78
    • CommentAuthorole
    • CommentTimeNov 16th 2014
     
    Very nice.

    About that function you requested in the Collada thread, could you explain a bit better what it should do?
  4.  
    Can you also use this for a intamin launch with catchcar?
    Btw awesome work, this will save a lot of people a lot of time :)
    •  
      CommentAuthorgeforcefan
    • CommentTimeNov 16th 2014
     
    ^ Yes sure :)
  5.  
    This is looking amazing! This will definitely make scripting more accessible
    •  
      CommentAuthorgeforcefan
    • CommentTimeNov 16th 2014
     
    Okay guys,

    you don´t have to determine the spline by your selves. Just create another "coaster" with a track, representing your catch-car path, use a trigger to determine the length and the offset = 0 position (just simply use the first vertex :) ), and use this cool function :D :

    TrackSpline CatchCarSpline = new TrackSpline(new Vector3f(10.0f, 1.0f, 10.0f), 200.0f, true, 0.1f); // Offset, Length, backward?!, subdivision

    Another good news: Now this Cable Lift is working with multiple trains, and have fixed some alignment problems. So here another video of my cable lift in action :)

    https://www.youtube.com/watch?v=UTp0FK7Jx5k

    The actual scripting code for this video is (scripted mode with blocks and cable lift):

    import com.nolimitsframework.*;
    import com.nolimitsframework.objects.*;
    import com.nolimitsframework.spline.*;
    import com.nolimitsframework.block.*;

    import nlvm.math3d.*;

    public class TestCoaster extends FrameworkScript {
    public void init() {
    TrackSpline CatchCarSpline = new TrackSpline(new Vector3f(-27.6054f, 27.5803f, -65.5437f), 113.44f, true, 0.1f);
    IntaminCableLift CableLift = new IntaminCableLift("CatchCar, CC_", CatchCarSpline);

    BlockRegularStation Station = new BlockRegularStation("Station");
    Station.attachObject(CableLift);

    BlockManager cBlockManager = new BlockManager();
    cBlockManager.setBlock(Station);
    cBlockManager.setBlock(new BlockRegularLift("Lift"));
    cBlockManager.setBlock(new BlockRegularBrake("Brake"));
    cBlockManager.setBlock(new BlockRegularBrake("Brake2"));
    }
    }
    •  
      CommentAuthorNoworyta
    • CommentTimeDec 4th 2014
     
    I cannot wait for these framework methods... Wonderful idea!
    • CommentAuthorcyhree11
    • CommentTimeDec 16th 2014
     
    Can anyone help me with cable launches/catch cars/ custom magnetic fins please..
    •  
      CommentAuthorgeforcefan
    • CommentTimeDec 16th 2014
     
    ^ Did you read anything on this thread :) ?
    •  
      CommentAuthorZazu Yen
    • CommentTimeDec 19th 2014
     
    Dude, I haven't had a chance to dig into NL 2 much since I just today found out it was released (hey, I've been busy :) but this looks amazing. When you're ready you should throw it up on GitHub or something similar.
    •  
      CommentAuthorgeforcefan
    • CommentTimeDec 19th 2014
     
    ^ Yeah I am gonna throw it up on GitHub :) If someone have actual interest on the development, just give me a feedback, due I have not that much time but like to finish the inital release :)
    • CommentAuthorSkye
    • CommentTimeDec 19th 2014
     
    I wouldn't mind trying to figure out that follow feature to have the camera on that, and allow for some great panorama shots of some of the coasters.
  6.  
    I would like you to release it. I've been waiting months for all of this!
    •  
      CommentAuthorlamewad
    • CommentTimeFeb 11th 2015
     
    Has this been released to Github yet? This looks amazing!
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 11th 2015
     
    Not yet, but I could do that right now, but its not finished nor documented yet.
  7.  
    Have you gotten transfer tracks to work yet, and can the block manager use them to their full potential? [for example, the ability to send cars in either direction]

    Also, can it set properties of the cars, such as locking/unlocking spinning cars, sitting up / laying down flying cars, rotating 4-D coasters?

    Either way, this looks great, and I'll definitely be picking it up when you release it - any guess on when that will be?
    •  
      CommentAuthorintim305
    • CommentTimeFeb 15th 2015
     
    what if you had a transfer table the you set the coordinates of where it went via X Y Z axis in the properties menu? that would be eternally useful
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 15th 2015
     
    I don't have those things implemented yet, but def working on that if I finished some core developments for animation, trigger stuff, sound attachment, etc. If I release these things on github, you guys could contribute also some codes to the block manager, due the whole stuff is completely modular and extendable. So I am gonna create a github project for that, right now, without that much documentation first.
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 15th 2015
     
    Initial beta release done. Look at the first posting :)
    • CommentAuthorTTD03
    • CommentTimeFeb 15th 2015
     
    Sweet!
    It's a long time coming, and I can't wait to see it!
    Thanks for sharing!
  8.  
    I create an account just to ask about this, and it's up the same day. Craziness!!! Am I magical?

    Downloading. This should be fun.
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 16th 2015
     
    Hello guys, I just commited some changed, fixed some bugs, added some wiki articles (and updated the initial ones). In the next days, I am going to add more articles about the framework and eventually creating an API documentation. (Look at the first posting for the links).
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 22nd 2015
     
    I am gonna make a live stream on twitch about how to create an intamin cable lift at 17:30 (in 40 min).

    http://www.twitch.tv/geforcefan
  9.  
    ^ I'll be watching! This is really amazing stuff :]
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 22nd 2015
     
    Not worked, properly, Gonna do this later gain. Something is just not working. Lol.
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 22nd 2015 edited
     
    Okay, new attempt, at 23:45 (in 15 minutes).

    http://www.twitch.tv/geforcefan
  10.  
    Posted By: geforcefanIf I release these things on github, you guys could contribute also some codes to the block manager, due the whole stuff is completely modular and extendable.
    Is it okay if I try to work up a rough transfer track system?
    •  
      CommentAuthorgeforcefan
    • CommentTimeFeb 26th 2015 edited
     
    ^ Of course it is okay. That great to have some contributors. You studied the structure of the framework already? I would suggest to fork it and make a pull request. Meanwhile all important bugs are fixed and should work properly.
    •  
      CommentAuthorbestdani
    • CommentTimeMar 3rd 2015 edited
     
    First impression, very good and useful!

    I've just tested the block manager on a coaster that uses a special track as a special effect. The usage was very straight forward and it works very good so far (though I found a little mistake - pull request has been sent ;-)). The code is also held very clean, it was very easy to extend the BlockSwitchBrake for my needs.

    This block script framework saved me a lot of time. :D

    Grüße,
    Daniel
    •  
      CommentAuthorgeforcefan
    • CommentTimeMar 3rd 2015 edited
     
    Hey,

    I am glad to hear that the framework is useful for you as well the fact the framework was easly understandable for you. By the way, I've merged your request. New commitments are welcome :)

    Einen schönen Abend wünsche ich dir noch,

    Ercan
  11.  
    I have some questions about your [otherwise very clear] code.

    So Vector is also a list, right?
    Also, the code mentions "BlockObject" a few times, but I don't understand what it actually does . Does it actually do anything? What is it supposed to do?
    •  
      CommentAuthorgeforcefan
    • CommentTimeMar 21st 2015 edited
     
    The BlockObject is an interface. Its supposed to create own behaviours for blocks. For example, if you want to make an intamin launch with animation etc, you can create a class implementing the "BlockObject" and use the method stateChanged() to observe the state changes changes. If for example a state is changed to "is leaving", you can start animations, or doing what ever you want. Now append this new class implementing the "BlockObject" to a certain block with the method Block::attachObject(BlockObject) and now your block object will execute that.

    I have an example with the "Intamin Cable Lift"... Its also implementing "BlockObject". In the IntaminCableLift::stateChanged() I am looking if the train is "leaving the block" and then executing the cable lift animtion.
    Pretty easy :)

    So you can create custom objects which observes certain block changes to execute certain actions. You can also use the trigger manager, but if you want more control of your animations to get the real state changes of blocks, use the "BlockObject" interface.