Jump to content

Alpha 20 Dev Diary


madmole

Recommended Posts

2 hours ago, faatal said:

No, but we move the CC around in many cases and it is not an issue and it would not help AI or vehicles, since they don't use Unity's CC. Raycasts also break.

FixedUpdate() is called and all physics are completed before the normal Update() function starts.  If you're raycasting during Update() this is likely the cause of the problem, as far as I remember a teleported rigidbody isn't calculated properly until after the next FixedUpdate() cycle.

 

If you don't want to put all of your raycasts in FixedUpdate(), which would be very sensible to avoid if at all possible, the only kludge I can think of is setting up a trigger in update that runs your raycasts in the following iteration.  That's an ugly kludge though and makes me feel dirty just typing it (not in a good way).

 

Good luck with that, not a bug I'd like to tackle  🙂

 

Perhaps shifting the movement of the origin to FixedUpdate() might cure it?  Have the mechanism for detecting a required movement in Update() as usual but move everything at the start of the next FixedUpdate() iteration?  That might work without being too expensive on system resources.

Link to comment
Share on other sites

6 hours ago, The Gronk said:

Rigidbody's also need a special consideration when teleporting although I have little doubt fataal knows this already.

 

The root cause of this is likely that the unity physics are updated during FixedUpdate() instead of the Update() function.  This means that unless everything is moved during a single iteration of the Update() function then the physics engine is likely to have several iterations before everything is moved.

Nope, as far as I can tell this is a Unity bug with the internal physics collision data. Origin shifting moves all the transforms at one time, there are no delays. It works most of the time, but when it fails, all physics casts in parts or all of world fail repeatedly frame after frame until something changes that causes the physics collision state to update. Even the editor Physic Debug mode won't highlight the collider when you mouse over it. Strangely, rigid bodies, their colliders and world colliders still collide fine, which is why a vehicle would not fall through the world, but the raycast to check if a vehicle fell into or off the world would fail and try to fix it.

 

It appears I now have it fixed by detecting failed raycasts and shifting again and checking again. I did move the shift to FixedUpdate, but that alone did not fix it.

Link to comment
Share on other sites

2 hours ago, faatal said:

Nope, as far as I can tell this is a Unity bug with the internal physics collision data. Origin shifting moves all the transforms at one time, there are no delays. It works most of the time, but when it fails, all physics casts in parts or all of world fail repeatedly frame after frame until something changes that causes the physics collision state to update. Even the editor Physic Debug mode won't highlight the collider when you mouse over it. Strangely, rigid bodies, their colliders and world colliders still collide fine, which is why a vehicle would not fall through the world, but the raycast to check if a vehicle fell into or off the world would fail and try to fix it.

 

It appears I now have it fixed by detecting failed raycasts and shifting again and checking again. I did move the shift to FixedUpdate, but that alone did not fix it.

Yep, when the editor debugs break there ain't anything you can do.

 

It sounds like they've put the rigidbody's to sleep, that still wouldn't explain why the raycast would work from a different position though.

 

Maybe try and kludge it with Rigidbody.WakeUp() on important objects?  Might be worth a shot.

 

Glad you got _some_ of the bugs fixed though  🙂

Link to comment
Share on other sites

1 hour ago, The Gronk said:

Yep, when the editor debugs break there ain't anything you can do.

 

It sounds like they've put the rigidbody's to sleep, that still wouldn't explain why the raycast would work from a different position though.

 

Maybe try and kludge it with Rigidbody.WakeUp() on important objects?  Might be worth a shot.

 

Glad you got _some_ of the bugs fixed though  🙂

Rigid bodies are not the problem. They collide using their collider just fine. When ray/sphere casts to the ground fail in large sections of the world, then objects relying on them for physics fall through or in the case of vehicles, think they are falling through and move back.

 

The code I did is visibly fixing it 100% in the case of the player and zombies, but I just don't know about vehicles and turrets yet, because I have not seen one move in days, which does not prove it is fixed, just that it might be fixed.

Link to comment
Share on other sites

2 hours ago, faatal said:

The code I did is visibly fixing it 100% in the case of the player and zombies, but I just don't know about vehicles and turrets yet, because I have not seen one move in days, which does not prove it is fixed, just that it might be fixed.

Anyway, that's great new IMO!

Good job... if anything is still bugging out after this, we, the players may catch it after hours of gameplay (which you can't spare because you need to use your time otherwise).

Link to comment
Share on other sites

So messed around with making a custom part, which was a new billboard piece. It seems that parts are added directly onto tiles, so the only way I could add my new part would be to include the whole tile with it. Is this correct? Would it be possible to make it so parts can have a list to choose from or something along those lines? From what I saw looking at a vanilla countrytown tile that had a billboard, you have to pick a specific one, and the only control over it is whether it spawns at all or not. Seems like a fairly simple way to add more variety if you allow all the billboard parts to be able to spawn there using a group or tag or something.

Link to comment
Share on other sites

6 hours ago, faatal said:

Rigid bodies are not the problem. They collide using their collider just fine. When ray/sphere casts to the ground fail in large sections of the world, then objects relying on them for physics fall through or in the case of vehicles, think they are falling through and move back.

 

The code I did is visibly fixing it 100% in the case of the player and zombies, but I just don't know about vehicles and turrets yet, because I have not seen one move in days, which does not prove it is fixed, just that it might be fixed.

When I implemented such an origin shifting, I used a "stress mode" where the origin shifted every couple of steps, and also randomly every couple of seconds, shifting it by a random amount. This was giving good quick feedback for bugs in the positioning, easily visible by objects getting stuck, falling or shaking, or traces missing the geometry.

Link to comment
Share on other sites

3 hours ago, bdubyah said:

So messed around with making a custom part, which was a new billboard piece. It seems that parts are added directly onto tiles, so the only way I could add my new part would be to include the whole tile with it. Is this correct? Would it be possible to make it so parts can have a list to choose from or something along those lines? From what I saw looking at a vanilla countrytown tile that had a billboard, you have to pick a specific one, and the only control over it is whether it spawns at all or not. Seems like a fairly simple way to add more variety if you allow all the billboard parts to be able to spawn there using a group or tag or something.

 

As I understand it, if you place multiple Parts and give them the same GroupName, it will only use one of those Parts.

 

I'm not sure how it decides which, if any to use. I assume it is just running through each part in order created, rolling the dice on its chance to appear, and if it doesn't appear, moving on to the next one.

 

Assuming all of the above is correct and I'm not overlooking something:

 

  • You cannot arrange to put your custom Part into a list of Parts on a vanilla Tile as you would have to change that Tile in the editor and there would be no good way to distribute that. You could copy the vanilla Tile and distribute your copy.
  • If you want a large list of Parts that you want to share a GroupName then you're stuck using the PrefabEditor's Shift-Enter feature to add each of them, which can take a long time if you have a lot of Parts. For instance, I have around 18 Custom Field Parts and I'd like to pre-define that list so I could use them in a number of different Farm POIs. There's no way to do that.

It would be kind of cool if you could define Part Groups in XML somewhere and optionally choose one of those when placing a Part. Currently, placed Parts are all found in the XML for each POI. I'm not sure you can change this using XPath because they're not in the Config directory. (I've not tried.)

 

Has anyone had any luck using a Part located in a Parts folder in a modlet?

Link to comment
Share on other sites

9 hours ago, faatal said:

Rigid bodies are not the problem. They collide using their collider just fine. When ray/sphere casts to the ground fail in large sections of the world, then objects relying on them for physics fall through or in the case of vehicles, think they are falling through and move back.

 

The code I did is visibly fixing it 100% in the case of the player and zombies, but I just don't know about vehicles and turrets yet, because I have not seen one move in days, which does not prove it is fixed, just that it might be fixed.

A sleeping rigidbody will wake if another rigidbody gets close, otherwise they aren't calculated for collisions to save on cpu cycles.  The failure of raycasts to interact with them is what leads me to believe they're asleep.  I'll admit, without actually looking at the code I'm aiming in the dark here  :-)

Link to comment
Share on other sites

1 hour ago, The Gronk said:

No thank you, I'm currently enjoying my life as a house-husband raising my sprog.  The hours are terrible but at least I only have to deal with one boss  🙂

which is "the boss" as you said you only have to deal with one, the wife or the sprog? :D

Link to comment
Share on other sites

27 minutes ago, Gamida said:

which is "the boss" as you said you only have to deal with one, the wife or the sprog? :D

One is capable of reason and compromise.  The other is largely unreasonable and uncompromising due to an underdeveloped pre-frontal cortex and amygdala. 

 

Which one of those sounds like a description of a boss?  :-)

Link to comment
Share on other sites

2 hours ago, The Gronk said:

A sleeping rigidbody will wake if another rigidbody gets close, otherwise they aren't calculated for collisions to save on cpu cycles. 

 

My experience is that a sleeping softbody will awaken a rigidbody if it gets too close and that often results in a collision. 

 

2 hours ago, meganoth said:

 

There is a joke around "rigidbody" suggesting itself here I just can't bring myself to actually spell out. 😁

 

 

 

 

 

You are a better person than me. 

Link to comment
Share on other sites

1 hour ago, The Gronk said:

One is capable of reason and compromise.  The other is largely unreasonable and uncompromising due to an underdeveloped pre-frontal cortex and amygdala. 

 

Which one of those sounds like a description of a boss?  🙂

I think I know which one you are referring to but to tell the truth I have had bosses over the years that could fit both of those descriptions. I have a feeling many here will have also.  :)

Link to comment
Share on other sites

32 minutes ago, Gamida said:

I think I know which one you are referring to but to tell the truth I have had bosses over the years that could fit both of those descriptions. I have a feeling many here will have also.  :)

This is game development, the number of Joss Whedon's per square metre is far above the average for any other industry.  🙂

 

https://www.reuters.com/business/activision-blizzard-fires-20-employees-over-harassment-claims-ft-2021-10-19/

Link to comment
Share on other sites

I've noticed what appears to be an odd change in loot table for zombie loot bags. Some items like mining helmets and hazmat clothes drop very often and weapons and armor (other than mining helmets) are now very rare.  To test this I changed the config to increase the chance for loot bag drops for a blood moon in the snow biome at game stage ~350.  I ended up getting around 50 loot bags.  From these I only got 1 weapon (a L4 compound bow) and zero armor drops.

Did weapon/armor drop rates get for loot bags dramatically drop for A20? 

Link to comment
Share on other sites

1 hour ago, meganoth said:

 

So what category boss is Joss Whedon supposed to be?

A neckbeard with power it would seem.  This is Gal Gadot's response to Mr Whedon's claim that she couldn't understand English enough to recognise threats and harrassment.

 

Neckbeards go into game development, furry's are sysadmin.

 



 

gal_gadot.jpg

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...