Friday Devblog 50

Migrating divegame.net to local storage and a beta branch



Johann
This week I've been working on migrating divegame.net user data to local storage. The most work was thinking everything through; things like how the link to divegame.net works; what happens to existing user progression etc. After everything was thought out and documented, and the tasks were split up, we were good to go.

I've put up a beta for you guys to check out, for those who want to help out with testing, or would like to see how the build is progressing. To check out the beta, you can right click World of Diving in Steam, select properties -> beta, then opt-in for the beta named 'beta'. If you can't figure out how to do this, see this guide: http://steamcommunity.com/sharedfiles/filedetails/?id=182912431

WARNING: For those entering the beta, after opting in, you shouldn't opt-out of it and play the live version. If you do this, everything should work (but this isn't tested), but all actions you then do on the live game will not be transferred when the update goes live or you re-join the beta. This is because the divegame.net user data is only transferred to your local machine (and the Steam cloud) once.

NOTE: The matchmaking (Quick game) only works after completing the tutorial.

Thanks in advance, and as always, let us know what you think!


AI update



Trevor
Hi all,

Last weeks I have continued work on performance improvements of the fish. Last week has seen a lot of changes, and a couple good ones are coming up. I will describe the major changes I've made below by describing the tasks attached to them in our trello.

Fishes should not be updated or rendered when they are out of range of the draw distance We had a system in place which spatializes all creatures in a level into a grid. Then we would check all neighbouring cells from all players and enable the creatures that are in these cells. The drawback of this system is that half a cellsize is the minimum distance a player will be checked for nearby creatures, and the maximum distance is 1.5 times the cellsize. This means that a cell had to be twice the viewdistance in size resulting in a worst case scenario where we are calculating creatures which are double the maximum drawdistance away which is wasted power.
The new system spatializes creatures in a dynamic grid around players, by dividing their world position by the drawdistance and clamping to the player position, if this equals zero; they are close enough. This means no creature outside of the drawdistance will be considered active. Which can result in huge performance increases in certain situations!

Fishes should start their animation at different/random times
Previously all fish of the same time would start their swim animation at the same time. Now we made it so that they start with a random offset.

Fishes should assume a default configuration which 'just works' (animation speed reliant on force etc.)
In addition to the offset start of the animations, animation speeds and animations in general are now controlled based on the physical state of the fish. If a fish accelerates, so will his animation, if they are idle, so is their animation.

SpawnArea settings in a territory
In the past, creatures would spawn on a random position in their territory. We would cheat this system by assigning creatures to a smaller territory ( to spawn ) and then have their territorial AI decide to move to the larger territory. In basis this was a good idea, but we developed it poorly and in a hacky way. I have created a system where spawnarea's are supported. We can have multiple, or none and will not have to override territories through AI, it just works.

It should not be possible to push fish out of the water ( flying ) A few weeks ago we removed the Unity physics system from our AI system. One advantage he unity physics system had is that creatures would actually collide with the world and not penetrate collision. We don't have that perk anymore, so our avoidance implementations have to be spot on. We have improved over the course of the last weeks and it is really really hard to push fish through walls or out of the water now.

Fish should not spawn in terrain/objects
We define territories with boxes or spheres. Most of the time these collide with the terrain or objects. With the old system, creatures would spawn randomly in these territories and occasionaly spawn in collision. With the new spawn system we can easily resolve all of these issues. All levels have been checked, and no creatures should spawn weird anymore. Every small creature should have a final LOD level with a normal mesh renderer and no skinning.
Mesh skinning is very expensive. The visuals of the creatures are adapted according to the bones of their animation. When creatures are very far away, animations aren't visible, but were still calculated. The system is now improved to not play animations or skin meshes anymore when creatures are far away. In addition, lower update rates are enforced for further away objects .

CreatureCollection should not update the grid for each creature every frame. Only when there is a change in position
Previously we would spatialize creatures every frame, al lthe time. For scenes with a high fish density this could take quite a chunk of performance every frame. This is now improved so that creatures are only indexed when they are active, almost removing the calculation cost of this operation completely.

Bonus GIF; we are currently working on


Steam cloud save support



Jeroen
This week we have been implementing Steam Cloud save support. On top of that, a conversion mechanism had to be made to convert user data from divegame.net to the Steam cloud file.
This is done automatically at startup for all users who have linked their Steam account to divegame.net before. For new players a new user data file is created so they will have a blank progression. Existing users should not notice they are now playing offline and new users should also have a smooth playing experience.
There are a few features disabled in the beta. The poll where players can vote on new features has been disabled. Also other players' gear in multiplayer is not synced at the moment.

The implementation of this also involved changing all places where webservices were used (connections to divegame.net) to use the data that was being kept from the Steam cloud.


Next week we will have an update on the current gameplay design of World of Diving, so stay tuned!


Previous blogs:

read more...

- Devblog 49 September 4
- Devblog 48 August 28
- Devblog 47 August 21
- Devblog 46 August 14
- Devblog 45 August 7
- Devblog 44 July 17
- Devblog 43 July 10
- Devblog 42 July 3
- Devblog 41 June 26
- Devblog 40 June 19
- Devblog 39 June 12
- Devblog 38 June 5
- Devblog 37 May 29
- Devblog 36 May 22
- Devblog 35 May 15
- Devblog 34 May 8
- Devblog 33 May 1
- Devblog 32 April 24
- Devblog 31 April 17
- Devblog 30 April 10
- Devblog 29 April 3
- Devblog 28 March 27
- Devblog 27 March 20
- Devblog 26: March 13
- Devblog 25: March 6
- Devblog 24: February 27
- Devblog 23: February 20
- Devblog 22: February 13
- Devblog 21: February 6
- Devblog 20: January 30
- Devblog 19: January 23
- Devblog 18: January 17
- Devblog 17: January 9
- Devblog 16: December 19
- Devblog 15: December 12
- Devblog 14: December 5
- Devblog 13: November 28
- Devblog 12: November 21
- Devblog 11: November 14
- Devblog 10: November 7
- Devblog 09: October 31
- Devblog 08: October 17
- Devblog 07: October 10
- Devblog 06: October 3
- Devblog 05: September 26
- Devblog 04: September 19
- Devblog 03: September 12
- Devblog 02: September 5
- Devblog 01: August 29


Comments

up
5 users have voted.
Anahita's picture
Poseidon
Points: 274989

Hi there,

Nice work guys !

One question : what about steam users that decided to not use the cloud steam option in the general steam settings? Does your operation and saving mechanism ignore that or must we activate steam cloud ? I deactivated steam cloud myself because I don't like it on other games and like to have my save games in local in general, that's the reason of my question.

up
4 users have voted.
Richard's picture
Poseidon
Points: 1141754

Thanks! :)
Technically: if you have disabled Steam cloud the save files will just be saved locally.
We did not test this yet though, so if you experience any issues with it, please let us know!

up
3 users have voted.
Anahita's picture
Poseidon
Points: 274989

All right I will test it through the beta in local and let you know.

up
4 users have voted.
Richard's picture
Poseidon
Points: 1141754

Thanks! Much appreciated!
up
4 users have voted.
Anahita's picture
Poseidon
Points: 274989

All right : I couldn't test a lot :

- I picked up some doubloons and quitted and started the game again, the new doubloons were counted.
- I completed the U-boat daily mission but I don't know where I can see if it is counted or not (is there a hidden menu ?) so can only say that I won the daily mission.

up
4 users have voted.
Richard's picture
Poseidon
Points: 1141754

Make sure to restart Steam, otherwise you will not see the beta update.
up
4 users have voted.
huszarl's picture
Poseidon
Points: 86958

Thank you so much guys! This version is great! I have arms, legs and body in Oculus VR. :)

up
2 users have voted.
Richard's picture
Poseidon
Points: 1141754

How is the performance in VR? (We did a lot of VR optimization)
up
2 users have voted.
Anahita's picture
Poseidon
Points: 274989

I tried five minutes :

- It is more fluid, perticularly because when going under 75fps, it doesn't drop to 37.5 fps. But my old GPU (Ge580) is not able to support a whole game without stuttering, but since it is no more supported by Oculus Rift team, I find it great that it still works.

- The new moving system is weird and I can't turn without a strong effort of the neck and even then it doesn't turn fast. I really suggest that you let us chose, like you did for "strafe", if we may use the mouse or not to turn, or at least to turn the cam that will turn the HUD that will direct the diver. One of those two possibilites is fine even if I prefer the first one, but keep in mind that not all of us were sick and the solution you propose limit everyone even those who are not sick.

One or two other things :

- The little "ambiant" bubbles that comes to the divers when the divers goes forward appears clearly too late and in the VR it is visible and it looks like they are just comming out of the blue. Plus, there are A LOT of them and it is clearly invading the field of vision in the VR.

- The new colors makes it great in the VR. I found my kick again when I went up Hilma and watched down.

up
3 users have voted.
huszarl's picture
Poseidon
Points: 86958

All levels are stable 75fps with the exception of 'Base diving' level. The base diving level is 40-56 fps. I have GTX970 video card. Thanks for optimization. I know the VR optimization is very big work.
I agree with Anahita that the new moving system is weird. I didn't like at first, but I'll get used to it.

up
5 users have voted.
Richard's picture
Poseidon
Points: 1141754

Hi Anahita and huszarl,
Thank you both for the feedback.

We're still figuring out the best way to create underwater VR movement without creating nausea. We actually received some good feedback from Sony (Morpheus team) last week that might help.

I will discuss the VR issues/options mentioned by Anahita tomorrow with Johann, he's responsible for the VR development of WoD.

Feedback on the VR version of WoD is definitely more than welcome! (feel free to start topic on VR movement if you like on the forums )

up
4 users have voted.

So far the beta client seems to be working well. It is disappointing that completing the daily missions does nothing except give a message that you completed the daily mission.

up
5 users have voted.
Richard's picture
Poseidon
Points: 1141754

Hi Zarozinia, Thanks for your feedback. Keep in mind that the functionality in the beta still limited - the missing features will be added in the upcoming beta builds.