Author Topic: Reducing numbers of memory allocations in game execution  (Read 14611 times)

Volutar

  • Guest
Re: Reducing numbers of memory allocations in game execution
« Reply #15 on: November 09, 2012, 08:28:06 am »
huh? reply #1.

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: Reducing numbers of memory allocations in game execution
« Reply #16 on: November 09, 2012, 08:35:08 am »
You're right! That's an implicit statement. :)
Then a correction: "I did not claim that pathfinding is part of the OpenXcom-AI." :)

Offline karvanit

  • Captain
  • ***
  • Posts: 94
    • View Profile
Re: Reducing numbers of memory allocations in game execution
« Reply #17 on: November 09, 2012, 10:14:55 am »
The point is - what creates this drop - I doubt it's pathfinding, because there's no need in pathfinding for xcom AI at all.

Of cource it is used. Every time anything wants to from point A to point B pathfinding is used, that's what creates the path (intermediate positions) that any moving unit uses.

Volutar

  • Guest
Re: Reducing numbers of memory allocations in game execution
« Reply #18 on: November 09, 2012, 11:38:20 am »
karviant, where did you get that from? pathfinder is needed only in final stage, when acting, not when estimating "what to do next".

Offline karvanit

  • Captain
  • ***
  • Posts: 94
    • View Profile
Re: Reducing numbers of memory allocations in game execution
« Reply #19 on: November 09, 2012, 05:06:21 pm »
Ok, my bad. It is used in the BattlescapeState code, but only at the end.
The visibility calculations are O(N) though, in the number of Battleunits, and they are run every step of every moving unit.

Offline grrussel

  • Captain
  • ***
  • Posts: 72
    • View Profile
Re: Reducing numbers of memory allocations in game execution
« Reply #20 on: November 10, 2012, 01:44:03 am »
A new memory allocation reduction patch.