Them lively little critters! in Design Philosophy
|
|
In this thread, I'd like to discuss the various methods of handling the movements and actions of mobiles in a roguelike atmosphere.
A lot of roguelikes usually process their monsters' AI in a fairly simple fashion: Move and control the actions of all mobiles on the player's screen, or just outside of the screen. This obviously cuts back on processing time, but I'm after a better route.
If I'm going to create a roguelike, then I don't want monsters just off the edge of the screen sitting calmly until you come within 10 feet of them. If there's the clashing and clamouring of battle going on in the distance, they need to decide if they are going to see what all of the commotion is about. On the upside, this can lead to some interesting scenerios for the player: dash into the dungeon with a massive Broadsword of Slashing (+3), and you'll wake up every kobold and orc on the level. However, a skilled thief could stealthily slip into the dungeon and backstab enemies without making much sound at all.
I should hope that the second option sounds more appealing than the first, but the issue still remains of speed. If I'm handling the AI of every mob on a fairly large floor, the player is going to (probably) notice the lag between turns.
I'd like to hear some opinions on how you might handle the matter, or any useful advice or input you may have.
|
Well, I would first start with who can hear the action. This would probably depend on 3 things:
1.) Loudness of the action - stabbing a monster in the back would be quieter than hacking at it with a braodsword, unles the monster screams out...
2.) Distance from action - ohearers(world.view*2) should be more than sufficient an area for the loudest of actions.
3.) Acuteness of hearing - How well can the monsters hear? I'm sure creatures living primarily in dark caves would hear better than ones living in a noisy jungle.
From that list of monsters, I would check a few variables, like hunger, health, and so on to see if the monster even wants to deal with whatever could be making that noise.
[Edit] Some more ideas that I would most likely take into account as far as the monsters go:
Are they awake? - If not, did the noise wake them? And if so, are they cranky when they wake? Ok, so the last one is a bit over the top...
Are they brave enough? - Can't assume all monsters are huge hulging beasts. I would imagine something like slimes or rats would prefer taking on smaller adversarries (unless there is a pack of rats, which is something else to consider: mob mentality versus individualism)
Are they protecting young/valubles/territory? - Just about anything will fight to keep it's young safe. Valubles, like treasure or shineys, could motivate a monster to attck, or take it's bounty deeper in seclusion. And territorial monsters would attck just about anything that comes along.
[/Edit]
From this very select list, I would try first to move the monsters toward the source of the noice, not the source of the player that made the noise. This would give the player a chance to escape, or distract known mosters with a rock, or something.
If the monsters don't find anything interesting in a very short period of time, then they would revert to their previous state. But, if they do find something, they should devour it, and check around a bit longer to make sure nothing else edible is nearby.
A very simple description, I know...
~X