A game that actually hits the limits

Started by SSH, Wed 23/07/2008 22:52:26

Previous topic - Next topic

SSH

Many n00bs say "oh, i need higher limits" for games that never materialise, but QFG2's stats were postted by Erpy on the agdi forums the other day:

Quote
Total sprites: 12859/30000
Sprite folders: 163/500
Total views: 428/600
Total GUI's: 50/50
GUI buttons: 226
GUI labels: 156
GUI sliders: 9
GUI textboxes: 13
GUI listboxes: 6
Inventory items: 103/300
Characters: 119/300
Dialog topics: 376/500
Dialog messages: 924/3000
12

LeChuck

The only two things I find a little bothersome is the GUI limit, as I've had to manipulate several GUIs for completely different needs, and the views limit. The views limit is annoying but easier to overcome, and is rarely to cause conflict. 500 views total in 2.72 ain't it?

But nearly 13000 sprites? JC... I'm a little over 3000 sprites deep and I have trouble navigating the sprite manager...

matt

wow. thats weird. the only limit i am anoyed about is the one for the controls on a gui. and the gui numbers. thats a pain.

what?

SSH

These limits are of course mainly gone in AGS 3.0+, you know...
12

JpSoft

30 controls per GUI and 40 objects per room are the only limits i had troubles with in the past. Also, i believe that must not be very difficult to allow AGS to understand that if you type PlaySound("footsteps"); it search for footsteps.ogg, footsteps.MP3... and so long, to give a more intuitive manage of the sound resources in the game.

Jp

Ali

What if I wanted to make a game with 301 individual grains of rice in the character's inventory, each with its own unique sprite? What then?

Thanks to these crazy limits, 'Rice Quest: Quest for Some Rice' can never be.

Akatosh

Well, you could make the first grain "item" a GUI button and an own cursor mode...  :P

Pumaman

Yes, most of those limits are gone in AGS 3. I'd agree that probably the next one that needs fixing is the 30 controls per GUI, which I will investigate for a future version.

zabnat

Actually while I was making my MAGS game I hit the limit of 15 walkbehinds and 49 hotspots in a room. These weren't really a problem, I just had to adapt to them. Like the hotspots were of same name you I could combine them and then make a room coordinates check in the interaction functions to make them behave differently.

.M.M.

My game hits the limit of if/else for one function, dialog request. I´ve got  about 100 of them and I cannot start my game until I delete some of them. Is there any workaround how to solve that?

SSH

Make dialog request call some other sub-functions?
12

Lt. Smash

or Chris could add the switch command. One 'switch' could replace all of these 100 if/else.

DoorKnobHandle

Quote from: Lt. Smash on Thu 31/07/2008 17:42:05
or Chris could add the switch command. One 'switch' could replace all of these 100 if/else.

Then you get 100 case/breaks.

.M.M.

Quote from: SSH on Thu 31/07/2008 16:54:56
Make dialog request call some other sub-functions?
Yes, but still: I am in about 50% of my game so with sub-functions I can have maximally 100 dialog_request parts... And it is still too few... :'(
Maybe I just didnt get what have you written...

Khris

Code: ags
function d_r_A(int p) {
  if (p==1) {
    ..
  }
  if (p==2) {
    ..
  }
  ...
  if (p==50) {
    ...
  }
}

function d_r_B(int p) {
  if (p==51) {
    ..
  }
  if (p==52) {
    ..
  }
  ...
  if (p==100) {
    ...
  }
}

...

function dialog_request(int p) {
  if (p<=50) d_r_A(p);
  else if (p<=100) d_r_B(p);
  else if (p<=150) d_r_C(p);
  ...
}


It's hard to believe though that somebody really needs that much seperate run-script X's.
What are you using them for? Maybe there's a way to simplify things.

alexhans

Can´t you make some standard GUIs???

One thing I did in a test game was have a function to completely change a the appearence of a GUI, changing buttons color,text, position, disabling views of sliders, etc.

You may Optimize it a bit if you are Tidy...
Never let your sense of morals prevent you from doing what is right.

paolo

#16
My solution would be the same as KhrisMUC's, except I'd put a return in at the end of each block to avoid doing unnecessary tests:

Code: ags

if (...)
{
    //blah
    return;
}
else if (...)
{
    //blah
    return;
}
//etc


SupSuper

Actually the return's aren't necessary since you're using an if-else chain there, which will already skip any other tests once one condition is met.
Programmer looking for work

Dualnames

Quote from: JpSoft on Thu 24/07/2008 10:58:42
30 controls per GUI and 40 objects per room are the only limits i had troubles with in the past. Also, i believe that must not be very difficult to allow AGS to understand that if you type PlaySound("footsteps"); it search for footsteps.ogg, footsteps.MP3... and so long, to give a more intuitive manage of the sound resources in the game.

Jp

Well, there's an fmod plugin that allows you to use script names for music files.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Radiant

Quote from: KhrisMUC on Thu 31/07/2008 20:37:18
It's hard to believe though that somebody really needs that much seperate run-script X's.
What are you using them for? Maybe there's a way to simplify things.

An optimized Switch() statement, perhaps. I'd actually be interested in learning how to optimize lots 'n lots of sequential ifs in AGS.

SMF spam blocked by CleanTalk