ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > Scumm findPathTowrads algorithm
Scumm findPathTowrads algorithm
  Author    Thread Reply to topic
limulo



Joined: 05 Jul 2017
Posts: 1
Scumm findPathTowrads algorithm 

Hi everyone,

in the last couple of days I've been examining the source code of the scumm engine implementation and I'd like to ask a question about a specific algorithm. The code I'm stucked on is the function `findPathTowards` at line 800 of `boxes.cpp` file.

This function seems to examine the 4 coordinates of 2 adjacent boxes. It then compares the coordinates each time a new clockwise rotation of their names happens.

In order to go deeper into the subject, I'm actually curious to know if this algorithm has a name or where it comes from.
Thank you for your support

bye
limulo

 Reply with quote  
Post Wed Jul 05, 2017 3:45 pm 
 View user's profile Send private message Visit poster's website
digitall
ScummVM Developer


Joined: 02 Aug 2012
Posts: 817
 

I am no expert on SCUMM engine internals, but see this:
https://gamedev.stackexchange.com/questions/21201/is-precomputed-pathfinding-still-relevant

I think this is much simpler and less resource hungry compared to the more general algorithms for 2D pathfinding such as A*, but required manual / precomputed walkbox to work... but consider that these were intended for 286 PC era machines and the constraints of RAM and CPU time required this:
https://en.wikipedia.org/wiki/Pathfinding

 Reply with quote  
Post Thu Jul 06, 2017 12:26 am 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge