Jump to content

Leadwerks 2.5x + DarkBasic's Dark AI


Marleys Ghost
 Share

Recommended Posts

 

If you are thinking about using Dark AI as a cheap option for an AI solution and are wondering how to use both LE2.5x and Dark AI together then I suggest the best way to think about how to interface the two, is to think along the lines of how EKI One works, where you have two parallel but identical worlds running at runtime and the interface is the channeling of information between "identical twins" with one twin in the "AI world" and the other in the "Game world", that is what one "twin" is doing in the "AI world" the other is mirroring in the "Game world", the interface merely opens a line of communication between them so they know what each other are up to. The "Game world" is the physical world in which the player interacts, but the "AI world" is merely a "ghost world" that overlays it. Sounds more complex than it really is.

 

Most of the commands for Dark AI relating to collision objects can be used, except the couple that relate specifically to DBobjects and levels. None of the debug commands are of use as they will probably rely on a DX7/DX9 drawing context and not an OpenGL one like LE2.5x. The good news, the other 128 commands should all work via some good interfacing, which will require a good working knowledge of the LE API and a good understanding of what those Dark AI commands actually do. Although there are some automatic behaviours from which information can be retrieved and used in the interfacing to LE, the best option I would think is to create NPC types/classes and use FSM's in conjunction with the Dark AI command set to create behaviours, it gives more control and should allow a higher level of complexity in behaviour. Just remember, you get what you pay for! You can download a demo of Dark AI working in DarkBasic Pro here, should give you some idea of what to expect.

 

Of course, NPC entities (and objects) can all be tied to the integration with lua scripting allowing placeholder placement in the editor, with settings and values passed to the application for each when loading the scene.

 

As I said this was just an hour and half's work, an experiment to see if it could be used.

 

Blog entry: http://www.leadwerks...-dark-ai-daile/

 

Demo of DAILE

 

WASD to move the player, mouse look, mouse wheel to zoom in and out. Note: There is no physics collision between the player and the obstacles, this is intentional and was used to check the virtual boundaries worked with the NPC's (that is, although the player could pass through them the AI had to plot a course around).

 

NPC1-3 : Freindlys that will follow the player and defend him.

NPC4 : Enemy that defends the circled zone when the player enters it.

NPC5-6 : Enemies that are set to chase and attack (and search for) the player and his allies.

NPC7-15 : Neutrals who will just move about.

 

 

 

 

  • Upvote 1

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Its better than nothing, I am making a game using Lua scripting with Leadwerks SDK, its limited atm, no physics or AI and pretty much a space box..

 

BUT this looks useful and you said it can be used with Lua scripting ..ill check it out ..thanks.

Threadripper 2920X Gen2 CPU(AMD 12-core 24 thread) | 32Gigs DDR4 RAM | MSI Nvidia GeForce RTX 2070 Stock OCed | ASRock X399 Professional Gaming Motherboard | Triple M.2 500Gig SSD's in Raid0

Windows 10 Pro | Blender | Paint.NetWorld Machine | Shader Map 4 | Substance Designer | Substance Painter | Inkscape | Universal Sound FX | ProBuilder | 3D World Studio | Spacescape | OpenSky | CubeMapGen | Ecrett Music | Godot Engine | Krita | Kumoworks | GDScript | Lua | Python | C# | Leadworks Engine | Unity Engine

 

Link to comment
Share on other sites

Really interesting MG. Those modules can be had for a song and re-purposing them for LE is a a great idea, but you took it beyond the idea stage and actually did it. Awesome work.

 

Thanks Flexman, not sure its awesome work though lol. I spent another couple of hours on the intergration today after the cycling finished (now THAT was awesome work by team GB!), heres the result:

 

 

 

Blog entry: http://www.leadwerks...dark-ai-part-2/

  • Upvote 2

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Result of the current stage reached in the integration.

 

 

 

More Info:

 

Blog Entry: http://www.leadwerks...dark-ai-part-3/

  • Upvote 1

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...