#### Archived

This topic is now archived and is closed to further replies.

# Pathfinding in 2D SCUMM Like Graphic Adventures

This topic is 5766 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Doing some research i found that the way the so loved Lucas Arts SCUMM Engine (well actually called SPUTM, SCUMM was the scripting language), handled the character walking, was using WALKING BOXES (box or trapeziums), and a BOX MATRIX, to have some control on where the character could or could not walk. My question is, is there another aproach? Like using a bitmap with different pixels colors representing depth or something like that, and the using an algorithm such as A* to find out the shortest path? Any kind of documentation regarding a suitable implementation for 2D Graphic Adventures, will be more than welcome. Thanks in advance, Alan // PS: Here''s an extract from some documentation about the LFL format (the level format used for lucas arts adventures) ------------------------------------------------------------- BOX MATRIX The box matrix tells the interpreter how to make an actor walk between boxes. For example, if two boxes are reasonably close, but there is a fence in the way that should prevent them from walking that way, then the actor needs to walk around the fence when the box on the other side of the fence is clicked on. The left side of the matrix is the ''from'' box and the top of the matrix is the ''to'' box. For example, To F 00 01 01 01 r 00 01 02 02 o 01 01 02 03 m 02 02 02 03 To walk from box 3 to box 0, you have to firstly walk through box 2. To then walk from box 2 to box 0, you have to walk through box 1, and finally to walk from box 1 to box 0, you simply have to walk straight to box 0. Now, matrices of the pattern above are for rooms that have there boxes nicely joined in a row like so: +------+ +------------+ +------+ +------+ | | 0 | 1 | 2 | 3 | +------+------+------+------------+ However, a lot of rooms have a fairly complex walking space which gives rise to larger matrices with more complex patterns. +--------+ | 4 | +-+----+-+ +-------+ | 2 | +-----------+ | 0 +---+----+---+ 3 | | | 1 | | +-------+------------+-----------+ For example, the layout shown above would produce a matrix as follows: 00 01 01 01 01 00 01 02 03 02 01 01 02 01 04 01 01 01 03 01 02 02 02 02 04 The data above would be stored in the LFL file as: 00 01 01 01 01 00 01 02 03 02 01 01 02 01 04 01 01 01 03 01 02 02 02 02 04

##### Share on other sites
I implemented this method with a) some hacking of the SCUMM interpreter (don''t tell their legal department) but most of all

http://2dnow.zenzer.net/viewtopic.php?t=23

this document describes how you would do it.

2DNow - Specializing in yesterday''s technology today!

##### Share on other sites
Thanks a lot, really helps

1. 1
Rutin
22
2. 2
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633308
• Total Posts
3011294
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!