Jump to content
Marleys Ghost

Leadwerks 2.5x + DarkBasic's Dark AI

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.

 

 

 

 

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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/

Share this post


Link to post
Share on other sites

Hey MG, that seems to work really great :-)

Are you planning to share it for those who might have the Dark AI?

Share this post


Link to post
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.

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.


×
×
  • Create New...