PlaceholderGames / Team1-2017

Team 1 CS2S561 game
2 stars 3 forks source link

AI engine for Solar Ships & Space stations #46

Closed SharktasticA closed 6 years ago

SharktasticA commented 6 years ago

So for our NPC objects, we're going to need some semi-decent AI to allow them to move places and do different small tasks.

My current thoughts for the AI is some sort of event-based engine that responds to different triggers (such as being close to something or being hit), with some random elements based off specified probabilities; e.g. probability for being stationary, moving, super speed moving, following player, and extremely rare hostility. To make the object seem like it isn't doing tasks for a set amount of time, it could have a delta time for a duration between tasks that is RNG'd at the start of every task based on a provided minimum and maximum period of time. The engine itself could be modelled similar to the Variables classes - an inheritence structure so reusable code can be centralised in an abstract class.

Task needs assignment ASAP.

SharktasticA commented 6 years ago

f6b58b8e764d4c3e1c783a3b9176568b6a6da903 Prototype working and added to solar ships for testing.

SharktasticA commented 6 years ago

Update c811aa7a5d7eb2e2d513453db5a4b455b4159c7f AI is now using a queue for managing multiple events. The plan is that it allows more logic to how events are happened via priority and duration. Two classes, AIEvent and AIEventQueue, are present to facilitate the interaction.

SharktasticA commented 6 years ago

Update 28161f78e6569eab2e5ab2d0eb177bc547061e3e AI can now grap multiple ParticleSystem and LensFlare objects to toggle them based on AI's current event.

SharktasticA commented 6 years ago

Sidenote: I'm working on a FSM-based AI for my portfolio that I may incorporate as a replacement to this. Depends if it is ready before the 20th though.

SharktasticA commented 6 years ago

For now, I'm concluding this as 'working and still viable'.