Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Realistic movement in Diablo like game

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 mordimer   Members   


Posted 30 March 2012 - 03:51 AM

Hello Everybody,

I'm a hobbyist programmer creating an engine to diablo like game. I would like to create an AI for my monsters which would make them move in a realistic (or at least semi realistic) way.

It's quite easy to detect player, find the shortest way towards him and make monsters to charge at that direction. In my experience moving everything linearly it's not the best AI behaviour in terms of reality. Are there any well known algorithms / approaches to make the movement more realistic (or even synchronised to make the monsters work together)?

Thank you!

#2 Ashaman73   Members   


Posted 30 March 2012 - 05:25 AM

You should take a look at Steering behaviour, which is a common approach to handle movement of one or more characters in a game: clicky



Gnoblins: Website - Facebook - Twitter - Youtube - Steam Greenlit - IndieDB - Gamedev Log

#3 IADaveMark   Moderators   


Posted 30 March 2012 - 08:36 AM

Note that "moving" and "acting" are not the same things. Especially in the context of "acting together".
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#4 Malabyte   Members   


Posted 31 March 2012 - 03:03 PM

Add more conditions and randomness to the mobs' behaviours and try to make the mob detect the behaviour of the player, in various ways. But I'm not sure, I'm still a noob designer.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -

#5 JTippetts   Moderators   


Posted 31 March 2012 - 03:27 PM

The problem I've found with trying to implement realistic movement and AI in a Diablo-clone is that nobody notices. They're too busy pounding the buttons that make things die to realize that those six Cannon Fodders they just killed, like, totally worked together and stuff. The outcome of the fight was completely uninfluenced by their working together. Diablo-clones by nature are mow-em-down type games, so it's probably a waste of development time to get too complex with the behavior systems. There seems to me to be an inversely proportional relationship between the number of enemies on-screen and the amount of time the player spends thinking about the behavior of those enemies. To make AI and behavior actually have an influence on the outcome of the fight and make an impression on the player, I think there needs to be a dramatic reduction in monster count, and Diablo-clones are more interested in throwing more and more mobs at the player, not less and less.

Furthermore, the scenario of your typical Diablo-clone doesn't really necessitate complex reasoning. Bear in mind, of course, that when I mean Diablo-clone, I mean Diablo-clone. Hordes of baddies, flashy special effects, gold and loot and items and spells flying all over the place. You know, like Diablo. In such a scenario, the two opposing factions (player and mobs) each have the same goal: kill the other. They do so with resolute intensity, pouring all of their focus into that task. The player collects items and skills and levels for the sole purpose of being more effective at killing the mobs, and the mobs use their special mobly powers of mobbiness to... well... kill the player. Maybe some do it in a sneaker fashion (teleport+shoot, retreat+summon, what have you) but the overriding goal is still the same. In such a scenario, there really doesn't need to be a complex behavioral system driving it. A few randomized behavior trees can give the appearance of intelligence on a passing glance, and that is about all that is necessary.

If the intention is to move beyond this, then by nature you are moving beyond being a Diablo clone. But still, it's not exactly a field requiring complex AI. Have you ever been in a bar fight, or a school-yard scrap, or just a ninja-swords-made-from-PVC-pipe-fight with your cousins? Try to imagine that scenario only bigger. Deadlier. In the vast majority of these cases, there is going to be a straight-line approach made to the most dangerous opponent, followed by perhaps a bit of circling and dancing in the course of what is mainly a frontal assault. The main baddy's friends will circle around, maybe some will be too scared to approach, maybe others will try to jump in, but for the most part these untrained combatants will not cooperate and will, in fact, just bumble around doing their own thing and getting in each other's way. Trained combatants, on the other hand, will cooperate. But so often, this cooperation can simply be simulated in-game with a few clever tricks like evenly spacing the mobs around an opponent to threaten him from all sides, throwing buffs on one another as needed, prioritizing certain abilities based on an analysis of the player's build, etc...

In all of this, the actual mechanical act of moving is the simplest part, and any basic A* shortest-path-finder with some dynamic obstacle handling is probably going to be more than sufficient.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.