Page 1 of 1

vehicles 'shaking' when idle

Posted: 09 Jan 2011, 00:47
by Wombat
i mean, when engine works, idle vehicle starts to shake a bit, was wondering how 500 units with such animation affect game performence.

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 00:55
by bobthedinosaur
I'd first suggest, cleaning up what you are trying to say so your message isn't as confusing.

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 00:59
by Wombat
arf, i mean animation. most vehicles in rts games got small animation that makes them tremble (better word?) when idle. i want to know how 500 of such units affect games performence.

cool ?

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 01:08
by smoth
Not too bad really. Grab gundam

/cheat

/give 100 zakutank

watch idle animations.

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 01:09
by smoth
I find that giving is smaller clusters seems to not tank spring as much(don't ask me why)

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 05:17
by zwzsg
Because then they're not in sync, so the load is distributed, and you feel a global slowdown instead of periodic hiccups.

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 05:37
by knorke
i guess you could add some random sleep in create to make the animations unsync

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 05:37
by smoth
but the units are still in sync.

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 06:03
by bobthedinosaur
i think he means the spawning not the idle code?

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 06:06
by smoth
correct. spawning

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 06:53
by knorke
i mean something like

script.create ()
sleep (random (100, 1000)
startthread (idleanimation)

Re: vehicles 'shaking' when idle

Posted: 09 Jan 2011, 07:10
by smoth
all of them are created at the same time so say you do a startscript, it's conditions are on that cyle. The timer just means it skips animating every so many of them every so often but it still has to check the timer for all simultaneous units.

Again the scripts are not that taxing, I am just saying that the fastest way to test it (spawning say several hundred units) can create an unnatural spike as all those units spawned in teh same cycle as opposed to spread out like z said.