Jump to content
  • entries
    50
  • comments
    173
  • views
    104,623

Leadwerks 2.5x + DarkBasic's Dark AI [Part 3]


Marleys Ghost

5,141 views

 Share

I thought I'd spend a little more time on this integration, using the laptop whilst watching the Olympics. The next phase was to automate the routines for NPC update and compacting the code routines. Ultimately, the idea is that after the scene is loaded, it will be parsed and flagged Dark AI objects, NPC's, Paths and Zones will be set up automatically via information taken from the relative lua scripts. Paths and Zones will be later, collision objects are done, so I was working on how to go about NPC's using this method. As some may have noticed I am using the FPSC Model Pack 53 characters.

 

 

FPSC53.jpg

 

 

I converted about 5 or 6 characters to Leadwerks format and all the weapons for this exercise. I will eventually convert them all but I hand "prune" the bones of the rig and that takes longer than I want to spend at any one time on this side project. The FSM is still very basic but the first goal was to derive a current Animation state with each of those states having sub-FSM's to dictate the current behaviour based on the previous state and internal and external inputs. The framework is in place for the animation state which is derived by performing Boolean logic on returned values and strings from the Dark AI runtime and some stubs are in place nested inside for some basic behavioural sub-FSM's. First though I want to able to set up the scene and then place all the Dark AI objects, NPC's, Paths and Zones directly in the editor and then use the load routines to set all that up in an automagic way inside the application. The collisional objects were easy and are done with some simple tick box flagging functionality added to their property scripts. The NPC's a little more in depth , due mainly to the large amount of usable settings! lol. But I wanted to be able to place the model and then assign it some basic attributes to be read on load, this included what weapon to attach.

 

 

Properties.png

 

 

Properties2.png

 

 

Model_Female.png

 

 

So that was the basic NPC property script setup (wasn't that painful anyway). So using the test scene from Leadwerks 2.5x + DarkBasic's Dark AI [Part 2], and placing a few enemies and some friendly's to look after the player, this is the result of the current stage reached in the integration.

 

 

  • Upvote 1
 Share

3 Comments


Recommended Comments

Thanks Mack, the next part will be (in my opinion) the most complex task, that is to inbed the firing FSM's of "Can Fire", "Fire Rate", "Ammo Level ==> Reload", "Burst Fire", "Single Fire", "Sustained Fire" ect. plus of course the visuals. So a new project will be setup with just a single NPC for that. Plus of course grenades! can't not have grenades, I should be able to convert over my Grenade/Explosion routines from my 3rd Person Movement & Animation Control Rig.

 

http://www.leadwerks...ntrol-rig-test/

 

Still lots to do but after about 7-8 hours work, its slowly coming together, but this is merely a side project that's helping me get to grips with c++, which I will be using for LE 2.5x with EKI One.

Link to comment
Guest
Add a comment...

×   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...