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?
what are the dimensions of yours?
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).
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
im sure you really dont need a room of that size?
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.
The maximum room height is 1400 pixels (at 320x200 resolution - you could have a 2800-tall 640x400 room)
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.)
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.
So there is no actual limit on width, right? :P
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
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.
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.