PC Alpha 20 Dev Diary

Status
Not open for further replies.
Hey, is anyone else missing the max alive zombie count setting? 

I am playing 64, and while I know the number does not jump up super fast, my last video was only like 8 zombies, when I was expecting at least 12...

Then I go and look and I no longer see the max alive zombie setting...

Is it gone now or did I miss something?
It is gone, you have to edit it in the files, I am sad about this as well 

 
No, there is a path to us. I had the AI view (whatever it is actually called dm mode Num 0) on and watched 10 zeds spawn in within eyesight and 9 pathed to us immediately but one immediately went into destroy mode (it was a duplicate of another zed that was out and was closer to the path to us than its twin who actually pathed to us). And every other zed that went into destroy mode for whatever reason stayed in destroy mode permanently instead of coming out of it as the xml indicates they should.
If you think it's a bug, then file a bug report and put screenshots of the "AI view" to prove your point. I think it's the best course of action.

faatal needs a bug report to act upon, then maybe he'll find out it's a bug with the "destroy mode" and fix it.

 
You may have set up your base so that the best choice for them is to go in destroy mode.

Try to "fix" the path they should follow to you so that they have the most clear and easy way to you.

Also, as faatal mentioned some time ago, there are different types of "AI levels", some zombies are very dumb, and they almost always go into destroy mode.

The "smarter" ones, instead, will path to you even if the path is longer and "complicated".


In my experience playing Alpha 20, they all have in common that they act decidedly like Matrix Buggy Software Entities very often that need to be deleted ;)

They have behaviour that clearly is not intended, and unrelated to being dumb or smart.  For instance:

1) Charging the player, gets stuck on a tree (or a 1 wide block) and instead of moving aside, just beats on it. Even with the player moving to stand watching right next to it.

2) Rushing towards the player. Then running away from the player. Then running perpendicular to the player. Then again towards the player. This can repeat making for a super jerky and buggy path.

3) Running towards the player. Player moves a few blocks. Zombie arrives at player position and stops, then starts leisurely walking (having obviously lost track of the player in the span of 5 seconds, despite no obstructions, daylight, etc).

4) Player jumps. Zombies run off to beat on a random tree or pillar, as for a moment the player is now not in the exact spot it was, being 1 meter up in the air.

There seems to be something seriously wrong with the pathing, OR the zombie AI is hitting a lot of unintended decision tree branches struggling to adapt in a reasonable fashion. While we had some of this in Alpha 19, it's almost comical with how this makes zombies act decidedly non-zombie like.

A "dumb" zombie I can understand trying to break through rather than path a convoluted path. This is not what is happening :)

 
In my experience playing Alpha 20, they all have in common that they act decidedly like Matrix Buggy Software Entities very often that need to be deleted ;)

They have behaviour that clearly is not intended, and unrelated to being dumb or smart.  For instance:

1) Charging the player, gets stuck on a tree (or a 1 wide block) and instead of moving aside, just beats on it. Even with the player moving to stand watching right next to it.

2) Rushing towards the player. Then running away from the player. Then running perpendicular to the player. Then again towards the player. This can repeat making for a super jerky and buggy path.

3) Running towards the player. Player moves a few blocks. Zombie arrives at player position and stops, then starts leisurely walking (having obviously lost track of the player in the span of 5 seconds, despite no obstructions, daylight, etc).

4) Player jumps. Zombies run off to beat on a random tree or pillar, as for a moment the player is now not in the exact spot it was, being 1 meter up in the air.

There seems to be something seriously wrong with the pathing, OR the zombie AI is hitting a lot of unintended decision tree branches struggling to adapt in a reasonable fashion. While we had some of this in Alpha 19, it's almost comical with how this makes zombies act decidedly non-zombie like.

A "dumb" zombie I can understand trying to break through rather than path a convoluted path. This is not what is happening :)
Did you experience this in SP or MP?

I'm asking because I only play SP and I only experienced n.1 once in a long time.

I don't know why other people see these anomalies so often.

If it was an MP issue, it could be explained maybe with the pathing data is not being synced properly between host and client? Just a guess.

 
Did you experience this in SP or MP?

I'm asking because I only play SP and I only experienced n.1 once in a long time.

I don't know why other people see these anomalies so often.

If it was an MP issue, it could be explained maybe with the pathing data is not being synced properly between host and client? Just a guess.
We are on a dedicated MP server.

 
I've seen this also. 

I stood beside a Mo (ground level) who had targeted a friend of mine, who was on the roof of a second floor motel (we built the second floor.)

I was literally stood about 7 blocks away from it while it looked at me and tried smashing a wall in to get to her.

I had to approach it and get into the same block space before it decided to target me (in spite of me being stood in an open space).

Strange...

 
Do you set the CharacterControllers enabled state to false before shifting the origin? The physics engine does not like moving a CharacterController around externally when its active.


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.

 
Do you set the CharacterControllers enabled state to false before shifting the origin? The physics engine does not like moving a CharacterController around externally when its active.
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.

 
It would be nice if the game kept track of the POIs you do quests for and at least tries to avoid sending you to the same type of POI very often. And early on, since all traders on city edges, and city edges are always farms, almost all quests are farm related ones. The farms look nice, but they get old pretty quick when you have to quest a bunch of them in a row.
Every game needs its meme. Fallout 4 had Preston Garvey: "General, another settlement needs our help! I'll mark it on your map!", so traders of 7 Days to Die may just need that one extra farm cleared out of zombies, just one more farm cleared and you're good to go up that POI quality ladder... :)

 
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.

 
Last edited by a moderator:
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.

 
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  🙂

 
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.

 
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).

 
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.

 
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.

 
Status
Not open for further replies.
Back
Top