Samuel Dubois - Tool Programmer

Foxy Flox

la_sixème_collection
Foxy Flox is a manipulation based multiplayer VR game. In this game, players have to handle Flox: stackable pieces like tetrominoes. By stacking them, players make towers, the first reaching the final line wins. To do so, players can use special Flox like the Metal Flox or they can throw meteorites to their opponents tower.

The project was made in 4 months months by a team of 4 students in Game Design and 1 student in Game Programming on Unity 3D.

We are currently working on the SteamAPI integration and will publish the game soon.

My role:

I was the only programmer on the game, so we organized our work this way: I was working on the game infrastructure while the game designers were working on prototypes which I integrate in the game afterwards. I work on three main features: the VR controller,the tweaking of physic,the multiplayer network.

- VR controller :

I used the OpenXR SDK on the project, it allows me to use only one SDK for most of VR headsets (Quest, HTC, Index) instead of one for each.

I used Unity’s XR Interaction Toolkit to handle the manipulation of Floxes while modifying it: I added a “tomato presence” that move the object selected to make it appear like it is grab in the hand and not replacing the hand like the toolkit propose. It also keeps the object rotation to ease the manipulation.

Mouse over to animate
I also developed a moving system to limit the motion sickness that VR usually give. With this system, the player moves around his table by doing hands movement like he is pulling a rope, horizontally and vertically. The real movement of the player are still represented but this system allows him to move while little to no movement. You can play at Foxy Flox while sitting on a chair.
Mouse over to animate

- Physic :

The game is a stacking game, so it needed a real like physic real like physic. I didn’t have enough time and resources to work on my own physic, so I used Unity 3D physic. But I soon found a huge problem, jittering: if a player stack more than 3 rigidbodies (Unity physic bodies) and try to stack another one, the tower will jitter even the the pieces don’t collapse. It is due to Unity anticipation : it tries to figure out before hand the next physic state of each piece to ease the simulation.

I first modify Unity physics parameters to optimize them the more I could (modifying sleep threshold, world subdivision, time step; etc…). It limited the jittering. Then I modify the’anticipation by making it less anticipataing. , by doing it add more calculation but the gain of this modification on manipulation and physic is worth it for us.

- Network :

I didn’t have any knowledge of network, so I learned on the job. I used the Mirror API (low level) to create the network. CIt is working on Peer To Peer Peer (infrastructure that seems to me the easiest to set up for 2 players). The physic is calculated in local on both player and the server only keep track of objects positions to light the size of packets. The players don’t play on the same structure, so the lag created by this choice doesn’t bother.

To improve players interactions, I developed a voice communication system via microphone. Sound packets are heavy so I managed the packets system so only sound data are send when they are send.

Analysis tool:

I developed an analysis tool to help the Game Designers to balance the game. They can see which Flox has fallen the most and where they fell. It made us notice some shapes problems on Flox that were falling way more than others.  The tool  The tool
Example of information displayed on the Tool.

When a Flox fall, it checks if the information is unique (to avoid copy and minimize data size) and sends it to a .CSV spreadsheet on a cloud. When the game starts, the local .CSV file is updated and then converted to a .Json to be encrypted. Finally, a Python application using Tkinter library decrypts the .Json file and display it information.

All of this is made to work dynamically so the player and the Game Designer just has to open the game or the Tool.

Skills aquired :

- I learned the challenge around VR controller and learned to used OpenXR SDK to create a game compatible for most of VR headset.

- I developed my knowledge on 3D physic simulation and its optimization on game engines..

- I learned Peer to Peer network infrastructure with a low-level API: Mirror.

- I learned to managed and optimized network packets to avoid lag and data lost.

- I learned to develop an app on Python.

- I learned to stock, send and receve data on a cloud.

- I learned to secure .Json files by encrypting them.