Scripts / scale then turn off

Author
Message
GubbyBlips
2
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 2nd Aug 2021 04:00
No way to turn Static on/ off live via script?
I want to ScaleObject( obj, x, y, z ), and then make it
Static to save frame rate. I got it as bad as +~14 FPS because in order to detect call
the object number :g_Entity[e]['obj'] , it must be dynamic. (Sure looks this way,
if I'm wrong, any pointers?) I use isimmobile = yes, and need collision on.
PM
smallg
Community Leader
15
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Aug 2021 17:49
if an object changes in any way it is not static so no you shouldn't scale a static object... if it is just one object eating up 14fps make sure the collision mode is correct and optimise the script if possible
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
5
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Aug 2021 18:26
issimobile=yes forces polygon collision mode so should only be used on low poly dynamic entities otherwise FPS will suffer!
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
2
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 3rd Aug 2021 02:57
"if it is just one object eating up 14fps"
BTW that's a total of 14-20 fps on the ticker, not a drop of that amount.
So far it's in the ~400 objects range as I'm messing with very basic procedural building stuff.
And since I did some modifications to the map, it's better. Turning off/ on static when needed
live game would just be handy tho.

-----
Good to know AM, kinda seems strange, but now that I think of it, it seems right.
I wonder why it's not possible to pull the object number from g_Enity[e]['obj'] from
a static model? Moving static models is possible. So-

For FPS I will look into texture sizes if it comes to that....
PM
smallg
Community Leader
15
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Aug 2021 09:17 Edited at: 3rd Aug 2021 09:18
with the way GGC works the AI pathing (and lightmapper if you use it) are worked out at the start of the game and so any static objects that change / move will now have wrong values - i.e. a static wall that is moved would still make the AI path around the old location (and show a shadow there) but the AI would just run right into it like they can't see it in the new location (and wouldn't have a shadow)... if you could treat static objects as dynamic there wouldn't be any need for static or vice versa.

it sounds like you would want a way to procedurally build your level via lua, swap them to static then recalculate the AI pathing afterwards.. unfortunately this is not possible without changing the engine code.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2021-11-27 20:04:22
Your offset time is: 2021-11-27 20:04:22