Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Edward Becket on Tue 22/07/2003 08:17:45

Title: Limit of objects in room
Post by: Edward Becket on Tue 22/07/2003 08:17:45
I have a problem. My rooms are very long and large and so they contain many object... but... the AGS support only 10 objects per room.
I read in the manual that is possible for the developer to change this limits... can i have an help in this? Please...
I'm trying to put all me in my adventure... I NEED more objects.
Title: Re:Limit of objects in room
Post by: Timosity on Tue 22/07/2003 08:41:54
I think the limit from atleast ver 2.55 is 15 objects, which is still not much, but I'm not sure if there are plans for more.

more objects slow the game down on slower machines, but it would be handy to have more for some situations.

but as for now you will have to make do with what's available.
Title: Re:Limit of objects in room
Post by: Synthetique on Tue 22/07/2003 09:13:21
Why can't the engine just temporary remove all objects that is not visible on screen? Or does it allready?
And how slow is the "slower" machines?
Title: Re:Limit of objects in room
Post by: Scummbuddy on Tue 22/07/2003 18:41:57
Try using characters as objects too.
Title: Re:Limit of objects in room
Post by: Edward Becket on Tue 22/07/2003 19:19:07
I'm absolutely not an expert of programming, but...
in the manual we can read that the developer say "If there is same problems whit those limits call me and i probably can resolve it". Now... i think that this problem can easly modifid by him simply removing any limit but mantaining the suggest to remain in that ones... to have a fast game... so we can choose if made a slow (but full of objects) or a fast one(but poor of objs).
This can be considered for the next version... what have you to say?
Title: Re:Limit of objects in room
Post by: SSH on Tue 22/07/2003 19:28:08
There are some things to remember about objects:

1. Is it really necessary for this thing to be an object? Does it move or does it need to be turned on/off at some point? If not, use a hotspot.
2. If you are, for example, opening a door, why does it need two objects? Use one and change the view/sprite. You can test which view is used in your interaction code and adjust accordingly.
3. Characters can be used as objects (as Scummbuddy said)
4. Overlays and background swapping can also be used to work around the object limit.

Why not give us an example of a specific room that you have problems with and the list of objects and what you need those objects to do and maybe we can help you work around it?
Title: Re:Limit of objects in room
Post by: Scummbuddy on Tue 22/07/2003 19:29:24
Try doing what I said.
Title: Re:Limit of objects in room
Post by: Edward Becket on Tue 22/07/2003 21:09:02
Listen... i know that i can use all those expedients... but i can ensure you that i NEED more object. Infact i encounter the problem of the limit in 2 occasions:
1)when the room is very long and so the "probability" of object is higher;
2) i need to put many objects that can be acquired by the player as inventory objs.
Title: Re:Limit of objects in room
Post by: MachineElf on Tue 22/07/2003 21:22:54
But an inventory object doesn't have to be a room object, you know that, right?
I almost can't imagine a situation where you need more objects available than the maximum number of objects +max num of characters + max num of overlays and every other way of making things that could work as objects. If you used all of these the game would probably be annoyingly slow on even a decent computer.
What is your current number of objects in a single room?
Title: Re:Limit of objects in room
Post by: Scummbuddy on Tue 22/07/2003 21:23:07
Yes, but you can fix both of those just by using character slots that look like objects, and then use the interacting code to give you inventory items.  just a workaround
Title: Re:Limit of objects in room
Post by: Edward Becket on Wed 23/07/2003 07:49:58
Ok, the expedient of using a char like an object can be useful.
However, when you said:

«I almost can't imagine a situation where you need more objects available than the maximum number of objects...»

think that if you make a openable wardrobe, it need 1 obj for every door and an obj for every think that you can find inside it... this is only an example.
Title: Re:Limit of objects in room
Post by: Minimi on Wed 23/07/2003 10:45:55
or you can only make the wardrobe, and when you interact with it, its locked :p
Title: Re:Limit of objects in room
Post by: SSH on Wed 23/07/2003 11:40:04
Quote from: Edward Becket on Wed 23/07/2003 07:49:58
think that if you make a openable wardrobe, it need 1 obj for every door

You didn't read my post then: use SetObjectGraphic or SetObjectView to have different pics for the same object open/closed. And if you have two separately openable doors to the wardrobe, why? That will just irritate the user having to do the "open" action twice.

So, exactly how many objects do you need, and what are they? Why not post a list then we can give SPECIFIC advice? Pick a room that you've got the problem with and tell us. If you're worried about spoliers, use the
Spoiler
code, or message me


[close]
Title: Re:Limit of objects in room
Post by: TerranRich on Wed 23/07/2003 13:15:13
For the final time,  Edward, unless these objects ALL have to disappear or move around, then use hotspots. For example, if the player can only take two of the 15 shirts in the wardrobe, then make two of them objects and the rest hostpots. Better yet, ,to save on hotspots, make one large hotspots and use scripting to check where the mouse was (speecifically, the y-position) to see which shirt the player clicked on.
Title: Re:Limit of objects in room
Post by: Edward Becket on Wed 23/07/2003 16:07:50
Quote from: SSH on Wed 23/07/2003 11:40:04
You didn't read my post then:
Sure, but you don't read mine! >: ( and who are you to give me your warning?
Quote from: SSH on Wed 23/07/2003 11:40:04
...use SetObjectGraphic or SetObjectView to have different pics for the same object open/closed.
Infact you don't read my posts... have i said that used two different objs for open closed doors? No... infact i used the ChangeObjectGraphic function.
Quote from: SSH on Wed 23/07/2003 11:40:04
And if you have two separately openable doors to the wardrobe, why? That will just irritate the user having to do the "open" action twice.
>: ( But it is my or your adventure game? If i chose that the character can open 1000 doors in a room peraphs i think that this can be interesting or funny in the contest of my adventure... who ave request your opinion about that?

Thanks however... and if you have others warnings for me please don't answer this post.


Sorry my english...


Title: Re:Limit of objects in room
Post by: SSH on Wed 23/07/2003 16:33:34
Quote from: Edward Becket on Wed 23/07/2003 07:49:58
think that if you make a openable wardrobe, it need 1 obj for every door

Given that, as you say yourself, your English isn't great this could be interpreted as 1 object for each frame of the door. There's no need to get angry over a misinterpretation. From my experience (and my wife is Spanish, so I should know), when there is a language barrier its best to assume that the otehr person misunderstood rather than get angry.

And as for the comment on one door or two for the wardrobe, I'm just trying to help you get your game written. You can wait around for CJ to upgrade your particular issue if you like: but there's no guarantee on when this will happen, or you you can think of creative ways around the problem. I was just trying to help!

For example, how about having a close-up of the wardrobe when you get close to it? That way it's like a new room and you have a new set of 15 objects to play with.

You may be able to recycle objects in the same screen with some clever scripting: when they are out of sight, you can change their graphic and they become somehting else, using a variabel to keep track of what they really are. Or you can have a books object, detect the x,y mouse position of clicks to see which book and have a set of graphics with all combinations of books taken out and swithc between them. This would let you have books falling over on the shelf too as happens in real life.

Think laterally and you can usually work around problems like this.
Title: Re:Limit of objects in room
Post by: Edward Becket on Wed 23/07/2003 20:29:45
Sorry... i'm a stupid. Your ideas are all greats and i want to tell you thanks (my enlglish is so horrifying  :'().
Thanks for all!
Title: Re:Limit of objects in room
Post by: TerranRich on Thu 24/07/2003 01:25:45
Nah, you're not stupid. SSH is stupid (j/k! :P).

Seriously though, sometimes you just need some clever thinking and ideas to work around the limitations in AGS. Or, as SSH said, you could wait around until CJ felt it was necessary to increas the limits. :)
Title: Re:Limit of objects in room
Post by: Pumaman on Fri 25/07/2003 13:42:13
The limit is currently 15 objects.

QuoteYes, but you can fix both of those just by using character slots that look like objects, and then use the interacting code to give you inventory items. just a workaround

That defeats the whole point of objects, and if people end up doing that I'd may as well increase the limit to 100 objects.

The idea is to make people think about using hotspots and other features.

However, I accept that in some cases more than 15 objects are needed in a room, so I'll add it to my list to increase it.
Title: Re:Limit of objects in room
Post by: Timosity on Fri 25/07/2003 15:41:48
Just as a small example,

(I ended up working around it by increasing the sizes of my sprites which probably makes the game larger [especially that the 1 room uses 365 frames of animation {including larger images than necesary if I could have had more objects}])

The scene ended up using 13 objects, but could have used way less sprites if I could have used duplicate sprites.

Just to explain, just say there are like 11 buildings, and you have to animate them being built,

each level of each type of building is exactly the same animation. If there were more objects you could use the same animation sequence and just put them on top of each other.

But what I've done is just make more frames of animation eg level 1 then a static level 1 with level 2 animating etc up to level 7 or 8 depending on the building.

Anyway, the animation sequence works perfectly and I still had 2 objects to spare (365 sprites later) I had myself a nice intro sequence. A lot of extra effort for a minute or two of visual time [if that] but It had a level of satisfaction to know I could work around the problem on my own.

you could probably use overlays too or something but do they recognise walkbehinds?? (it doesn't matter though, cause I've done it now and it works)

Also Thanks CJ for putting it on your to do list, I'm sure it will come in handy for some.
Title: Re:Limit of objects in room
Post by: Synthetique on Sat 26/07/2003 04:15:11
I like objects! Give me 100 object slots!