September 03, 2010, 04:40:28 am
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: RobotDuel - Game for 2 players:
http://community.thinbasic.com/index.php?topic=305.0
Home
Help
thinGaming
Search
Calendar
Gallery
Articles
Donations
Tags
Media Center
Login
Register
thinBasic 1.8.0.0 is out !
::
See this post
( last update:
2010.03.07
! ) ::
Latest beta version
:
thinBasic beta 1.8.6.0
( last update:
2010.08.02
! )
Main menu
thinBasic web site
What's new
thinBasic help
On Facebook
Scripts repository
Downloads
- Stable version
MIRROR SERVERs
- Italy
- US
File repository
Stats
Members
Total Members: 524
Latest:
fh
Stats
Total Posts: 26641
Total Topics: 3531
Online Today: 24
Online Ever: 121
(August 16, 2009, 07:08:32 am)
Users Online
Users: 1
Guests: 8
Total: 9
peterpuk
OnLine
2 Spiders, 8 Guests, 1 User
peterpuk
Yahoo spider, Google spider
Basic programming language :: thinBasic Community
>
User modules (the user developed modules expansions)
>
Experimental modules or library interface
>
TBAI - Pathfinding and waypoint handling
Subject Statistics
Topic
: TBAI - Pathfinding and waypoint handling
Replies
: 16 posts
Read
1115 times
0 Members and 1 Guest are viewing this topic.
Pages:
1
2
« previous
next »
Add bookmark
|
Print
Author
Topic: TBAI - Pathfinding and waypoint handling (Read 1115 times)
0 Members and 1 Guest are viewing this topic.
Michael Hartlef
Creator of TBDI, TBAI and TBEM
Global Moderator
Hero Member
Karma: 42
Offline
Gender:
Posts: 2951
OS:
Windows XP
Browser:
Firefox 3.5.3
TBAI - Pathfinding and waypoint handling
«
on:
October 22, 2009, 11:28:18 pm »
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
Attached files
Thumbnail(s):
Other attached file(s):
TBAI.zip
(689.98 KB - downloaded 33 times.)
«
Last Edit: October 22, 2009, 11:31:37 pm by Michael Hartlef
»
Logged
Michael Hartlef
Creator of TBDI, TBAI and TBEM
Global Moderator
Hero Member
Karma: 42
Offline
Gender:
Posts: 2951
OS:
Windows XP
Browser:
Firefox 3.5.3
Re: TBAI - Pathfinding and waypoint handling
«
Reply #1 on:
October 22, 2009, 11:30:06 pm »
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.
Logged
kent sarikaya
Hero Member
Karma: 26
Offline
Gender:
Posts: 3225
OS:
Windows 7
Browser:
Chrome 3.0.195.27
WWW
Re: TBAI - Pathfinding and waypoint handling
«
Reply #2 on:
October 23, 2009, 04:02:40 am »
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!
Logged
http://ks9.us
Petr Schreiber
Global Moderator
Hero Member
Karma: 77
Offline
Posts: 5077
TBGL developer
OS:
Windows XP
Browser:
Firefox 3.5.3
WWW
Re: TBAI - Pathfinding and waypoint handling
«
Reply #3 on:
October 23, 2009, 07:55:59 am »
Great job man!
,
very pleasant surprise. Complete module, help file and sample ... what could I ask more?
Well, another sample
Excellent!
Petr
Logged
psch.thinbasic.com
/
forum
Information about ThinBASIC 3D programming and download of free TBGL tools.
WinXP Home SP3 - Sempron 3400+ @ 1.8GHz - 1Gb RAM @ 533 - NVIDIA GeForce 9500GT 512MB / NVIDIA GeForce 6200 TC
Michael Hartlef
Creator of TBDI, TBAI and TBEM
Global Moderator
Hero Member
Karma: 42
Offline
Gender:
Posts: 2951
OS:
Windows XP
Browser:
Firefox 3.5.3
Re: TBAI - Pathfinding and waypoint handling
«
Reply #4 on:
October 23, 2009, 11:53:35 am »
Thanks guys. I will create more samples in the next days.
Logged
Eros Olmi
Administrator
Hero Member
Karma: 92
Offline
Gender:
Posts: 6306
thinBasic co-author
OS:
Windows XP
Browser:
Microsoft Internet Explorer 7.0
WWW
Re: TBAI - Pathfinding and waypoint handling
«
Reply #5 on:
October 23, 2009, 07:42:48 pm »
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.
Logged
www.thinbasic.com
|
community.thinbasic.com
|
psch.thinbasic.com
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB
Eros Olmi
Administrator
Hero Member
Karma: 92
Offline
Gender:
Posts: 6306
thinBasic co-author
OS:
Windows XP
Browser:
Microsoft Internet Explorer 7.0
WWW
Re: TBAI - Pathfinding and waypoint handling
«
Reply #6 on:
October 23, 2009, 10:07:55 pm »
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
Logged
www.thinbasic.com
|
community.thinbasic.com
|
psch.thinbasic.com
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB
Michael Hartlef
Creator of TBDI, TBAI and TBEM
Global Moderator
Hero Member
Karma: 42
Offline
Gender:
Posts: 2951
OS:
Windows XP
Browser:
Firefox 3.5.3
Re: TBAI - Pathfinding and waypoint handling
«
Reply #7 on:
October 23, 2009, 11:36:39 pm »
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
n = TBAI_MarkerCreate
(
pathID
[
, direction , mode
]
)
Logged
Petr Schreiber
Global Moderator
Hero Member
Karma: 77
Offline
Posts: 5077
TBGL developer
OS:
Windows XP
Browser:
Firefox 3.5.3
WWW
Re: TBAI - Pathfinding and waypoint handling
«
Reply #8 on:
October 24, 2009, 09:28:28 am »
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!
Logged
psch.thinbasic.com
/
forum
Information about ThinBASIC 3D programming and download of free TBGL tools.
WinXP Home SP3 - Sempron 3400+ @ 1.8GHz - 1Gb RAM @ 533 - NVIDIA GeForce 9500GT 512MB / NVIDIA GeForce 6200 TC
Michael Hartlef
Creator of TBDI, TBAI and TBEM
Global Moderator
Hero Member
Karma: 42
Offline
Gender:
Posts: 2951
OS:
Mac OS X 10.5
Browser:
Firefox 3.5.3
Re: TBAI - Pathfinding and waypoint handling
«
Reply #9 on:
October 24, 2009, 10:29:38 am »
Sure, will do that.
Logged
Lionheart008
Sr. Member
Karma: 19
Offline
Gender:
Posts: 832
I'm a member of x-men team
OS:
Windows XP
Browser:
Firefox 3.5.3
Re: TBAI - Pathfinding and waypoint handling
«
Reply #10 on:
October 24, 2009, 02:49:35 pm »
hi michael. I can also only say, superb! I have tried this little tbai path game script some minutes before with thinbasic 1.7.9.0 release and it works very fine ! thank you for this good script, it will take a big step in game development for the future here, I am sure
best regards, frank
Attached files
Thumbnail(s):
Logged
you can't always get what you want, but if you try sometimes you might find, you get what you need
Michael Hartlef
Creator of TBDI, TBAI and TBEM
Global Moderator
Hero Member
Karma: 42
Offline
Gender:
Posts: 2951
OS:
Windows XP
Browser:
Firefox 3.5.3
Re: TBAI - Pathfinding and waypoint handling
«
Reply #11 on:
October 24, 2009, 04:00:06 pm »
I am glad you like it.
Logged
Eros Olmi
Administrator
Hero Member
Karma: 92
Offline
Gender:
Posts: 6306
thinBasic co-author
OS:
Windows XP
Browser:
Microsoft Internet Explorer 7.0
WWW
Re: TBAI - Pathfinding and waypoint handling
«
Reply #12 on:
October 25, 2009, 08:25:55 am »
Michael,
let me know if you would like TBAI module (help file and sample script) be distributed with thinBasic setup.
I will be happy to include them.
Ciao
Eros
Logged
www.thinbasic.com
|
community.thinbasic.com
|
psch.thinbasic.com
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB
Michael Hartlef
Creator of TBDI, TBAI and TBEM
Global Moderator
Hero Member
Karma: 42
Offline
Gender:
Posts: 2951
OS:
Windows XP
Browser:
Firefox 3.5.3
Re: TBAI - Pathfinding and waypoint handling
«
Reply #13 on:
October 25, 2009, 10:40:33 am »
If you think it is worth it, then I go ahead.
Please make some space in the SVN, so I can upload the sources there.
Logged
Eros Olmi
Administrator
Hero Member
Karma: 92
Offline
Gender:
Posts: 6306
thinBasic co-author
OS:
Windows XP
Browser:
Microsoft Internet Explorer 7.0
WWW
Re: TBAI - Pathfinding and waypoint handling
«
Reply #14 on:
October 25, 2009, 10:45:22 am »
Great.
Logged
www.thinbasic.com
|
community.thinbasic.com
|
psch.thinbasic.com
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB
Tags:
TBAI
pathfinding
waypoint
Pages:
1
2
Add bookmark
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General community
-----------------------------
=> Shout Box Area
=> General
===> Events
===> PCOPY!
===> Development
===> 3rd party library
===> Science
===> Technology
===> Search engines
===> Software discussion
===> Gaming
===> Other programming languages
=====> C / C++
=====> Free Basic
=====> Free Pascal
=====> Power Basic
=======> Power Basic tools and resources
=======> Power Basic specific boards
=========> Power Basic OpenGL
=========> Power Basic and DBMS
=========> Power Basic COM
=======> Power Basic sources
=====> Pure Basic
=====> ScriptBasic
=====> Scripting
===> Security
=> Announcements
===> thinBasic Beta testing
===> Server, web site and Forum updates
===> vBulletin new forum updates
=> ThinBasic Journal
===> Suggest new articles
=> thinStudio
===> thinGaming Scoring web site
===> CM contest 2009
=====> Media
=====> Code
-----------------------------
User projects
-----------------------------
=> User files and/or user projects
===> T.A.B. (ThinBasic Adventure Builder)
-----------------------------
thinBasic (the language)
-----------------------------
=> General
===> Polls
===> Installation
===> Help Material
=====> Fixed or cleared errors in help material
===> YouTube
===> Challenge
===> thinBasic development blog
===> thinBasic vaporware :D
===> thinBasic where ...
=> Modules specific issues
===> Suggest new module
===> BIFF
===> CGI and FastCGI
===> COM
===> COMM (Serial communication module)
===> Console
=====> Console: source code examples for beginners
=====> Console: advanced source code examples
===> Core module
===> Dictionary module
===> DT (Date module)
===> Eval
===> EXE
===> File
===> iComplex
===> INet
===> INI
===> Irrlicht
===> LAN
===> ODBC
===> OS
===> Statistics Module
===> TBASS
===> Tcp/Udp module
===> TImage
===> Tokenizer
===> UI (User Interface) module
===> VBRegExp
===> Win API interface
===> WMI
=> Sources, Templates, Code Snipets, Tips & Tricks, Do you know ...
===> Do you know ...
===> thinBasic tutorials
=====> General purpose scripts
=====> Execution speed tests
=====> Files and directories handling
=====> Internet related scripts
=====> Math scripts
=======> Eval
=====> Tips & Tricks
=====> User Interface scripts
===> Samples for help file
===> Templates
===> Real world situations and solutions using thinBasic
=====> Project: 3D Warehouse
===> Math: all about
=> Suggest new features
===> New features: Developed or solved
=> Bug report
===> Fixed or cleared bug reports
===> thinBasic Beta testing suggestions or bug reports
-----------------------------
thinAir (the IDE)
-----------------------------
=> thinAir General
===> thinAir Tips and Tricks
===> thinAir CodeTips/CodeSense
=> thinAir Suggest new features
===> thinAir new features developed
=> thinAir Bug report
===> thinAir Fixed or Cleared Bug report
=> Alternative IDEs
-----------------------------
thinTools
-----------------------------
=> thinSVN
=> thinDebug
=> thinBundle
===> thinBundle suggest new features
===> thinBundle bugs report
=> thinBasic SDK
===> Basic language SDK development
=====> Module SDK (Power Basic version)
=====> Module SDK (Freebasic version)
===> Turbo Delphi language SDK development
===> C/C++ language SDK development
=====> Module SDK (Microsoft C /C++)
=======> MSVC++ 6.0
=======> MSVC .NET
=====> Module SDK (Borland C /C++)
=====> Module SDK (GCC C /C++)
===> Other languages SDK development
=====> Module SDK (MASM32 assembler)
=> User tools
=> 3rd party tools
-----------------------------
User modules (the user developed modules expansions)
-----------------------------
=> TBGL module by Petr Schreiber
===> TBGL General
===> TBGL Bonus Pack
===> TBGL Bonus Pack Pro
===> TBGL Suggest new features
===> TBGL Bug Report
===> TBGL Scripts and Projects
=====> TBGL Random Trees
=====> TBGL Robot duel
=====> TBGL Labyrinth
=====> Top Down 3D
=======> Game general
=======> Game story and Character Development
=======> Game executable
=======> Game sources
=======> Media material
=======> Bugs handling
=====> TBGL ScreenSavers
=====> TBGL Gui projects
=====> TBGL nmg_tankwars
=====> TBGL Arkanoid
===> TBGL Modelling, 3D, other SW integration
===> M15 file format
===> Resources
===> TBGL Tutorials
=====> ThinBASIC programming in OpenGL/TBGL
===> TBGL Font Creator
=> TBDI module. thinBasic Direct Input integration by MikeHart
===> TBDI Bug report
=> TBEM module - thinBasic Event Manager module
=> O2 JIT Compiler / Assembler
===> O2h Compiler
===> Machine Code
=====> Machine Code references
=====> Machine Code: script sources and examples
===> Programs
===> Legacy
=> Experimental modules or library interface
===> AStar - (A Star) path-finding algorithm
===> ODE - Open Dynamics Engine
===> OpenCL
===> tb_graphx
===> TBCDL Collision Dection Library
===> TBTIL Texture Image Library
-----------------------------
Utilities working with thinBasic
-----------------------------
=> Tray Agent
Loading...