IPB

Welcome Guest ( Log In | Register )


> Production Anim Slowdown Bug
Bittah Commander
post Aug 8 2009, 05:20 PM
Post #1


Forum Administrator
Group Icon

Group: Administrators
Posts: 1,340
Joined: 1-October 06
From: The Netherlands
Member No.: 5
Alliance: GDI
Favorite game: Tiberian Sun



For many players the production animation (gclock2.shp) causes the game to slow down when you build something cheap (apparently for some people this even slows the game down to an unbearable frame rate). I just ran a quick test and gave the clock animation fewer frames (17 instead of 55); as I expected it now doesn't slow the game at all anymore while playing on the 'Faster' gamespeed (gamespeed 5) and when playing with the fastest gamespeed, it only slowed the game down to about the rate of gamespeed 5 for a very short time (meaning this wouldn't be noticeable online).

While this could be a "sort-of fix", it'll obvoiusly look a bit odd when building more expensive things... So I was wondering whether it'd either be possible to find a way to keep the normal gclock2.shp anim from lagging the game or make it somehow drop frames when building cheaper buildings.


--------------------
Go to the top of the page
 
: | +Quote Post
 
Start new topic
Replies
Bittah Commander
post Aug 10 2009, 07:52 PM
Post #2


Forum Administrator
Group Icon

Group: Administrators
Posts: 1,340
Joined: 1-October 06
From: The Netherlands
Member No.: 5
Alliance: GDI
Favorite game: Tiberian Sun



Seems VK is right... Darken.shp really is the main cause for the slowdown, although there is still a slight slowdown even when darken.shp has been made completely transparant (filled up with color#0)...
Apparnetly the gclock2.shp anim has a fixed number of frames and removing some frames just make it play shorter, but whatever is being produced will still be building a little while after the gclock2.shp anim has stopped playing (so that obviously isn't much of a fix after all).
I just tried modifying the darken.shp anim however and found that the fewer visible pixels it has, the less/shorter the slowdown will be.

For me the slowdown is only noticable when playing on gamespeed 6 offline however, so I personally don't require a fix for this. I attached an Eache02.mix file with a darken.shp file inside for whoever does experience the problem more severely (darken.shp now just looks like a small X in the middle and a a border against the edge of the cameos). If this still doesn't get the game to run normally when building stuff on gamespeed 5 (although it should at least improve it), you can try making the anim entirely black instead.
Attached File(s)
Attached File  Ecache02.zip ( 327bytes ) Number of downloads: 59
 


--------------------
Go to the top of the page
 
: | +Quote Post
Rampastring
post Aug 11 2009, 07:39 AM
Post #3


Tick Tank
Group Icon

Group: Members
Posts: 690
Joined: 4-June 07
From: Finland
Member No.: 957
Alliance: Nod
Favorite game: Tiberian Sun



Thanks Bittah.. fixed the problem entirely for me cool.gif

Earlier the game always dropped from 60 FPS (gamespeed 5, I tested with -MPDEBUG) to 20 FPS when building cheap buildings like pavement.. Now it doesn't affect at all, stays at 60 all the time (with 1280x1024).

Also, logically, if I run at a resolution lower than 1024x768, the slowdown is unnoticable (I quess that darken.shp doesn't get drawn on so many cameos - less slowdown).

This post has been edited by ^Rampastein: Aug 11 2009, 07:40 AM


--------------------
Go to the top of the page
 
: | +Quote Post
Lin Kuei Ominae
post Aug 11 2009, 09:29 AM
Post #4


Stealth Tank
Group Icon

Group: Members
Posts: 1,065
Joined: 14-November 06
From: Germany
Member No.: 281
Alliance: CABAL
Favorite game: Tiberian Sun



My assumption is, that for every tick the gclock2.shp is drawn on the built building, the darken.shp is drawn on every other building. Since TS has by default no hardware acceleration and transparent anims (like gasclouds) can cause lags ingame too, i assume that drawing in a short time 55 times a transparent layer on all cameos is too much for the engine.

And your tests have shown, that minimizing the transparent drawing work for the engine, reduces the lag what supports this assumption.

That's why i think the only way to fix this would be a code optimization, but i'm not sure if Hyper can go that deep in the code.
e.g.
-draw darken.shp only once on all visible cameos in the sidemenu when the construction has started
-update cameos with the darken.shp which appear in the sidemenu after scrolling upwards/downwards (and only those new cameos)
-when construction is finished, update all cameos to show the non-darked cameo again.
-adjust the number of shown frames from gclock2.shp concerning the cost and buildspeed of the current building
(100 Credits building shows only 4 frames
1000 Credits building shows half the frames
2000 Credits building shows all frames)

This post has been edited by Lin Kuei Ominae: Aug 11 2009, 09:30 AM


--------------------
Co-Leader of Twisted Insurrection
my public units for you
Nod units:____________________________GDI units:
Nod Scorpion__________________________GDI 3A Kodiak
Nod Tachyon Tank______________________GDI Medusa (Triple Cannon Mech)
Nod Goliath___________________________GDI Behemoth (medium size Mech)
Nod Cobra (fast medium mech)__________GDI Battleship Aurora
Nod Siegebot (light MG-Mech)__________GDI Fortress Tower (Heavy Base Defense)
Nod Redeemer (4 legged heavy Cyborg)__GDI Triton (Titan support Mech)
Nod/Scrin WotW Tripod_________________GDI Exciter
______________________________________GDI Ion Charge Collector
Misc and Fun units:
X-Mech Calendar 28 SHP Units
Star Wars Mechs ATAT/ATST
Cyborg Barrack on PPM_________________Mech Factory
Mutant Tiberium Flyer
yt1300 (Millenium Falcon + BIG version)

if you use my units in your mod, please credit me.if you want to use my units on your website please ask me before.
Go to the top of the page
 
: | +Quote Post

Posts in this topic
- Bittah Commander   Production Anim Slowdown Bug   Aug 8 2009, 05:20 PM
- - CCHyper   This is a strange little bug that no one has yet b...   Aug 10 2009, 12:50 PM
|- - ^Rampastein   QUOTE (CCHyper @ Aug 10 2009, 03:50 PM) T...   Aug 10 2009, 05:03 PM
- - CCHyper   QUOTE (^Rampastein @ Aug 10 2009, 06:03 P...   Aug 10 2009, 05:57 PM
- - Tore   This is the bug that has prevented me from playing...   Aug 10 2009, 07:39 PM
- - CCHyper   QUOTE (Lin Kuei Ominae @ Aug 11 2009, 10...   Aug 11 2009, 11:52 AM
|- - ^Rampastein   QUOTE (CCHyper @ Aug 11 2009, 02:52 PM) T...   Aug 11 2009, 02:39 PM
- - Tore   I still experience slowdowns, the ddraw.dll gives ...   Aug 11 2009, 08:52 PM
- - Bittah Commander   Well, tbh the slowdown you experience seems to be ...   Aug 12 2009, 01:32 AM
- - CCHyper   So this is still something i have to take note of?   Aug 24 2009, 10:51 PM
- - Kakashi   I too have lag problems but not only when i constr...   Nov 30 2009, 11:48 AM
- - Styx221   Yup, like all build lag fixes ive tried it fixes i...   Apr 27 2010, 03:55 PM
|- - ^Rampastein   QUOTE (Styx221 @ Apr 27 2010, 06:55 PM) -...   Apr 27 2010, 04:27 PM
|- - Lin Kuei Ominae   @Styx221 Thanks for the detailed info. Seems like ...   Apr 28 2010, 10:32 AM
- - Devastator   I only had slowdowns when I had the ole' Ultim...   Apr 28 2010, 09:19 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 1st July 2025 - 04:24 PM


XGhozt.com