Ai based Player

Posted By: Nems

Ai based Player - 09/28/13 00:36

Howdy,
I've have a title I want to complete and publish in GStudio then wrap in a Browser for MP play.
I want my player to be an entity that functions as a stand-a-lone AI but still follow user input prompts as a Player entity when called upon to do so..e.g. when I click for an action to be called, the Ai comes and performs that action.

As its been a while since I have used GStudio (let alone any other product of the same ilk) I am wondering if any one else is following a similar path and in particular, if they/You have any insights into realizing such a game-play mechanic...

The behavior is that of a new born Sprite creature, going about feeding and growing itself to an adult stage then fighting and fending off incursions into its territory but having no ability to so physically.

Being a 'Player' it is of course responsive to all player commands but may turn and harass the User for being too slow or something or urge the User on to keep it alive.

Certainly States would be the way to go for its own arbitrary actions and the usual functions for User interaction But is it feasible?

Cheers...
Posted By: Superku

Re: Ai based Player - 09/28/13 00:49

Hey!
The first thing that comes to my mind is that it's feasible, yes, and that I would start with the pathfinding first. I think I would "limit" myself to a tile based pathfinding system and then implement some kind of action priority list. This list would be sorted by some priority value calculated through different parameters and user input (user actions have very high priority) and would contain struct instances of a self defined "action" struct. Some function would now monitor the list and pick the top priority action every now and then (and remove finished tasks). Last but not least the player entity itself executes a state machine system.
Posted By: Nems

Re: Ai based Player - 09/28/13 02:32

Thanks Superku, awesomeness for your algorithm, its great to find clued up folks.
I knew state machines were a good solution but didn't consider path-finding systems to be integral, so as soon as I have something I will post my results.
When its all done its my intention to release all to the community everything I put together after publication, including Unity conversions to GStudio but in C# ( my programmer does that bit) so others can use them exactly as they are or to suit their projects.

Some 3 months yet from having a working proto.

Thanks again for the heads-up....
© 2024 lite-C Forums