GAN Posted October 24, 2018 Share Posted October 24, 2018 Hi allIs there an AI tute for noobs? I sure would appreciate it. Thanks. Quote Link to comment Share on other sites More sharing options...
Duion Posted October 24, 2018 Share Posted October 24, 2018 I would recommend using a framework like BadBehavior https://github.com/BadBehavior/BadBehavior_T3DIt provides some examples and includes a behavior tree editor (which is broken currently) where you can simply edit your AI behaviors.While a basic AI is pretty simple in Torque3D, I would recommend you using a framework it will be easier in the long run. I think adding an AI is just a single command in Torque, you can see it when you are in the NavMesh editor and add a bot for testing, but to make the bots act intelligent is some more work, thats why using a framework may be better. It depends on what you want to do. If you just want a bot randomly running around like a headless chicken, it is just one function or even one line and you don't need more, in that case you do not need a framework, but otherwise you should use one. You can write you own of course, but if you are a noob, I would not recommend that. Quote Link to comment Share on other sites More sharing options...
Steve_Yorkshire Posted October 24, 2018 Share Posted October 24, 2018 It's a bit old (recast is now part of the engine) but the Chinatown Ai Deathmatch resource I wrote has Ai scripts.http://www.garagegames.com/community/resources/view/21604 Quote Link to comment Share on other sites More sharing options...
GAN Posted October 26, 2018 Author Share Posted October 26, 2018 Please allow me to introduce my noobiness.....I didn't use the Chinatown set to learn about AI. I thought I could just open the simplest of maps, add a simple datablock, and have an AI guy standing there not really doing too much, but he would be there. And then I could kind of see how things are linked together. Didn't happen. And then I think, my I should just play around with Coppercube? I really want to grasp T3D. The discouraging thing with learning game engines for me and its just not T3D; I have noticed it in Unity and Cryengine: the Tutes and Docs don't match the current interface due to age differences. Quote Link to comment Share on other sites More sharing options...
Duion Posted October 26, 2018 Share Posted October 26, 2018 I already told you, you open the NavMesh editor and switch down in the menu on the left and you enter a feature where you can spawn an AI test player and order him around, this is just to test the NavMesh, but it is a start to give you a feeling how it works. Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted October 27, 2018 Share Posted October 27, 2018 the scripts/server/aiPlayer.cs is the best place to find the functions related to aiPlayers / . The Torque3d manual 3.5.1 covers aiPlayer and spawnSpere methods and things , I highly reccomend the manual its available at readthedocs.com . Study the spawnShere and aiPlayer relationship . with the spawnScript you can execute commands relative to the Bot spawned at that particular spawnSphere such as goto obj or goto path , set animation threads kind of things plus re-spawning control . The spawned object ID is saved as $spawnObject which can be used in the script . The spawn script has a limit of 255 characters . Youll need paths and waypoints and a couple of finickey little things will come with that . You might need to learn how to make a path . It involves grouping a set of waypoints into a path object . something like that .They have to be numbered . Setting a bot to a path with the argument -1 for the path marker to proceed to will result in a constant loop of the path . heres a little test path . you might have to adjust the Z values , maybe just snap to terrain . new Path(path1) { isLooping = "1"; locked = "1"; canSave = "1"; canSaveDynamicFields = "1"; new Marker() { seqNum = "0"; type = "Normal"; msToNext = "1000"; smoothingType = "Spline"; position = "-741.996 -541.291 233.284"; Rotation = "1 0 0 0"; scale = "1 1 1"; locked = "1"; canSave = "1"; canSaveDynamicFields = "1"; }; new Marker() { seqNum = "1"; type = "Normal"; msToNext = "1000"; smoothingType = "Spline"; position = "-763.352 -545.388 233.079"; Rotation = "1 0 0 0"; scale = "1 1 1"; locked = "1"; canSave = "1"; canSaveDynamicFields = "1"; }; new Marker() { seqNum = "2"; type = "Normal"; msToNext = "1000"; smoothingType = "Spline"; position = "-781.852 -530.86 234.705"; Rotation = "1 0 0 0"; scale = "1 1 1"; locked = "1"; canSave = "1"; canSaveDynamicFields = "1"; }; new Marker() { seqNum = "3"; type = "Normal"; msToNext = "1000"; smoothingType = "Spline"; position = "-763.724 -509.504 235.157"; Rotation = "1 0 0 0"; scale = "1 1 1"; locked = "1"; canSave = "1"; canSaveDynamicFields = "1"; }; new Marker() { seqNum = "4"; type = "Normal"; msToNext = "1000"; smoothingType = "Spline"; position = "-732.683 -525.893 233.416"; Rotation = "1 0 0 0"; scale = "1 1 1"; locked = "1"; canSave = "1"; canSaveDynamicFields = "1"; }; }; Once you've spawned your bot be sure to type in objectID.dump(); in the console for a list of the available methods and things objID.dump(1); will give more details .spawnSpheres , Paths , wayPoint Markers , Triggers , all seem pretty much fundamental . Some nifty aI oriented GUI might seem a natural progression . Quote Link to comment Share on other sites More sharing options...
GAN Posted October 27, 2018 Author Share Posted October 27, 2018 Thank you for your input. Quote Link to comment Share on other sites More sharing options...
GAN Posted November 10, 2018 Author Share Posted November 10, 2018 Someday, I am going to find this navmesh editorAnd then I will get excited Quote Link to comment Share on other sites More sharing options...
XIXWYRMEXIX Posted November 11, 2018 Share Posted November 11, 2018 The editor is right there with all the rest of the tools in the torque SDK. Quote Link to comment Share on other sites More sharing options...
GAN Posted November 11, 2018 Author Share Posted November 11, 2018 I was able to build a Nav mesh using the Navigation editor. To demonstrate my noobness, I was expecting someone standing there after entered play mode. Quote Link to comment Share on other sites More sharing options...
Duion Posted November 11, 2018 Share Posted November 11, 2018 @GANYou can just download Uebergame and play around there with the bots, I have build everything already. Study the editor and the code and see how it works inside the game. Quote Link to comment Share on other sites More sharing options...
XIXWYRMEXIX Posted November 13, 2018 Share Posted November 13, 2018 I would suggest doing as Duion suggests. I did Steve Yorkshires old tutorials a few years ago and it was a huge help to me for figuring out how AI works in torque. I am still playing with different AI concepts, it is something I enjoy doing.The Nav mesh does not "make" AIPlayers. The Nav mesh is there for AIPlayers to get around more intelligently. It is there so the AIPlayers you have will be "smarter" in choices of movement. You still have to script out how and who spawns where, then script out how the AIPlayer takes advantage of the Nav mesh (cover places, jump places, etc.). Also the Nav mesh is not the only navigation method you can use. I.E- You do not "need" to use the Nav mesh to make AIPlayers move around. Its just a really cool tool. Quote Link to comment Share on other sites More sharing options...
GAN Posted November 13, 2018 Author Share Posted November 13, 2018 Thanks guys. I'll dig deeper into the AI. Quote Link to comment Share on other sites More sharing options...
GAN Posted November 13, 2018 Author Share Posted November 13, 2018 $myBot01 = aiAddPlayer("Bill Gates"); It's a start. :-) Quote Link to comment Share on other sites More sharing options...
GAN Posted January 26, 2019 Author Share Posted January 26, 2019 Here you go.http://wiki.torque3d.org/scripter:how-do-i-get-started-with-aiAnd Duion, Uebergame looks awesome. I have been playing around with it. Quote Link to comment Share on other sites More sharing options...
rlranft Posted March 22, 2019 Share Posted March 22, 2019 This is a complex topic.I highly recommend working through all of the World Editor and Scripting documents : http://www.roostertailgames.com/TorqueRef/index.html (this is my personal copy - there are others available that may be more up-to-date).Much of the documentation is outdated but if you're willing to work through the initial learning curve it shouldn't be too hard to adapt the older examples to the newer engine.AI isn't built in, you have to script it yourself. AIPlayer objects exist, but without some scripting they will just stand there. Quote Link to comment Share on other sites More sharing options...
Hurdles Posted April 1, 2019 Share Posted April 1, 2019 (edited) What exactly makes your documentation outdated, rlranft? Edited December 14, 2023 by Hurdles Quote Link to comment Share on other sites More sharing options...
Azaezel Posted April 1, 2019 Share Posted April 1, 2019 for clarity on the 'so where's this debug tool you're talking about': though I can't say i'd agree that http:// https://github.com/GarageGames/Torque3D/blob/development/Templates/BaseGame/game/tools/navEditor/navEditor.cs#L270 is the most straightforward example on the planet. For that i'd second studying steve's work. Quote Link to comment Share on other sites More sharing options...
rlranft Posted December 20, 2019 Share Posted December 20, 2019 What exactly makes your documentation outdated, rlranft? "Exactly?" I would say that you could diff my documentation in GitHub against the official to find out what exactly is different, but beyond that any time the engine changes or new features are added my personal copy gets farther and farther out of date.I think http://roostertailgames.com/TorqueRef/content/documentation/Scripting/Advanced/RTSPrototype.html and http://roostertailgames.com/TorqueRef/content/documentation/Scripting/Advanced/RTSPrototype2.html will still work but I haven't tried to get these scripts functioning in anything after 3.8 so they may have broken due to engine-side changes. Quote Link to comment Share on other sites More sharing options...
Bloodknight Posted December 20, 2019 Share Posted December 20, 2019 Should also point out that UAISK is also available on GitHub somewhere, i'll pst the link if I can find it soon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.