v0.8.9 (Bugfixes + translations) released to Google Play!

Useful links
Source code of the game - Contribution guide - ATCS Editor - Translate the game on Weblate - Example walkthrough - Andor's Trail Directory - Join the Discord
Get the game (v0.8.9) from Google, F-Droid, our server, or itch.io

improve monster movement

Discussions of the development process of the game.
User avatar
qTzal
Posts: 36
Joined: Tue Dec 27, 2011 7:41 am
android_version: 9.0 - Pie

Re: improve monster movement

Post 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.
Lvl: 58, XP: 3,500,299 , Gold: 103,903, BM potions: <400
RoLS: 1(@1200 rocks) , ElyR: 0, RoL: 0
HP: 180, AC: 237%, AD: 20-31, AP: 12, CC: 9%, CM: 1.0, BC: 225%, DR: 2
phydeaux
VIP
Posts: 339
Joined: Fri Dec 09, 2011 7:40 am
android_version: 5.1 - Lolipop
Location: Gargoyle cavern, blindly hacking mobs to pieces till I find a rols!
Contact:

Re: improve monster movement

Post 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 :)
Tomcat
VIP
Posts: 1353
Joined: Tue Feb 08, 2011 7:05 am
android_version: 7.0

Re: improve monster movement

Post 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...
Norbert
Lvl:52 XP:2597576 AP:12 HP:124 AC:282 AD:30-42 CHS:27 CM:2.0 ECC:18% BC:132 DR:2
Skills: CS:2 IF:2 Ev:3 Rg:1 DgPro:1 1HPro:2 LtAPro:2 FS-DW:2 Sp-DW:1
Equip: FP BSS JoF RoP PRoB SrpHbk GoLF EnhCH EnhCB
Other: DotSP VD GoW FB TG RoD+6 Oegyth:6
Stoodge
Posts: 71
Joined: Fri Nov 25, 2011 12:28 am
android_version: 4.0
Location: Middle of the meat grinder

Re: improve monster movement

Post 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.

Code: Select all

Lvl: 60, XP: 3681789, Gold: 280362, RoLS: 1, GoLF: 1, ShaF: 1
HP: 137, AC: 237% , AD: 36-47, AP: 3, CHS: 23, ECC: 16%, CM: 2.0, BC: 91%, DR: 2 
WA, HH, Dg, BS, CS(2), IF(2), Rg(2), MF(2), SM, EB, DBS
R.I.P. my original character : Stoodge
User avatar
Antison
Posts: 5254
Joined: Mon Mar 28, 2011 11:33 pm
android_version: 14 - Android 14
Location: A home without a beagle is just a house

Re: improve monster movement

Post 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.
"A home without a beagle is just a house"
Tomcat
VIP
Posts: 1353
Joined: Tue Feb 08, 2011 7:05 am
android_version: 7.0

Re: improve monster movement

Post 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!
Norbert
Lvl:52 XP:2597576 AP:12 HP:124 AC:282 AD:30-42 CHS:27 CM:2.0 ECC:18% BC:132 DR:2
Skills: CS:2 IF:2 Ev:3 Rg:1 DgPro:1 1HPro:2 LtAPro:2 FS-DW:2 Sp-DW:1
Equip: FP BSS JoF RoP PRoB SrpHbk GoLF EnhCH EnhCB
Other: DotSP VD GoW FB TG RoD+6 Oegyth:6
phydeaux
VIP
Posts: 339
Joined: Fri Dec 09, 2011 7:40 am
android_version: 5.1 - Lolipop
Location: Gargoyle cavern, blindly hacking mobs to pieces till I find a rols!
Contact:

Re: improve monster movement

Post 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
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: improve monster movement

Post 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.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
phydeaux
VIP
Posts: 339
Joined: Fri Dec 09, 2011 7:40 am
android_version: 5.1 - Lolipop
Location: Gargoyle cavern, blindly hacking mobs to pieces till I find a rols!
Contact:

Re: improve monster movement

Post 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!
User avatar
nyktos
VIP
Posts: 3463
Joined: Wed Sep 14, 2011 5:38 pm
android_version: 7.1 - Nougat
Location: Nor City, Dhayavar

Re: improve monster movement

Post 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)
"Embrace the Shadow"

Image

[Lv: 60] [HP: 175] [AC: 361] [AD: 25-39] [BC: 75]
[Dual Wielding Swords] [Unarmored Fighting]
Post Reply