Hello VWorld

Francisco Nicolau
Nico’s GameDev Projects
6 min readJan 9, 2021

Introduction to Programming Concepts in Virtual Reality!

Project Description

This project was developed for my Master’s Virtual Reality Class in 2020 by myself and 3 other classmates. Our assignment tasked us with developing a project that made use of VR’s unique characteristics. After some research, we took inspiration from some existing papers and created “Hello VWorld”, a game that introduces players to basic programming concepts in an immersive environment.

Gameplay

In Hello VWorld, the player finds themselves alone in a test chamber. Inside this chamber is a glass cube with a small robot. To unlock the exit door and progress to the next room, the robot must receive the correct instructions that allow it to solve whatever challenge lies ahead.

Gameplay Gifs

To complete each of these puzzles the player is given a few programming blocks and they must connect them in a way that expresses the necessary logic for the robot to reach the goal!

Watch the gameplay video below to see the project in action.

Concept

When we started this project we knew we wanted to create a physical environment that provided players with the playground and building blocks needed to experiment freely. This vision guided us all throughout the development of “Hello VWorld”.

To achieve this goal we focused heavily on the metaphors and interactions that the player must understand and utilize to beat any given puzzle. It is important that a player acquires basic notions like instruction, condition, comparison, and iteration in a natural and simplistic way so that even a complete beginner unfamiliar with these concepts is able to play.

Our goal is not to teach an actual programming language but to convey the underlying logic that is needed to take the first steps.

In these sketches, we outlined the basic mechanics of the game, along with the syntax and notation for our block-based pseudo programming language.

Development

I collaborated with my colleagues on almost all parts of development but my main focus was building the base VR interaction, puzzle logic, and creating all the necessary assets and visual effects utilized in this project. Due to some characteristic limitations of VR when it comes to performance (especially running on medium spec hardware) this proved to be a very challenging yet rewarding process.

VR Interaction

Creating proper, physics-based, object manipulation for VR is unique from any other development experience that I have ever had. Some parts are very frustrating, especially when it comes to minimizing jittering and lag, but all in all, it can be surprisingly intuitive and fun, sometimes even generating emergent behavior that you never intended for.

Physics buttons and physics hands interacting
Physical Buttons need to be denounced (like a real button). This is what happens when you don’t 😁

Puzzle Logic

For the puzzle logic itself, I created a system that registers, propagates, and receives signals for any puzzle component. This also required the creation of logic gates and sensors that could get triggered in different ways.

With a simple shader, I was able to create the typical “energy lines” that can be found in many puzzle games. The door itself also uses a simple vertex shader to animate the opening and closing.

Pressure Plates, Logic Gates, Doors, and Lasers!

Assets and Visual Effects

One of the very first things I did when it comes to creating the look of the game was to create the environment, in this case, the test chamber.

I knew I wouldn’t really have the time to create too many assets for this project so the goal was to do more with less. With this mentality, I created a shader that uses a single tile texture to create a surface (like the floor or the walls) adding slight variation through the use of noise.

Tile shader

Another important piece of the environment is the glass enclosure where the robot is. The game’s art style so far relied heavily on cartoony visuals with simple low-resolution textures. This was not only to reduce the rendering cost but also to be time-efficient, we needed a transparent material that matched this aesthetic. I was very pleased with the result I was able to obtain!

Toon Glass Shader

One of the most essential components of our game is the Holofield. This is the zone where the player can suspend the blocks in mid-air and create all of the logic connections. This is where the actual programming takes place and it’s where the player spends most of their time. Below you can see the progression for the effect of activating the field.

Animated Texture + Emission mask + field geometry = sci-fi goodness

The look and feel of the programming blocks was a very high priority for us as well. After all, these are the players' primary tools. t’s crucial that they read well and provide clear visual affordances to minimize the amount of onboarding needed for new players. For us, this meant using only symbols (which removes any language barrier), as well as using color-coding and shape matching to indicate what should go where (just like children’s toys).

System for selecting a block type in the editor.

Finally, let’s take a look at the robot, arguably the protagonist of the game, other than the player of course.

The threads move and the face is capable of conveying emotions!

One of the last additions to the game was this spawn effect, which we used to reset the robot’s position after running the solution and also to make the coding blocks appear!

Spawn effect

Closing Thoughts

This project was very fun to work on and a fantastic opportunity to learn some new skills. Unfortunately due to covid-19, we were not able to perform proper user tests, which is a shame because I would have loved to find out what kind of results we could get with this immersive approach to explorative learning.

Regardless, I am confident that VR is a very powerful medium and I can absolutely see it become a very useful tool for learning in the future. It enables us to create some truly unique experiences and I’m excited to keep experimenting with it in the future!

Thanks for reading, I hope you enjoyed 😉

--

--

Francisco Nicolau
Nico’s GameDev Projects

I’m a CS Master’s student interested in using all sorts of technology as a medium to challenge myself and express creativity.