Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

3 years ago

Advertisement
June 01, 2020, 08:52:24 pm

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JasonMRC

Pages: [1] 2 3 ... 41
1
Scripting / Re: WorldNetworkObject vs. StaticObject
« on: February 27, 2016, 08:01:47 pm »
When I looked at one of the tight clusters of objects, my FPS was around 10-30.  When I looked away at the sky, my FPS jumped up to 60-80.  The interesting thing about this is when the object was changed (to whale in the tests), my FPS was stable around 50-60 when looking at what would have been the largest clusters before.  It's really strange that the distance of objects to each other would affect FPS.
What if you change it to something smaller, that has less surface texture?
Code: [Select]
Traffic Cone
"35x12.flz/go040-b.lod"  -- Model
"go040_lod1-b_col.pfx" -- Collision

2
Scripting / Re: WorldNetworkObject vs. StaticObject
« on: February 26, 2016, 08:14:48 pm »
I use StaticObjects to do what you are describing because I can't see when a WNO streams in nor can I iterate through it without manually handling a list of them.
Can't you see when one streams in with the WorldNetworkObjectCreate event?
I don't know. The event says Create, not Spawn and there is no note on the page about whether or not it fires on the client side each time it comes into stream. Can someone confirm this?

Quote
People have been saying this for a really long time, but all the tests I've run with StaticObjects seem to indicate that it's not the actual amount or presence of the StaticObjects that causes lag, it's the streaming in and out of them constantly for the client that seems to cause lag.
Lord Farquaad has recently put together a 'planet generator' script that spawns thousands of StaticObjects within very close proximity of each other, all with a streaming distance of 5000, meaning you'd stream that all in once.

On my computer, the initial streaming-in of these objects drops my FPS ~5-10 frames for a few seconds, then I get a solid 60 (my usual FPS) after that.
Do you know about how many objects that is?

Other differences:
- You cannot change or nil a StaticObject's model or collision data.

And in my personal opinion, using a StaticObject just to store information is poor practice. I'll investigate performance over the weekend.
Yes, using it just to store information is poor practice and I don't recommend it. The application which I was suggesting - and I believe Dev was asking about - is a way to make an extension of sorts using ClientStaticObjects which requires only one item on the server to be updated. Using a StaticObject you can set it's model to a certain name so that you know to operate on it accordingly. The collision can likewise be used to store permanent data or simply left blank. You can then set values for your dynamic data.

If you just need to store information I'd suggest an NO/SO/WNO.

3
Scripting / Re: WorldNetworkObject vs. StaticObject
« on: February 26, 2016, 07:00:30 am »
The best solution would be iteration and stream notice for SOs, NOs, WNOs. But unfortunately we don't have that yet.

I use StaticObjects to do what you are describing because I can't see when a WNO streams in nor can I iterate through it without manually handling a list of them.

The only significant differences I can think of are the WorldNetworkObject:GetValues() call that isn't possible for StaticObjects...
Can you explain the need for this? If you routinely need to get multiple values as a table perhaps have one value set as that table would be better?

Quote
Is there a notable difference in networking efficiency between the two? Does the syncing of the model and collision for a StaticObject have a discernible impact on how fast it is synced among clients?
The Model/Collisions are strings and synced regardless (Unless they are coded differently than one would assume). This can be used to your advantage. You can use the Model as a sort of Anchor and the Collision to store permanent data for that item. Of course if you have Build then you'll have to be careful to make sure your custom objects cannot be moved by players and aren't saved by your object saver.

I don't think there is a difference in efficiency between the two. Just be wary that having hundreds to thousands of StaticObjects in one stream area will cause client lag, as I imagine having lots of WNOs would also do.

A Dev or Betatester perhaps can address if one is more efficient, but operationally I think you should choose whichever is easiest for you to work with.

4
Did i not mention this ages ago?

https://www.jc-mp.com/forums/index.php/topic,5779.msg41928.html#msg41928

Yeah, It's weird though because I'm almost certain I never had this bug before the 0.2.2 update. It seems maybe before it was random/rare or something, and now it's persistent and happens every time.
Those are the most frustrating bugs! Lol.
Its happened to me and other players i spoke with about it since the release of 0.2.
None of my peeps noticed it until 0.2.2. I wonder if it is somehow related to FPS?

5
When in a vehicle, Teleport/SetPosition will place you at your current location if targeted beyond stream range. If not in a vehicle or if the target vector is within stream it will operate correctly.

The changes with 0.2.2 seem to have unearthed this.

6
Scripting / Re: How to Respawn Players where they died ?
« on: February 18, 2016, 08:58:52 pm »
Just a note, you don't need to reset player values to nothing on join. Player values are always nilled when a player leaves.

7
Scripting support / Re: default help script
« on: February 15, 2016, 02:34:03 am »
Yes. For the most part I use a custom wrap function but In some cases I specifically define the lines.

8
Scripting support / Re: default help script
« on: February 15, 2016, 12:41:59 am »
I have noticed this on and off on various servers but haven't found a recurring cause. AFAIK it's never happened on mine though.

9
Releases / Re: [Release] AirTraffic
« on: February 06, 2016, 01:51:33 am »
AFAIK I haven't experienced any issues and I'm running straight vanilla.

10
Scripting support / Re: SortedList wrap column
« on: February 01, 2016, 04:18:48 am »
For instance, if you use \n to make the text multi-line, would the subsequent lines increase the height of the row or would it be cut off?

This is assuming your contents is string and not an object.

11
Scripting support / Re: SortedList wrap column
« on: February 01, 2016, 02:32:28 am »
What happens if you 'wrap' the contents of the field? Will the row height expand to show it all or will it get cutoff?

12
Work in progress / Re: [Beta] Lightsabers
« on: February 01, 2016, 02:30:44 am »
Very nice.

13
Scripting support / Re: Another way to get GUIState
« on: January 30, 2016, 06:55:53 am »
Ahh, I see.

Assuming he is using the Game:FireEvent() that hides the gui, that changes the gamestate to menu aswell, I believe. Your method would work, but you would want to not check the game's state if the custom variable is not nil, otherwise it won't work for him.

14
Scripting support / Re: Another way to get GUIState
« on: January 29, 2016, 09:48:40 pm »
I would recommend not overriding that base function unless adding to it without removing it's old functionality.

If you want to check if your own HUD is open, make a HUD:GetState() or GUI:GetState(), HUD/GUI being your own global class. This way you can tweak your HUD's system however without worrying about if you can still use the default function as you expect. You also don't have to worry about other pre-made scripts having errors.

15
Releases / Re: [Release] AirTraffic
« on: January 14, 2016, 08:58:00 pm »
Ahh, thank you! I have updated and will notify you if I notice anything.

Pages: [1] 2 3 ... 41