Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ozwalled on Wed 10/09/2003 02:06:05

Title: Background max size?
Post by: Ozwalled on Wed 10/09/2003 02:06:05
I tried importing a fairly large background, and got an error when I tried testing it.

Something along the lines of:

"your're using ACI version 2.52.455"
"Global Script Line 32 Error: room too tall for pathfinder"

I figure the room I'm using must be too large. What's the maximum size a room/ background can be in AGS?
Title: Re:Background max size?
Post by: Scummbuddy on Wed 10/09/2003 04:45:05
what are the dimensions of yours?
Title: Re:Background max size?
Post by: Ozwalled on Wed 10/09/2003 07:44:40
Big. It's 3794 x 3366 pixels. If it makes a difference, that was just a plain, flat room (all walkable area, nothing added -- I was just testing...).

In this instance, it's not a big deal, really, beacuse I was able to logically break the one room down into two rooms. But for future reference, it'd be nice to know the size limitations (provided that's not too much trouble).
Title: Re:Background max size?
Post by: Scorpiorus on Thu 11/09/2003 21:16:05
Quote"Global Script Line 32 Error: room too tall for pathfinder"
Hello,
I think it's not a background size limitation. Pathfinder is a special subprogram in AGS, calculating the path, the character walks on. You drew too large walkable area, it just can't handle it. I guess line 32 is a ProcessClick() function (or MoveCharacter() maybe).
Anyway, since you want him to be able to move around the whole room, just erase the walkable area and use MoveCharacterDirect() script function instead of ProcessClick(MODE_WALK,..).

-Cheers
Title: Re:Background max size?
Post by: Privateer Puddin' on Thu 11/09/2003 21:17:21
im sure you really dont need a room of that size?
Title: Re:Background max size?
Post by: Ozwalled on Fri 12/09/2003 03:45:03
No, I don't *NEED* a room that big, but I do want one. Actually, I want one even BIGGER than that! Mwa ha ha!...

*ahem*

In case you're wondering, I was using it as an RPG-like overhead map of a fairly biggish area, with a lot of territory to cover. I figured it'd be nicer to have a large-ish area to walk around in seamlessly than a bunch of small self-contained areas...

As for why I wanted it all to be walkable,  I didn't actually -- I just plaster a huge walkable space on for testing purposes... I now realize that may have been a mistake.

I'll try the same map size again on the weekened with less walkable area, though, to see if that works. I'll be sure to let you know what happens.
Title: Re:Background max size?
Post by: Pumaman on Fri 12/09/2003 20:43:54
The maximum room height is 1400 pixels (at 320x200 resolution - you could have a 2800-tall 640x400 room)
Title: Re:Background max size?
Post by: Ozwalled on Sat 13/09/2003 04:18:49
Thanks!  ;D

...but does the amount of walkable area fit into the problem, then, or not?

(and not that it matters much, but why is there a limitation in this department, if anyone happens to know... and why in height, but not width? [for the capability of making side-scrollers?...] Just wondering.)
Title: Re:Background max size?
Post by: Pumaman on Sat 13/09/2003 13:00:27
The amount of walkable area doesn't matter. However, if you have a large amount of walkable area it could become quite slow at calculating paths when you click to walk somewhere.

The limit on height is just due to the way the pathfinder works internally.
Title: Re:Background max size?
Post by: Scorpiorus on Sat 13/09/2003 13:51:52
So there is no actual limit on width, right? :P
Title: Re:Background max size?
Post by: Pumaman on Sun 14/09/2003 11:16:06
No fixed limit, but that's not a challenge :P

I'm sure you'd be able to break it if you imported a 15000x1400 room :P
Title: Re:Background max size?
Post by: Scorpiorus on Sun 14/09/2003 14:00:30
Hehe, once I already tried to draw such a backgound, and after all was even unable to close MSPaint as there was no free memory left. Besides, it'd be a real pain to draw walkable areas and stuff with an image like that.
Title: Re:Background max size?
Post by: Cerulean on Tue 16/09/2003 04:12:52
If you want to walk around a huge area, I would suggest using a room-looping script that works like the one that comes in the demo, but vertically as well as horizontally. Make a basic tilable background, use variables to keep track of what sector the character is in, and turn objects on and off accordingly. You can make a theoretically infinite playfield this way. Of course, you would have to keep everything within the object limit for one room, but that's a challenge you would have faced with one giant room anyway.