• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Company
  • More Games
  • We’re Hiring!

Food Fight

Conquer the Food Goblin!

  • Home
  • About Us
  • The Game
  • Why it Works
  • Resources
  • News
  • Contact
    • Share Your Feedback!
Home › Development › Implementing A Conveyor Belt In VR (Part 1)

Implementing A Conveyor Belt In VR (Part 1)

Jun 20, 2018 |

Game Overview

Food Fight is a VR game currently in early release for Oculus Rift, with planned versions on Vive & Playstation VR coming in the future. As the name would suggest, the game is a virtual reality food fight. A player is presented with a variety of choices and can pick which foods to eat themselves or which foods to throw at their opponent. Making healthy eating decisions will lead to power-ups and ultimate victory!

Our goal for the gameplay is to create a fun system that can use the ‘sandbox physics’ that successful VR games have demonstrated as a special feature of the genre, and then shape that gameplay to reward behavior that will have a “Real Reality” impact on their health. In the game-play, one or more Food Goblins will begin throwing food at the player. If the player can’t deflect or catch the food thrown their way, the food will splatter all over their visor.

The Issue: Catching in VR

In our play-testing, we often noticed that players who were new to VR took a while to learn the timing behind how to catch food that was thrown at them by our Food Goblin. Every VR game needs to account that it might be one of the first times the user has ever tried VR, and we wanted our game to be as accessible as possible to players at every level.

The Conveyor and Player Area

For the easier levels, we decided to give the players their own supply of food to throw or eat for power-ups. Initially, we just took the same generator for our power-ups and changed it slightly to allow it to generate Food Game Objects instead. We had also discussed giving the player a bit more ‘cover’ to avoid food that is thrown their way by the Food Goblin. It was through both of these that we arrived at the solution of a Conveyor Belt.

The Process: From Concept through Prototype

Our 3D artist worked up designs for a pipe from the ceiling, sections of a conveyor belt, and a trash can. We started out just arranging these in the scene. A parent object helps keep the individual sections neatly organized. The conveyor sections are all set along the Z-axis with the same X and Y positions. The “Conveyor” container is just an empty game object that allows them to be rotated and positioned altogether.

After getting them sized and positioned in our test scene, we next needed a way to work out the actual conveyor mechanics. There are potentially a lot of ways we could do this. We could attach a script to each item while it’s on the conveyor to move it along the Z axis, or another path that we give it. That would need some extra logic on the item to decide when it should be moving on the conveyor, when it’s been picked up, and when it should fall off. This could potentially be prone to a lot of bugs since we want our food items to be able to do a lot of different actions in the game already.

“A simple empty cube of physics.”

Another possibility might be to have the conveyor itself handle the logic, and decide what items are on it. This was definitely a better method — only the conveyor belt needs to ‘think’ about what to do. Unity’s Collider components can already be set to work as triggers for scripts, so we could set something up to move all items on the trigger over a small bit on the Z axis (or any other direction, or even a more complex path) each frame they were inside the trigger.

But this also has its own disadvantages. The conveyor would always need to switch items back and forth from “kinematic”,  which means “this object ignores the physics engine and only scripts tell it when to move or rotate” or it would need to carefully nudge items along with the physics engine’s Add Force or Move Position function. Collider triggers and colliders themselves can sometimes get skipped if an object is moved fast enough through them, or if the user’s processor gets slowed down with other tasks.

We had to find a solution that would work for our purposes. Next week, we’ll delve into exactly which approach we took and how it helped to improve our overall game development as a result.

You can read more about Food Fight on the game website, or download the game for free on the Oculus store.


Category: Development Tagged: dev-blog virtual reality

About

Health Impact Studio logo

About Health Impact Studio

We are a dedicated team of developers and researchers with the mission to improve the health of individuals through novel technology including games, virtual reality, and role-playing simulations. We welcome input from the full range of stakeholders to create a customer experience with the broadest applicability to improving health outcomes.

Keep Reading

New Update – Food Fight V 1.1 Released!

Jul 01, 2019

Food Fight V 1.0 Released!

Dec 17, 2018

Wrapping Up Development – Part II

Sep 12, 2018

Previous Post: « More Food Variety
Next Post: Implementing A Conveyor Belt In VR (Part 2) »

Primary Sidebar

Food Fight VR for Oculus Rift
Free!Get Food Fight Now!
  • New Update – Food Fight V 1.1 Released!
    Jul 01, 2019
  • Food Fight V 1.0 Released!
    Dec 17, 2018
  • Wrapping Up Development – Part II
    Sep 12, 2018
newsletter

Want to be kept up to date on the latest news?

Get Our Newsletter!

Footer

a product of
Health Impact Studio
a division of Clinical Tools, Inc

Get Food Fight
  • Copyright Guidelines
  • Privacy Policy
  • Terms of Service
  • Technology Requirements
  • 508 Compliance
  • Facebook
  • LinkedIn
  • Twitter
foodfight@healthimpact.studio

101 A Market St Chapel Hill, NC 27516
919-960-8118

We're Hiring!

Join the Development Team!

© 2023 · Clinical Tools, Inc · Log in

Sign Up for Our Newsletter!
  • Hidden

Thanks for signing up!

We’ll keep you up to date on the latest news!

In the meantime…

Check out our other amazing games available on the play store!

Get it on Google Play

And if you played the game…

We appreciate the feedback, it helps us improve our product for gamers to come!

Food Fight Satisfaction Survey