Engine limits

From Adventure Game Studio | Wiki
Jump to: navigation, search

NB Some of these limits may be out of date in the latest AGS versions or betas, please check the most recent help files, change logs and tech forums threads for details

The AGS engine has a number of limitations, many of which can be extended in the next release of AGS if you ask for them to be in the Technical Forum and can give an example of actually needing them extended.

Many of these limits are listed in the help file, but some are not:

  • To ensure the pathfinder always works, your walkable areas should always be at least 3 pixels wide
  • You can have about 150 lines of text in a listbox
  • AGS only allows 50 characters and objects on the screen at the same time
  • There's no hard limit, but a sprite cannot be taller than the screen resolution
  • Objects are placed using low res co-ordinates (320x200, 320x240 and 400x300), so at high res modes (640x400, 640x480 and 800x600) you can only place them on even pixels
  • You should be able to have up to 15 parameters to a function. [1]
  • The "Play music on room load" textbox in the Room editor only accepts music numbers from 1-120
  • You'll get an error if you define over 4 KB's worth of variables inside a function. [2]
  • AGS currently allows the call stack to be 50 levels deep, so if you have a recursive function that calls itself more often you'll get the "call stack overflow" error. Additionally, the stack size is set at 4 KB so if the recursive function declares a lot of local variables you could reach the limit that way, too. [3]
  • There is a total overall limit on the number of functions that can be exported by all plugins added together, which in theory it would be possible for a single plugin to exceed. It's in the region of a couple of hundred though, so it shouldn't be an issue. It wouldn't be too difficult to increase, if the need arose. [4]


AGS 3.1

The manual of AGS 3.1 lists these maximums. The following may invalidate some points made above, so please remember the bolded warning at the top of the page.

      40  objects per room
     100  local messages per room (excluding script)
     299  state-saving rooms per game
     300  inventory items
   30000  imported sprites
      30  controls on each GUI
     500  dialog topics
    3000  dialog-script messages
      30  options per topic
      20  screen overlays at a time
     500  script GlobalInts (not including your own variables)
      50  script GlobalStrings (not including your own variables)
       5  background frames per room
      20  mouse cursors
unlimited characters
unlimited views
unlimited GUIs
unlimited loops per view
unlimited frames per loop