Hi there,
this post is for you awesome thinkers out there. I hope there is anybody who can help my with this dilemma.
Short version: I need help with my AI. I don't know how I could implement this one.
Log version: Here we go.
Basically, Forest Strike is a 2D top down game. All the possible stuff displayed is on one specific block as seen in the screenshot (don't worry, this is an old one - the general handling is the same).
Now the thing is, I need an more or less clever AI.
The characters start in one corner, every one on another field. Game Maker provides Motion Planning in order to navigate from one point to another (as seen in the GIF above). As a human player, I basically know where I want to go and what to do. Like if there is a stone block in my way, I should get rid of it first. The NPC does not know such things and this is my problem. I don't know how to implement this.
Let my start with the basic rules, the game is built on:
* one character per block
* you can not move through solid blocks or characters (characters are handled as solid blocks more or less)
* there are destroy-able blocks and non-destroy-able blocks (each one of them has a different parent like obj_parent_destroyable, obj_parent_non_destroyable)
* you can only move a specific amount of steps (randomly chosen at the start of the round)
* you can destroy a destroy-able block with a bomb
* the size of the bomb can vary
* explosion goes up, left, down, right based on the size starting from the center (the point where the bomb is placed)
* e.g. bomb size = 3, position x = 10, y =10: explosion-points: (7, 10) (8, 10) (9,10) (10, 10) (11, 10) (12,10) (13,10) (10, 7) (10, 8) (10, 9) (10, 10) (10, 11) (10, 12) (10, 13) (form of a plus sign)
* explosion can not go through solid blocks
* you can have multiple characters per player
* characters are assigned to a specific player
* hit-points = 1 (so basically everything is a one-hit)
* items are represented by bouncing boxes (as always, only one per block)
* you can place any number of bombs during a move phase (the phase the AI should be handled)
* bombs explode during the action phase (no movement allowed)
* after action phase, the next player can move etc.
(If there is any information missing, please tell me and I will append it)
So the basic behavior I want to have for the AI:
* move to an opponents character and bomb it
* get the best way (maybe ignore solid blocks first and use an ideal path???)
* try not to bomb characters of the same player (like placing a bomb to destroy a block which is in the way)
* maybe get items
If anyone of you could help me with this problem, it would be awesome. I would really appreciate it, if you could provide structured info or maybe even pseudo-code.
Thank you in advance,
Lukas