Not signed in (Sign In)

Site Tag Cloud

Categories

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

    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 18th 2017 edited
     

    libnolimits 1.0.0-beta

    A NoLimits Roller Coaster 1 and 2 Library written in C++, which provides functionality to manipulate and create NoLimits 2 Parks or NoLimits 1 Tracks programmatically.

    Important

    This library is still beta. There is no documentation nor unit tests yet, but planned for the stable release. If you like to contribute, feel free to beta test this library, especially by opening, saving and comparing an existing park in NoLimits 2 with this library. All non working features are listed below.

    Getting started

    Requirements

    Installation

    Clone this repository on your local machine and follow the usual cmake procedure.
    cmake . make make install 

    Documentation

    API documentation can be found here: https://geforcefan.github.io/libnolimits/

    Documentation is not completely written yet. It´s still in progress.

    Examples

    There is a basic example in this repository, which will be compiled during the cmake build process. There will be more examples in the feature. Feel free to ask for specific examples.

    Opening and reading park information from a *.nl2park

    #include <iostream>
    #include <libnolimits.h>
    ...
    NoLimits::NoLimits2::Park *park = new NoLimits::NoLimits2::Park("Hydra.nl2park");
    std::cout << "Author: " << park->getInfo()->getAuthor() << std::endl;
    std::cout << "Description: " << park->getInfo()->getDescription() << std::endl;
    std::cout << "Terrain height at [20, 50]: " << park->getTerrain()->getHeightAtVertex(20, 50) << std::endl;
    ...
    park->getInfo()->setAuthor("Ercan Akyürek");
    park->save("HydraClone.nl2park");
    ...
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 18th 2017 edited
     

    Features

    NoLimits 2 Park (*.nl2park)

    Available chunks

    • Info
      • Weather
      • Sky
    • Terrain
      • Water
      • Layers
      • Layer intensities on terrain
      • Terrain height data
    • Scenery
    • Coaster
      • Tracks
        • Vertices
        • Segments
        • Sections
          • Brake
          • Lift
          • Station
          • Storage
          • Transport
        • Separators
        • Triggers
        • Roll points
        • 4D parameters
        • Special tracks (switch and transfer table)
      • Trains
        • Cars
      • Custom Friction
      • Track / Train / Car Colors
      • Scripts
      • Mode
      • Sections
      • Resource files
      • Supports
        • Beams
        • Free Nodes
        • Beam Nodes
        • Rail Nodes
        • Support Nodes
        • Footers
        • Prefabs
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 18th 2017 edited
     

    NoLimits 1 Park (*.nltrack)

    Available chunks

    • Info
    • Terrain
      • Terrain height data
    • Environment
    • Train
      • Cars
    • Track
      • Vertices
      • Sections
        • Brake
        • Lift
        • Station
        • Transport
      • Catwalks
    • Supports
      • Rail Nodes
      • Free Nodes
      • Beam
      • Footers
    • Train
    • Scenery

    Version independent features

    • Setting and getting terrain heights at a given XY point
    • Track interpolation, getting the matrix at a given distance on track
    • "NL2 Spline export" conform CSV generation
    • Creating or modifiying existing tracks

    Contribution

    Feel free to fork this project, implement features, improve the code quality, fixing bugs, etc. Just request a push, the core team will review the code and decide whether it will merged to the master branch or not.

    Core team

    License information

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

    • CommentAuthorTheBeatles
    • CommentTimeMay 19th 2017
     
    Alright, I'll bite. I don't understand what this means or how to use it, but it sounds like it could be really cool. Do you mind explaining the functions of the program in layman's terms?
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 19th 2017 edited
     
    With this library, any developer can write tools for NoLimits 2. They get access to all information of a NoLimits 2 Park file and write a tool for certain problems (like exporting the terrain, exporting the vertices, bash deleting all supports, custom terrain map, etc...).
    •  
      CommentAuthorKingRCT3
    • CommentTimeMay 19th 2017
     
    Is this like.. an open-source NoLimits in a sense?
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 19th 2017 edited
     
    No, it's not. It's an API to read out information from an nl2park file. Everyone can do what he wants to do with those information. This is a thing for tool developer. They can use this library to read and manipulate any nl2park file.
    •  
      CommentAuthorbestdani
    • CommentTimeMay 19th 2017 edited
     
    Sounds very interesting, I think it can be very useful. Unfortunately building the libs using cmake under Windows (using MinGW) seems to be not very straight forward. I will try it later using a virtual machine. Have you tested building it using Windows and any advice maybe?
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 19th 2017 edited
     
    Not yet, I've written a build wiki article for macOS, but since I am at work right now, I can't write it for windows. But gonna look for it this evening. In fact you could include the source files of the library directly into your application. Keep in mind turning on c++11.

    I will surely include a visual studio project where you can compile a library by yourself without needing cmake. Even better, creating a native nuget Package.

    Are you using MinGW or visual studio environment? I am also checking the options how to bind the library in c#, which maybe makes more sense.
    •  
      CommentAuthorbestdani
    • CommentTimeMay 20th 2017 edited
     
    I used MinGW / MSYS. I actually don't have any experience with VC++ and probably part of the problem is that I'm not very experienced in building "real" c++ programs since I just got in touch with c++ for now for building small tools using a specialized framework.

    Cmake worked successfully in Windows but something went wrong with the glm include path in the created makefile, which cannot be found although pkg-config's outputs seems to work correctly.

    Compiling the libnolimits using Xubuntu was no problem!

    But for now I'm stuck compiling the example program. I will probably do more investigation tomorrow, but maybe you can tell immediately what's not working there (my guess is that cmake failed at some point, maybe it's just not telling to use c++11 explicitely?) until then from the messages: https://pastebin.com/W4xMb8Vj
    Edit: (This was due to a silly mistake, worked like a charm)
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 20th 2017 edited
     
    Ive figured out the Problems in the cmake file... stay tuned, gonna write an article how to install the library in Windows with Visual Studio. Gonna also check this for MinGW but I think that will work the same way.

    edit: figured out how it lets compile with mingw/msys
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 20th 2017 edited
     
    I have updated the wiki article and the CMake file, so you need to update your local clone:

    https://github.com/geforcefan/libnolimits/wiki/How-to-install-libnolimits

    If you want to write basic console based tools, I would suggest to use MinGW, but keep in mind that using mingw and building x64 executables are kind of tricky. I personally prefer Visual Studio 2017 Community version. I will write a brief article how to setup a small console based project with cmake and mingw as well as with VS 2017.

    Everything works fine for me.
    •  
      CommentAuthorbestdani
    • CommentTimeMay 21st 2017 edited
     
    Thanks! I also got it working in Windows directly now using a bit different approach.

    For all who are wondering what can be done with this, here I show what my example program does that uses the library (very basic, mainly just for testing):

    No Limits 2 Forest Generator Test (click to watch on YouTube)
  1.  
    Will you possibly expand the auto-generation? You could probably set it to make some park background templates, forever eliminating the "green field" effect
    •  
      CommentAuthorbestdani
    • CommentTimeMay 21st 2017 edited
     
    Well I thought about this, I actually had the idea to figure out the file format myself for doing stuff like this some time ago. If I will make a more sophisticated tool, I will make a dedicated thread for this. I have posted the video of the small test here for now to give you maybe some better idea what possibilites this can open when it is used and finally highlight that this is really great stuff!

    Posted By: geforcefanIf you want to write basic console based tools, I would suggest to use MinGW...
    My favorite way of accessing the library would be for now by building a Python wrapper around it. I never did this before, so this could be an interesting opportunity to figure out how this is done (I know that there are even some tools that promise to be able to do it mostly fully automatically). When I have some time left I will probably try this instead of building some tools in C(++) directly. ;-)
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 21st 2017 edited
     
    ^ I have build a node.js (https://github.com/geforcefan/libnolimits-nodejs) wrapper for libnolimits, where you can even write desktop applications in javascript, html and css. If you are planning coding some tools for NL2, we could do this central on a shared project since I am building a multi platform backbone for NL2 tools :) But its up to you.

    Wrappers are welcomed. The more, the better.

    Keep in mind that there will surely API changes in the stable release of libnolimits. Especially special tracks and prefabs are not parsed yet, but those are already figured out by myself, just need to implement them. I didn´t implemented "remove" methods for most vectors, so I need to add them. The chunks are mapped to the original file format which leads to some stupid getters methods (for example:


    getCoasterByName("TestCoaster")->insertScript(new Script());
    getCoasterByName("TestCoaster")->getFileScript()->addPath("testscript.nl2script");


    At the end, something like this should be possible by letting inherit from a base class:


    getCoasterByName("TestCoaster")->insertScript(new Script());
    getCoasterByName("TestCoaster")->insertScript(new FileScript("testscript.nl2script"));


    But for this, I need to rearrange some parts of the library. For me it was important to write a functional library with all chunks parsed at first glance.
    • CommentAuthorJack_
    • CommentTimeMay 25th 2017
     
    This looks really useful.
    Is there any way to compile a .dll file for use with Java and C#?
    •  
      CommentAuthorgeforcefan
    • CommentTimeMay 25th 2017
     
    ^
    There is not an easy way to do this, especially because its written in C++ instead of C which would make things easier. But to be honest, there are way better and modern ways to do this. In fact my approach is to write always universal apps by using web technologies.

    Ive written a node.js native binding of libnolimits:

    https://github.com/geforcefan/libnolimits-nodejs

    You can use libnolimits-nodejs in your node application. For example "electron" is a node.js environment for desktop applications. But If you are nor familiar with web desktop applications, this might be a little difficult approach.
    The only proper way how to use libnolimits in C# and Java is to rewrite it in C# or Java. But like mentioned, I am a big fan of writing universal apps in fact. People always tend to choose non universal approaches which I don´t get. I always try to make my stuff working at least on linux, windows and macOS.

    Since then you could use C++ to write your tool.