Performance issues

Started by DiegoHolt, Thu 29/05/2025 19:56:03

Previous topic - Next topic

DiegoHolt

Hi, community

I have some doubts about performance. My game is currently about 2GB in size, and operates in 1280x800, 32bit. I've always ran it in my computer without any speed problems (amd fx 6300 six core, 8GB ram, 2GB video - and that's an old computer by today's standards). In recent days I've tried it in my brother's computer (which is a modern gamer pc) and I've noticed some issues (lags, or slow moments when dealing with big graphics or animations). Have in mind that my brother's computer runs with no problems games such as GTA V, Red Dead 2, Last of Us 2, etc.

What could be causing this?

Besides that, (unrelated, or maybe not so much) I was also wondering if it is convenient to use as few views as possible or if that's irrelevant. In my case, I've started the game creating individual views for each character (even when some characters only have 1 or 2 views). Now, in the late stages, I'm using one same view to fit other's characters (or background) animations

That's it, hope it isn't too long for you to read.

As always, thanks for your time  :)

Crimson Wizard

#1
Quote from: DiegoHolt on Thu 29/05/2025 19:56:03Besides that, (unrelated, or maybe not so much) I was also wondering if it is convenient to use as few views as possible or if that's irrelevant. In my case, I've started the game creating individual views for each character (even when some characters only have 1 or 2 views). Now, in the late stages, I'm using one same view to fit other's characters (or background) animations

Number of views does not affect performance in any noteable way. You may have 1 view per character, or split its animations into 1000 views, the result will be about same. View is simply a logical unit used to organize a list of sprites together.

What affects performance first of all:

1. Game resolution and sprite resolutions (sprite dimensions).
2. Amount of objects displayed at the same time.
3. Amount of animations run at the same time.
4. Rate of animation (how many frames per second).
5. Sizes of sprite cache and texture cache (latter since 3.6.1), which are set in game config. Small cache sizes means that sprites have to be reloaded and recreated often.
6. Lots of "raw drawing", creating Dynamic Sprites often and using Drawing Surfaces to draw stuff anywhere.
7. Complex scripts with lots of operations per game frame.
Obviously, if scripts are written in a suboptimal way, then they may be slower than could have been.

Also, different versions of AGS have different performance. For example, 3.6.1 had a significant boost to both script and graphics efficiency compared to previous versions.

Each situation should be analyzed separately, and solution will depend on the case and what's causing the performance issue.

SMF spam blocked by CleanTalk