Page 2 of 4

Re: improve monster movement

Posted: Wed Dec 28, 2011 10:42 pm
by qTzal
ncer wrote: In addition you would only have monsters move around on maps within quick reach of the player... There's absolutely no need to be thinking about the entire game world to simulate larger monster movement.

You could even place spawning points for this near the exit towards that other map so the monster actually appears to be coming from that map.
Ironic juxtaposition: the 30 year old text based Rouge has monsters that can follow you from room to room; these rooms are analogous to Andors Trail's individual maps.
On the newer Baldur's Gate all you have to do is exit the map screen to ditch pursuing monsters.

I think freeing monster handling from the map portion of the code, so monsters are their own entity and not simply a map attribute, would open up options for game play.

As it is the game is biased heavily towards "first strike" juggernauts versus balanced offensive/defensive strategies because of a few monster behavior reasons:
  • no following or pursuing by monster means that a PC can juke amongst the monsters attacking a each individually with minimal risk
  • monsters are frozen during combat
  • no combat advantage for monsters ganging up on PC. I proposed a simple adjustment for that over here.
From the monster's "mental" perspective the PC is a wraith: he appears out of nowhere to attack invisibly and you can only attack the PC if you can touch him.

With a behavior attribute table you can do creative things like:
  • monsters that follow
  • monsters that lurk timidly
  • monsters that cluster in herds
  • monsters that bumble around randomly (like now)
  • monsters that will flee
  • monsters that guard other monsters (by being aggro while following a fellow "guarded" monster that flees from the PC)
  • monsters that don't attack until in a group (instinct for wolves or imagine being nibbled to death by cats)
I'm not proposing complicated social interaction subroutines.
Just a simple table with boolean behaviors (awake/asleep, avoid/follow, passive/aggressive, moving/standing still, others?) and maybe geographic settings defining a limited wandering range when not pursuing and a preferred grid location when not interacting.
With a sufficient set of basic behaviors (that need not be boolean) complex behaviors will arise just as with genetic algorithms.

Re: improve monster movement

Posted: Fri Dec 30, 2011 6:30 am
by phydeaux
could be possible to give monster movement a little depth on current map tile, possibly have an aggro monster chase u off tile if you leave map... the calculations involved shouldn't be too horredously difficult to implement, I think, but as I am still talking blind, I couldn't be sure of that... no compy at the moment to check the coding, just thinking of how I would have programmed movement as it is now, which would be along the lines of:
random integer(5)
1= left
2= right
3= up
4= down
5= stationary

approximately... when I see "free mobs from map (constraints)" I think of the zones on each map tile in which the mob spawns and thus is stuck in... not freedom to move across the entire world map. now that I think about it, tho, giving mobs the ability to chase you off map probably isn't a god idea if you also want monsters that will flee, cuz you'd end up with a whole ton of cowardly mobs hiding in some corner of the map somewhere, clogging up the roads :twisted: a limit to how many tiles could be traversed by any given mob would have to be set, but then again, this train of thought is leading me into other semi related ideas now... I think I'll stop now :)

Re: improve monster movement

Posted: Sat Dec 31, 2011 6:44 am
by Tomcat
In NetHack, the most developed Roguelike, monsters may follow you from room to room, but "a map" is not a room, but an entire level. When the player leaves a level, he is largely forgotten there. (Yes, there are important exceptions!)

This would be like AT tracking monster movement within a limited group of screens (e.g a whole town, or the road from Snake Cave to Flagstone, say), not the entire world at a time. It may be doable without lag time issues, but then again may not be. Some players on the forum are already complaining about lag.

A more limited version of map-to-map movement might be implemented within the current scheme by defining a line-crossing monster as two or more separate monsters in adjacent maps, but with a small set of globally available attributes that defines which one is "active", whether it is in "pursuit" so that it can be spawned in the player's new map at the appropriate time and place to appear to be following, etc.

This could be implemented for only a few special monsters in a few special locations. E.g. you could have a boss be able to pursue you back out to the edge of his domain, once you get in far enough to disturb him. This could also be extended to having NPCs reappear in a new situation, as a quest progresses, for example. In fact I imagine something like that must be already done regarding the BWM "agent", though I have not downloaded the code. Perhaps I should do that...

Re: improve monster movement

Posted: Sat Dec 31, 2011 3:45 pm
by Stoodge
I found that the BWM agent is already loaded in all locations but is removed as you progress.
My game glitched while searching for the GoLF and all my maps from release 6.09 and 6.10 reset.
The agent had reloaded in all his locations simultaneously.

Just FYI. Don't know if it helps.

Re: improve monster movement

Posted: Sat Dec 31, 2011 4:45 pm
by Antison
Stoodge wrote:I found that the BWM agent is already loaded in all locations but is removed as you progress.
My game glitched while searching for the GoLF and all my maps from release 6.09 and 6.10 reset.
The agent had reloaded in all his locations simultaneously.

Just FYI. Don't know if it helps.
This is a know and reported issue.

Re: improve monster movement

Posted: Sun Jan 01, 2012 4:52 am
by Tomcat
Stoodge wrote:I found that the BWM agent is already loaded in all locations but is removed as you progress.
My game glitched while searching for the GoLF and all my maps from release 6.09 and 6.10 reset.
The agent had reloaded in all his locations simultaneously.

Just FYI. Don't know if it helps.
Yes it does...depending on the data structure and how it's accessed, it nath not be all that much more work to have all but the starting position turned of, and turn the rest on in succession...

Thanks!

Re: improve monster movement

Posted: Mon Jan 02, 2012 9:17 pm
by phydeaux
on another side note, with better movement, the addition of ranged weapons and the like would no longer be over powered... just a thought :)

btw, @samuel: if I'm reading the code correctly, and I'm still working with what I can get into on the phone, it looks like all maps are already stored in memory, the program just ignores all but the map you are currently on

Re: improve monster movement

Posted: Mon Jan 02, 2012 10:30 pm
by Samuel
phydeaux wrote:btw, @samuel: if I'm reading the code correctly, and I'm still working with what I can get into on the phone, it looks like all maps are already stored in memory, the program just ignores all but the map you are currently on
I think you are right.
I thought of this shortly after I wrote my post. But we would be limited to store every map in memory in the future.

Re: improve monster movement

Posted: Mon Jan 02, 2012 10:37 pm
by phydeaux
only if calculating movement for all mobs on all maps... which I don't think I've ever seen any rpg do... I really need a compy, guessing at coding thru what little I can get into is driving me nuts!

Re: improve monster movement

Posted: Fri Jan 06, 2012 2:00 am
by nyktos
i would be HIGHLY amused if a monster broke away from combat & ran away

ohhh no mr. mob (chases it down) there is no escape!

:lol:

although this may conflict with the hit & flee technique "fix" planned for 11

maybe - if the mob runs, it doesnt get its HP back (as "the fix" would heal it upon fleeing)