It is quite obvious that gm has some performance issues, and the performance does not scale well from my experience. It ether lags or it doesn't. 3d is one of the slowest aspects to gm. I don't want this topic to be specific to 3d, but I do foresee a large part of the ideas relating to 3d. Some other areas that gm lags are: (Post any items you would like to see added to the list)
- 3d
- particles
- physics
- path finding, and other algorithms
- large resources
One method of improving speed of those items is to just get rid of it. This is only really practical with particles. A lot of the games I have played have options to turn off particles to speed up the gameplay. As particles are purely graphical, there should be no interference with the game by disabling particles, but some effects like blood are eliminated, subtracting from the overall experience.
You obviously can't disable 3d, but you could use pre-canned animations for physics, but then there is the issue of increased memory usage, which could have worse affects on the performance than the physics.
Another issue with gm, is that their is not much significant benefit from simplified algorithms. Take this brute-force method for checking prime numbers:
for(i=1;i<sqrt(num);i+=1){
if (num div i) = num/i
return 0}
return 1This is far from the most optimum method, yet it is not much slower than:
if (argument0 mod 2 == 0) {
return 2;
}
var add,i,lim;
add[1] = 2;
add[3] = 4;
add[7] = 2;
add[9] = 2;
lim = sqrt(argument0);
for (i = 3; i < lim; i += add[i mod 10]) {
if (argument0 mod i == 0) {
return i;
}
}
return 1;(I think this was provided by Yourself in an old topic)The speed of the different methods is hardly noticeable in any real world application.
Sometimes, the performance settings uses algorithms that are faster, but less accurate, such as the application of path finding. So at high performance it uses something like mp_potential_step(), while at quality, it will use mp_potential_path(). The former will get you a good enough ruff estimate, while the latter will find close to the most optimal method. I can't find any other examples of algorithms that have a settable level of precision.
Physics would probably be the most complicated to implement. You could skip on some of the unnecessary calculations, but leaving the major ones that have a noticeable effect, like gravity.
So what methods do you use for varying performance, or do you think that it is a waste of time because of gm's inherent speed issues?
let the discussion begin.
-acrog2












