Board index Roller Coaster Games No Limits Coaster libnltrack Static Library

libnltrack Static Library

Discuss anything involving No Limits Coaster Simulation.

Post May 26th, 2008, 7:29 pm

Posts: 405
Points on hand: 1,346.00 Points
Location: Philadelphia, Pennsylvania, USA

wow! i was lost right when we started with the segments lol thats scary confusing

Post May 26th, 2008, 7:49 pm

Posts: 325
Points on hand: 2,268.00 Points
Location: Chula Vista, California, USA

Can't download the link. My PC just freezes, then closes all internet links out.
Hates oscar for taking points...

Post May 27th, 2008, 6:45 am

Posts: 57
Points on hand: 1,594.00 Points
Location: Frankfurt, Germany

Post June 8th, 2008, 3:15 pm

Posts: 57
Points on hand: 1,594.00 Points
Location: Frankfurt, Germany
You all know the Auto Supporter, what Matt aka Pocorned doesent have finished.

I have developed a remake of it. There are only little banking bugs.

[url="http://img59.imageshack.us/my.php?image=unbenanntaz2.jpg"]Image[/url]

Ercan

Post June 8th, 2008, 3:39 pm

Posts: 1674
Points on hand: 196.00 Points
Location: Zelezniki, Slovenia


Post June 8th, 2008, 4:05 pm

Posts: 2145
Points on hand: 3,189.00 Points
Location: Toronto, Ontario, Canada

I don't get how to just use it. I'm just bad at extracting and getting files in the right place though, because right now I have like 500 extracted icons on my desktop right now [lol]

Post July 6th, 2008, 12:31 am

Posts: 382
Points on hand: 6,337.00 Points
I might be able to have some fun with this. The main thing that's kept me from coding tools (after the big crash that caused me to lose all my stuff, was the pain of having to try to write all the file code again.

Post July 6th, 2008, 11:59 am

Posts: 382
Points on hand: 6,337.00 Points
Ok, I've compiled it, and it works, although the API leaves a bit to be desired imo. I have started work on a C++ library that will hopefully provide a nicer API, without requiring the application programmer to know as many details of the file format.

Post July 6th, 2008, 5:27 pm

Posts: 1983
Points on hand: 3,285.00 Points

Sounds great TylerE, planning to share the improved version?

Post July 6th, 2008, 7:16 pm

Posts: 57
Points on hand: 1,594.00 Points
Location: Frankfurt, Germany

Post July 6th, 2008, 8:28 pm

Posts: 382
Points on hand: 6,337.00 Points
While the implementation is going to be non-trivial, I'm hoping I can do most of the bookkeeping behind the scenes. For instance, one of my goals is for the support code to do the node allocation 'on the fly', so you'll be able to do call like:

track.addSupport(NLPoint(0.0,1.0,0.0), NLPoint(0.0,5.0,0.0),LARGE_TUBE);
track.addSUpport(NLPoint(0.0,5.0,0.0), NLPoint(5.0,5.0,0.0),LARGE_TUBE);


And the library will take care of actually creating the 3 nessesary freenodes, and making the two tubes reference the same node.

Post July 6th, 2008, 8:46 pm

Posts: 57
Points on hand: 1,594.00 Points
Location: Frankfurt, Germany
I have implemented a 3DPoint function (for the next update) ;)

I want to make a full c++ Library with other usefull functions like vectors, bezier calculation, banking calculation. (already inplemented in an internal version)

Ercan

Post July 6th, 2008, 10:18 pm

Posts: 1928
Points on hand: 1,601.00 Points
Location: OH, USA
Ok, I admire your intelligence and ability to program, but imho, you must have WAY too much time on your hands! idk if you're retired, students, or what, but shouldn't you guys be doing something besides programming tools for video games?!

Post July 6th, 2008, 11:46 pm

Posts: 382
Points on hand: 6,337.00 Points
Ok, I've got a basic version of my support creation function working. The algorithm I'm using to test if a node already exists is really bad unfortunately (O(n^2)), taking on my machine about 180 seconds to generate 10,000 beams. If I take out the code that checks for the existence of a node, then the same program runs in about a half second. I've found a GPL library for octtrees, which should allow me to do my checks much faster, since it will only have to do a linear search over a very small number of nodes, not the entire set.

Post July 7th, 2008, 6:07 am

Posts: 57
Points on hand: 1,594.00 Points
Location: Frankfurt, Germany
Originally posted by boneplaya

Ok, I admire your intelligence and ability to program, but imho, you must have WAY too much time on your hands! idk if you're retired, students, or what, but shouldn't you guys be doing something besides programming tools for video games?!


Yes, I am playing football in germany very well....
btw: I am 16 years old.

I have much time in the evening ;)

Ercan

Post July 7th, 2008, 9:56 am

Posts: 1936
Points on hand: 7,125.00 Points
Location: orlando

Image Insert:
Image
78.11 KB

I get stuck here ^^^ and cant get here V V V. Does it take a while?

Image Insert:
Image
103.29 KB

Post July 7th, 2008, 10:11 am

Posts: 1936
Points on hand: 7,125.00 Points
Location: orlando

Image Insert:
Image
78.11 KB

I get stuck here ^^^ and cant get here V V V. Does it take a while?

Image Insert:
Image
103.29 KB

Post July 7th, 2008, 2:21 pm

Posts: 286
Points on hand: 3,503.00 Points
Originally posted by TylerE

The algorithm I'm using to test if a node already exists is really bad unfortunately (O(n^2))


Hey Tyler,

a couple of ideas:
You could put pointers to the nodes (or the indices) into a 3 dimensional array (or two dimensional with vectors in each cell). You could devide the building area in for example 10*10 squares (x/z) and store the nodes in the corresponding cell (third dimension). This way you have a simple check for the cell and then you only need to look at the nodes within that cell. For woodies it might eb beneficial to go up to four dimensions...
Also it would be wise to do the lookup from the back to the start and of course add new nodes at the end. It's very likely that the matching node (if exists) was just set before. So you will find those instantly.

Good luck,
Buster

PS: Why O(n?????????)? shouldn't it just be O(n) for each point? Or do you mean the whole process of setting n points and comparing them? ...or do you do the comparison AFTER you set them all (I think only this one would be n?????????)?

Post July 7th, 2008, 2:48 pm

Posts: 382
Points on hand: 6,337.00 Points
Well, n^2 isn't probably isn't totally accurate, and I was referring to the process as a whole. Basically for the addition of each node it has to scan all existing nodes. I knew the implementation would be slow, but I just wanted to get get something working. I've found an octree library that looks promising, and very easy to use. Much less memory efficient than a 3d array, IF your data is evenly distributed, but of course in this case it isn't. That should help quite a bit, looks to be pretty simple to implement, just a matter of tweaking the parameters to find the optimal speed/memory tradeoff. That's part of the nice thing about making a library for this stuff...the backend stuff can be changed freely without effecting the calling program. My library (including the essentially embedded libnltrack) compiles as a DLL, so that makes it even easier.

On another note Buster, there was a function you gave me way back when that took a point, and translated it into "track space" given a foward vector and roll. Any chance you could dig that up for me?

Post July 7th, 2008, 4:12 pm
gouldy User avatar
Premium Member
Premium Member

Posts: 7827
Points on hand: 3,644.00 Points
Bank: 25,088.00 Points
Location: WOLVERHAMPTON, England.

Have you ever heard of a female?
When your shoe size is a larger figure than the amount of physical people you've ever seen with your actual eyes... you know it's time to put the computer DOWN.
[lol]

Previous

Return to No Limits Coaster

 


  • Related topics
    Replies
    Views
    Last post