Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / would this help framerate?

Author
Message
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 21st Oct 2009 22:36
Hi everyone,

I just thought of sth to help increasing frame rate (sth like drawing distance) but before going through with it I need to know how would FPSC handle it..

the idea is simply editing the main appear script to hide the entity just as it loads up, then edit the main script so if the player is within say 10 segments the entity shows, if further it hides again..

now would this help increasing framerate or would it be the same as the entity is visible?

TY..

Black Profductions
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location: Argentina
Posted: 21st Oct 2009 23:17
If u make it dissapear it will for sure, that will work as a lod system

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 22nd Oct 2009 21:07 Edited at: 22nd Oct 2009 21:12
Good question. In scripting, dynamic entities are triggered by proximity. The script just loops until the player is within x units. This would be the case whether the entity is "visible" or not, because the script has to keep checking player proximity to decide whether or not to make it visible.

The advantage would be in less poly drawing, and you'd need to know at what distance it would be profitable to hide and show an entity. In a given level with this wall and that, when would the engine begin to draw that entity, how long could you delay it, and will it be the same for any given room/door/wall configuration?

Also, would it be profitable to - through scripting - keep the entities collision off until the player is very near, or would the extra distance checking be a trade off?

All very confusing.

Brian.

rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 23rd Oct 2009 00:19 Edited at: 23rd Oct 2009 00:21
Brian I have found that collision for an object is not calculated till the character is in fact in contact with it. Discovered this with a bridge I made which was way too high poly lol, framerate was stable till I walked onto it then it dropped like a stone.
Scene Commander
Support Manager
16
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 23rd Oct 2009 00:38 Edited at: 23rd Oct 2009 00:38
I don't believe hiding objects via scripting would be that effective because the source has a nasty habit of turning things on and off. From a coding point of view, I did something very similar with WASP mod and gained between 5-20fps by hiding distant objects so if you can get this to work via scripting (and good luck), you should see some performance increases.

I've attached a little script for decals which someone may find useful which shows and hides decals at a set distance. I've managed to almost eliminate slowdown caused by decals using this script to run them.


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 23rd Oct 2009 01:00
Quote: "Brian I have found that collision for an object is not calculated till the character is in fact in contact with it"


That makes sense. I remember walking into or up against certain objects that seemed to grab the player and drag him down like he stepped in quicksand.

It also seems that any noticeable slow down from high poly objects occurs very near the object as well. Certainly cutting down on "overall" poly by turning off entities would be beneficial, but how much and what is the best way to do it.

Brian.

Login to post a reply

Server time is: 2024-11-25 07:34:47
Your offset time is: 2024-11-25 07:34:47