The first sample is about waypoints. The scripts starts with a short path allready defined, but when you press N, you can create a new path. After that press R to let the path marker run on your new created path.
Hi folks,
here is the first public version of my new TBAI module. This module supports 2D and 3D pathfinding in a grid of connected nodes and also predefined waypoint managment.
In the attached zip file you will find the module itself, a help file, a sample script that will show off waypoint handling and a modifed version of the TBGL module, which you will need also. Of course, I will write more samples.
If you have suggestions, then please let me know.
Cheers
Michael
The first sample is about waypoints. The scripts starts with a short path allready defined, but when you press N, you can create a new path. After that press R to let the path marker run on your new created path.
Mike what a wonderful surprise. Thanks.
After you click N, left mouse click to add the first start node and subsequent nodes-- till the end node, which is when you press R.
So Press N
First left mouse click is Start Node
left click additional nodes
The last node will be the end node when you press R
and then it will play the object moving on the new path.
Again, thanks Mike another wonderful addition to tbgl!
Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server
Great job man! ,
very pleasant surprise. Complete module, help file and sample ... what could I ask more?
Well, another sample
Excellent!
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thanks guys. I will create more samples in the next days.
wow, thanks a lot for the BIG surprise !
I'm at work at the moment but as soon as I will go home I will run it.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Well,
what is impressive is that in just 230 lines of code you have created a so sophisticated application.
An easy to understand module well documented and seems easy to be used (if I was able to understand it it is really simple ).
A question:
is is possible to create a path in which when the marker reach the last point it moves to the first point instead of returning on his path?
Like a circle path I mean.
Thanks thanks thanks for this present Michael.
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Thanks Eros! Yes, when you create the Marker, there is the mode parameter which you can set to STOP, LOOP, or BOUNCE. In my script it is set to BOUNCE. Set it to LOOP and it will do just that.
[code=thinbasic]
n = TBAI_MarkerCreate ( pathID [, direction , mode ] )
[/code]
Mike,
may I have little suggestion?
Would it be possible to introduce equates like %TBAI_FORWARD, %TBAI_BACKWARD, %TBAI_STOP, %TBAI_LOOP, %TBAI_BOUNCE?
It is little detail which makes code slightly more readable.
Thanks!
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Sure, will do that.
Bookmarks