Jump to content

MMaps Redux


Guest auntieMangos

Recommended Posts

If a creature can't reach a player I think they just switch targets. If they have no other targets, they will get as close as possible and wait in evade mode while still in combat. After a certain amount of time, they will just go back to the spawn location and reset.

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

They don't go directly back to spawn, it starts a ~30-45 second timer. If they can't get to a target in that time, they return to home.

Also for random movement they seem to wander in an area ~2x respawn radius if outdoor, indoor is based on size of corridor they are in.

Is there anyway to hack a temporary random movement gen into the next release, I was attempting it, but kept getting an assertion error.

I did the following and it never calls i_path = new PathInfo(&creature, nx, ny, nz); just goes to i_path->Update(nx, ny, nz); and crashes. I will admit I am still learning c++, so I'm a lil stumped as to why its failing.

   if(!i_path)
       i_path = new PathInfo(&creature, nx, ny, nz);
   else
       i_path->Update(nx, ny, nz);

   i_path->getNextPosition(nx, ny, nz);

   Traveller<Creature> traveller(creature);

   creature.SetOrientation(creature.GetAngle(nx, ny));
   i_destinationHolder.SetDestination(traveller, nx, ny, nz);

Link to comment
Share on other sites

I did the following and it never calls i_path = new PathInfo(&creature, nx, ny, nz); just goes to i_path->Update(nx, ny, nz); and crashes. I will admit I am still learning c++, so I'm a lil stumped as to why its failing.

You probably need to initialize i_path to a null pointer. Look at TargetedMovementGenerator.h, line 43

I think the core implementation is going to get comparatively complicated...

  • * need to handle the different terrain and movement types
    need to check whether or not the creature is swimming/flying (and find the navmesh above/below it), ensure correct behavior if a mob is moved forcefully into terrain it can't move in, etc
    * path calculation should be added to the threat/aggro and target selection code
    From inside a MovementGenerator, there is no way to produce the correct behavior

  1. * requires PathInfo to be moved to somewhere else, either to the Unit itself or a dedicated PathManager class
    * upon initial aggro, a group of mobs should each get their own copy of the first path generated

* need a smarter path following algorithm than current PathInfo::updateNextPosition()

currently, steep slopes cause monsters to walk through the air or ground

* point selection (based on distance and angle to target) should be done after calculating the path

prevent cases where the monsters path takes them through the player

Link to comment
Share on other sites

Thanks, I feel dumb for overlooking it, no more mobs randomly wandering through walls :D

Well some mobs still do

currently, steep slopes cause monsters to walk through the air or ground
and walls :P most visible in Ruins of Silvermoon with max random move set to 2x

Anytime it has to kick back to classic pathfinding mode they still screw up, still this is ALOT better

Thanks for your hard work on mmaps so far.

Link to comment
Share on other sites

Yeah, I'm afraid mmaps might be turning into a complete rewrite of the entire creature movement system just to make it possible to finish work on mmaps itself!

So much in this game is interrelated and interdependent. I'm amazed half the core devs haven't lost their minds and joined a commune in California, devoted to the worship of plaid religious icons. lol

Link to comment
Share on other sites

Yeah, I'm afraid mmaps might be turning into a complete rewrite of the entire creature movement system just to make it possible to finish work on mmaps itself!

So much in this game is interrelated and interdependent. I'm amazed half the core devs haven't lost their minds and joined a commune in California, devoted to the worship of plaid religious icons. lol

I guess thats why Linux went modular and so is the real core used by blizzard....hehe...evil Developers and their mad PMS bombs!

Link to comment
Share on other sites

I pushed the liquid changes.

  • * Liquid is NOT handled for WMOs, so buildings and most instances haven't changed
    * I haven't implemented pathfinding into the aggro/target selection algorithm.
    This means that monsters still default to the old way if there is no complete path to the target.
    However, monsters will go around lava, deep water, and the like if there is a path.
    * There seems to be a memory leak in the generator.
    Not a critical problem, but I would like to spend some time fixing it.
    * I changed the map extractor again (tiny bug fix), so you need to recompile and rerun

if you have some spare CPU cycles please test the generator with different parameters. I didn't have time recently to do exhaustive testing.

Thanks in advance for any bug reports. Going to be on vacation for a week, but I'll check in.

Link to comment
Share on other sites

Hrm, it crashes on Orgrimmar with liquids.

It's the same bug that has happened several times in the past where there is apparently too much mesh data for recast.

I leave in 2 hours, so I suggest you stick with the pre-liquid build. Commit 883c660697483c0edb874cc35382b71eaae78f55 is the last 'safe' one.

I do have ideas on how to go about fixing the problem, but I'm sure not exploring them will be torture for the next week.

Link to comment
Share on other sites

You've got binary in your veins. Might be a "terminal" condition.

Quickly, nurse! I need 200 CCs of Margarita, 4 oz of Coppertone, and 10 lbs of ice....STAT! Now we must hurry and move him to a beach so we can operate. I think I can save this poor soul.

:P

Link to comment
Share on other sites

  • 2 weeks later...

I've actually been back for a few days now, but I'm still catching up on school/work stuff I missed, and preparing for a final exam. Bleh.

I'll get back into the swing of things soon.

First will be updating to latest mangos rev, then fixing my most recent bungling of the generator.

Link to comment
Share on other sites

Have fun at your Exams, I already know you'll pass with flying colors....but just in case it gets too stressfull just remeber A+b=D, Blue isn't just a color, and Billy Really does wear Jeans! and Levis, Wranglers, and Bill!...oppps! I wasn't supposed to tell that!...for the world History class, Yes youe instructor is a Caveman, no thier not a Vegitarian and Mac Arther did invade China...by accident so he claims....I guess thats enough of the Cliff Notes to get you thru...and when your done just tell Vladmir we told you the Beer was on Him!

Link to comment
Share on other sites

i have some crash

with atacking creature 2038 id or using .debug movemap

Revision: 2010-07-12 14:15:02 10180 5d03c5c483d271ff0e9448564fd710eb44f2dcce
Date 15:7:2010. Time 14:8 
//=====================================================
*** Hardware ***
Processor: AMD Athlon(tm) 64 Processor 3000+
Number Of Processors: 1
Physical Memory: 1048048 KB (Available: 81216 KB)
Commit Charge Limit: 2524268 KB

*** Operation System ***
Microsoft Windows XP Professional Service Pack 3 (Version 5.1, Build 2600)

//=====================================================
Exception code: C0000005 ACCESS_VIOLATION
Fault address:  00895E70 01:00494E70 D:\\server\\335\\mangos\\mangosd.exe

Registers:
EAX:00000000
EBX:72C8FB50
ECX:72B0B900
EDX:00000000
ESI:00000000
EDI:00900B70
CS:EIP:001B:00895E70
SS:ESP:0023:0A54646C  EBP:0A546480
DS:0023  ES:0023  FS:003B  GS:0000
Flags:00010297

Call stack:
Address   Frame     Function      SourceFile
00895E70  00000000  PathInfo::getPathPolyByPosition+40
00896B2D  00000000  PathInfo::Update+28D
00710CBB  00000000  TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::_setTargetLocation+28B
007108BC  00000000  TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update+44C
00481C67  00000000  MovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update+17
0047BA0E  00000000  MotionMaster::UpdateMotion+FE
00485066  00000000  Unit::Update+426
004BA0EC  00000000  Creature::Update+75C
004F51EF  00000000  MaNGOS::ObjectUpdater::Visit+6F
004F5172  00000000  VisitorHelper<MaNGOS::ObjectUpdater,Creature>+12
004F49E0  00000000  VisitorHelper<MaNGOS::ObjectUpdater,Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > >+10
004F4513  00000000  VisitorHelper<MaNGOS::ObjectUpdater,GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > >+23
004F3C10  00000000  VisitorHelper<MaNGOS::ObjectUpdater,TypeList<GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > > >+10
004F065F  00000000  Map::Visit<MaNGOS::ObjectUpdater,TypeMapContainer<TypeList<GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > > > >+CF
004EB0A7  00000000  Cell::Visit<MaNGOS::ObjectUpdater,TypeMapContainer<TypeList<GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > > > >+67
004D4E7B  00000000  Map::Update+33B
006B2CC0  00000000  MapManager::Update+120
0063B046  00000000  World::Update+7A6
0045809E  00000000  WorldRunnable::run+8E
00900B89  00000000  ACE_Based::Thread::ThreadTask+19
002A1864  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
78543433  00000000  _endthreadex+44
785434C7  00000000  _endthreadex+D8
7C80B729  00000000  GetModuleFileNameA+1BA

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
7C802542  00000000  WaitForSingleObject+12

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
7C802455  00000000  Sleep+F
00900DA0  00000000  ACE_Based::Thread::Sleep+30
009103A0  00000000  SqlDelayThread::run+50
00900B89  00000000  ACE_Based::Thread::ThreadTask+19
002A1864  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
78543433  00000000  _endthreadex+44
785434C7  00000000  _endthreadex+D8
7C80B729  00000000  GetModuleFileNameA+1BA

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
7C802455  00000000  Sleep+F
00900DA0  00000000  ACE_Based::Thread::Sleep+30
009103A0  00000000  SqlDelayThread::run+50
00900B89  00000000  ACE_Based::Thread::ThreadTask+19
002A1864  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
78543433  00000000  _endthreadex+44
785434C7  00000000  _endthreadex+D8
7C80B729  00000000  GetModuleFileNameA+1BA

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
7C802455  00000000  Sleep+F
00900DA0  00000000  ACE_Based::Thread::Sleep+30
009103A0  00000000  SqlDelayThread::run+50
00900B89  00000000  ACE_Based::Thread::ThreadTask+19
002A1864  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
78543433  00000000  _endthreadex+44
785434C7  00000000  _endthreadex+D8
7C80B729  00000000  GetModuleFileNameA+1BA

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
0A5454A4  00000000  0000:00000000 
FF50D845  FFFFFFFF  0000:00000000 

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
7C873071  00000000  GetConsoleInputWaitHandle+318
7C8731B8  00000000  ReadConsoleA+3B
7C8018B7  00000000  ReadFile+A5
78588ED9  00000000  _wsopen_s+228
7858935D  00000000  _read+C0
7854EFD2  00000000  _filbuf+7D
7854E671  00000000  fgets+109
00412EE8  00000000  CliRunnable::run+B8
00900B89  00000000  ACE_Based::Thread::ThreadTask+19
002A1864  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
78543433  00000000  _endthreadex+44
785434C7  00000000  _endthreadex+D8
7C80B729  00000000  GetModuleFileNameA+1BA

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
71A35FA7  00000000  0001:00004FA7 C:\\WINDOWS\\system32\\MSWSOCK.dll
71A9314F  00000000  select+A7
00264F05  00000000  ?wait_for_multiple_events@?$ACE_Select_Reactor_T@V?$ACE_Reactor_Token_T@VACE_Token@@@@@@MAEHAAVACE_Select_Reactor_Handle_Set@@PAVACE_Time_Value@@@Z+115
FFFFFFFF  FFFFFFFF  0000:00000000 

Call stack:
Address   Frame     Function      SourceFile
7C90E514  00000000  KiFastSystemCallRet+0
71A35FA7  00000000  0001:00004FA7 C:\\WINDOWS\\system32\\MSWSOCK.dll
71A9314F  00000000  select+A7
00264F05  00000000  ?wait_for_multiple_events@?$ACE_Select_Reactor_T@V?$ACE_Reactor_Token_T@VACE_Token@@@@@@MAEHAAVACE_Select_Reactor_Handle_Set@@PAVACE_Time_Value@@@Z+115
FFFFFFFF  FFFFFFFF  0000:00000000 
========================
Local Variables And Parameters

Call stack:
Address   Frame     Function      SourceFile
00895E70  00000000  PathInfo::getPathPolyByPosition+40
   Local  <user defined> 'tile'
   Local  <user defined> 'this'
punting on symbol x
punting on symbol y
punting on symbol z
punting on symbol distance
punting on symbol i

00896B2D  00000000  PathInfo::Update+28D
   Local  <user defined> 'this'
   Local  <user defined> 'destX'
   Local  <user defined> 'destY'
   Local  <user defined> 'destZ'
punting on symbol startOffPath
punting on symbol z
punting on symbol startPoly
punting on symbol endOffPath
punting on symbol endPoly
punting on symbol x
punting on symbol y

00710CBB  00000000  TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::_setTargetLocation+28B
   Local  <user defined> 'this'
   Local  <user defined> 'owner'
punting on symbol z
   Local  <user defined> 'traveller'
punting on symbol x
punting on symbol y

007108BC  00000000  TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update+44C
punting on symbol endx
punting on symbol nexty
punting on symbol dist
punting on symbol endy
punting on symbol nextx
punting on symbol nextz
punting on symbol endz
punting on symbol needNewDest
punting on symbol targetMoved
   Local  <user defined> 'this'
   Local  <user defined> 'owner'
   Local  <user defined> 'time_diff'
   Local  <user defined> 'traveller'

00481C67  00000000  MovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update+17
   Local  <user defined> 'this'
   Local  <user defined> 'u'
   Local  <user defined> 'time_diff'

0047BA0E  00000000  MotionMaster::UpdateMotion+FE
   Local  <user defined> 'this'
punting on symbol diff

00485066  00000000  Unit::Update+426
   Local  <user defined> 'this'
punting on symbol p_time

004BA0EC  00000000  Creature::Update+75C
   Local  <user defined> 'this'
punting on symbol diff

004F51EF  00000000  MaNGOS::ObjectUpdater::Visit+6F
   Local  <user defined> 'iter'
   Local  <user defined> 'this'
   Local  <user defined> 'm'

004F5172  00000000  VisitorHelper<MaNGOS::ObjectUpdater,Creature>+12
   Local  <user defined> 'v'
   Local  <user defined> 'c'

004F49E0  00000000  VisitorHelper<MaNGOS::ObjectUpdater,Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > >+10
   Local  <user defined> 'v'
   Local  <user defined> 'c'

004F4513  00000000  VisitorHelper<MaNGOS::ObjectUpdater,GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > >+23
   Local  <user defined> 'v'
   Local  <user defined> 'c'

004F3C10  00000000  VisitorHelper<MaNGOS::ObjectUpdater,TypeList<GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > > >+10
   Local  <user defined> 'v'
   Local  <user defined> 'c'

004F065F  00000000  Map::Visit<MaNGOS::ObjectUpdater,TypeMapContainer<TypeList<GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > > > >+CF
   Local  <user defined> 'this'
   Local  <user defined> 'cell'
   Local  <user defined> 'visitor'
   Local  <user defined> 'cell_y'
   Local  <user defined> 'x'
   Local  <user defined> 'y'
   Local  <user defined> 'cell_x'

004EB0A7  00000000  Cell::Visit<MaNGOS::ObjectUpdater,TypeMapContainer<TypeList<GameObject,TypeList<Creature,TypeList<DynamicObject,TypeList<Corpse,TypeNull> > > > > >+67
   Local  <user defined> 'this'
   Local  <user defined> 'standing_cell'
   Local  <user defined> 'visitor'
   Local  <user defined> 'm'
   Local  <user defined> 'begin_cell'
punting on symbol district
   Local  <user defined> 'end_cell'

004D4E7B  00000000  Map::Update+33B
   Local  <user defined> 'cell'
   Local  <user defined> 'pair'
punting on symbol cell_id
punting on symbol y
punting on symbol x
   Local  <user defined> 'plr'
   Local  <user defined> 'area'
   Local  <user defined> 'begin_cell'
   Local  <user defined> 'standing_cell'
   Local  <user defined> 'end_cell'
   Local  <user defined> 'this'
   Local  <user defined> 't_diff'
   Local  <user defined> 'updater'
   Local  <user defined> 'world_object_update'
   Local  <user defined> 'grid_object_update'

006B2CC0  00000000  MapManager::Update+120
   Local  <user defined> 'iter'
   Local  <user defined> 'this'
punting on symbol diff

0063B046  00000000  World::Update+7A6
punting on symbol i
   Local  <user defined> 'this'
punting on symbol diff

0045809E  00000000  WorldRunnable::run+8E
punting on symbol diff
   Local  <user defined> 'this'
punting on symbol realCurrTime
punting on symbol realPrevTime
punting on symbol prevSleepTime

00900B89  00000000  ACE_Based::Thread::ThreadTask+19
punting on symbol param
   Local  <user defined> '_task'

002A1864  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74

78543433  00000000  _endthreadex+44

785434C7  00000000  _endthreadex+D8

7C80B729  00000000  GetModuleFileNameA+1BA

========================
Global Variables

and this error message

Creature (Entry: 2038 Guid: 46842) chase to Player Dfgs (Guid: 1)
4127241978's Path Build failed: invalid start or end polygon

Link to comment
Share on other sites

I'm still here. Just busy with school:

  • * writing AI to play Scrabble
    * writing MSIL disassembler/decompiler - not an actual assignment, a class I'm taking on viruses spurred my interest
    * stupid papers

I promise this project hasn't died!

Good luck on the AI, best if you write it in ProLog though....but don't lack off on the Logic Engine because it could be usefull for other things as well...

The ASM project...thats a great Idea but also look at IDA Pro and they do give it away to students free and it has a lot of compatabilities...I know I use it almost daily for what I do in RL.

and stupid papers are great because in RL if you get into any worthwile job your going to need this skill because there's always a Stupid person who will want to read Stupid Papers....lol

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use