Bomberman Mechanics for AI

Discuss game development design and post your game ideas

Post » Thu Sep 28, 2017 4:22 am

Nice effort my friend! Remind me of my stalled Bomberman prototype:
Posts: 803
Reputation: 24,414

Post » Thu Sep 28, 2017 4:03 pm

Since the game level is a board and people move on squares in a grid, you could find the square you want to move to, mark that sqaure as 0. Then go outawards in a circle pattern so the next squares surrounding that would all be 1, then go outwards again and all those squares would be 2 etc until each square on the board is covered. Dont count squares with a wall as you cant move there. Now all the person who is moving needs to do is to always move each step towards the sqaure with the lower value to the square its currently standing on to move there.

You could artifically inflate the value of squares under certain conditions to make those squares less attractive to move to, such as if an enemy drops a bomb then that would add say 100 to the sqaures value and would radiate 99, 98, etc for the bombs explosion range. The person would avoid those squares and find a path around them.
Posts: 81
Reputation: 1,143

Post » Sat Sep 30, 2017 6:54 pm

For making the ai avoid explosions you could use or
It's kind of along the lines of what mOOnpunk said, but instead of a weight, we just search from the player to the closest non blast radius area. That brings me to another idea, you can use an array as a grid of the level and loop over the bombs and set all the locations that will have explosions. That gives a simple lookup with events. ... .capx?dl=1

Basically that's the first half of an ai. The blue guy will move out of the blast radius of placed bombs if it can without stepping into fire. It doesn't consider the time left before a bomb goes off which is something most players don't bother with. they just stay out of range of bombs.

The second half would probably be moving and placing bombs. Finding where to bomb could be done with a similar breadth first search and then evaluating what a bomb would destroy (enemy or block) for each grid location considered.

The logic would be:
if the ai is in a blast radius
move to same place
find a good place to bomb, move there and place bomb

To keep the ai from bombing itself you can also check for if there's a place to escape to before placing the bomb.

Anyways maybe some of those ideas are helpful. More advanced stuff can probably be considered later, but the basics are always good first. Also in the example everything is grid based but the motion doesn't have to be. The units need not even stop of grid centers, but that's something to figure out for another day.
Posts: 5,555
Reputation: 85,323


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 0 guests