Categories
Uncategorised

VR Research

For this unit we have to do a VR game/experience that is interactive and that runs for Oculus Quest 2. We had complete freedom as regards the main theme and structure of our game.

Idea

My first though for this project was that I wanted it to look pleasant, this a really reach environment full of colour and element to get lost into, trying to recreate a surreal atmosphere. I started thinking about lice in Wonderland, which has the surreal and magic atosphere that I was looking for, started to search for images of clips both from the animation and movie and did a moodboard with few pics of what I enjoy the most about the aesthethic.

I started focusing mainly on the chess scene in the Movie where Alice is as big as the pawns, and another interesting scene which is when she Fights the Queen, the main enemy of the whole plot. here there is the link of the scene I’m refferring to:

I though that it could be interesting and challenging making a VR game, where the player is on a sort of distorted – chess board, on multiple levels, where the aim is to survive all the enemies that he/she encounters on the way, which will be the pawn and other random obstacles. To make it more friendly for everyone I decided thta the player does not have to follow any chess scrict rule, infsact to avoid the other pawn the player can jump run or climb, but instead the pawn will only move following the rules. My main inspo for the interaction was this scene from Harry Potter where the characters are in this huge chess board and have to fight agaist the pieces following chess rules in order to survive,.

First Steps:

Scene Setup

To actually start working on my project I usually start by modelling onMaya my main elemets in the scene. In this case I started on the path that the player will play on, by modelling it and giving a basic maya texture to make it seem more like a distorted chess board.

Game path 3d model

Unity SetUp:

  • sketch an idea of how it will look
  • 3D models for the environment (mushrooms, chess board, cards)
  • Color scheme
  • set up the scene in unity
  • add skybox
  • basic animation for chess pieces by keyframic position & rotation & scale
sketch: idea of the scene set up: yellow pieces are the enemies, king and queen are on a dedicated arena for the final part of the game.

since I didn’t know how to play chess I had to look up the basic chess pieces moves and just wrote them down on my sketchbook to remember them easier

a little bit of basic of chess rules to make the animations truthful

Color scheme/palette

I decided to go with highly saturated colors to give the feel of a srong, unnatural environment, and also something a bit scary.

to give the dreamy feeling I added a cloud shader to the chess board and activated the “fog” option in the inspector

result:

How it looks on Unity

First animation of the pawn

I created an animation and than copied it in the animator, made the speed negative in order to play the animation back more smoothly.

Second Step:

Coding

After giving a general shape to what my scene would look like, with the main path and couple of environmental elements, I focused of the actual mechanics of the game that involves coding, to make it an actual survival game.

Deactivate objects when far from player

When I played the game all the chess pieces where showing up at the same time so I needed to find some way to make them appear gradually as the player gets closer to them.

this script requires referencing with Player, the Pawn and distance. It checks if player is in range with a pawn in a certain distance, it will activate the pawn in the scene, or else the rest will remain hidden. This function will loop for each pawn in this distance.

this script is assigned to every chess piece on the path. it calls the Item activator script which is in the hierachy where I set up which distance from the player I wanted to activate the enemies.

script applied in the game:

Collision, Detection & Game Over script:

The main aim for my game is to try to avoid the chess pieces in order to survive and win the game. I needed a script that would:

  • detect when the player collides with an object tagged “Enemy”
  • load a UI canvas when this happens with retry and quit button

Score System

To make the player understand how far they achieved in the game, I added a simple score system that just says how far the player went using numbers. Youtube video

script: Uses player position and a UI canvas with a text score starts at 0 and procedually increases.
Score starts at 0 and procedually increases as far as you get
how the score system looks in the project at the moment

Platform Movement

the path is developed in 3 levels. to go one level to another there is a big step that you can not climb up, therefore I made these moving platform that work as lifts because can transfer the player up and down just by stepping on it. Link for the tutorial I followed:

this script make the object in th ehirarchy names Player a child of the platform, this means thta the Player will behave like the platform and following its movement and position.

Queen & King Movement following WayPoints

King Health bar

In the video I show how the health bar goes red as I decrease the value. if the value is 0 the king gets destroyed an a particle system is activated.

Ball spawining & VR interaction

this is the main interaction in VR with the player. the player has to pick up the ball and throw it againt the king to decrease his health and destroy it in the end. Had some technical issues:

  • balls where not colliding with the king and decreasing his health
  • balls where spawning continuously without getting destroyed.
this is the script for spawining the balls in the arena. ball are spawned in a specified area using vector3 (X;Y;Z position to determinate the area) and max number of balls in the arena is 3 otherwise 1 gets destroyed.

as it can be seen from the video it is spawining more than 3 balls per time. I decided to keep it like this because trying in VR is easier to pick up the balls since the playre has more possibilities and it also fits the crazy aesthetics.

this is the script I had to add in order to make the balls interactable in VR and to destroy the balls when in contact with the king & Queen and the floor outside the arena.
  • Balls are tagged “Ball” when spawned, but when picked up by the player it changes in to deadly to decrease the king health.

Final Touches

As it can be seen from the video it needs to:

  • Optimize UI regarding Score, Win & loose Panel image and buttons
  • Add background song
  • Add more 3D elements in the environment

ShowReel

I made a short showreel showing a little bit of everything I’ve worked onto meke this VR game. the song is the same that I’ve used in the background in the game Aphex Twin – Elio

PowerPoint Presentation

https://drive.google.com/file/d/1s-jBtrfTV5ikGLW2QIL5Zkzmdn3DBwat/view?usp=sharing

APK File

Here there is the apk of my final project:

https://drive.google.com/file/d/1s-jBtrfTV5ikGLW2QIL5Zkzmdn3DBwat/view?usp=sharing

Reflection

I’ve enjoyed a lot working on this project, I went though a lot of challenges since the beginning starting with the idea which changed a lot troghout the process, to building the mechanincs which required a bit of coding. I’ve learnt a lot more about C#, I’ve noticed that since last year my understanding of the language has improved a lot.

Checkmate VR is a VR survival game that challenges the player to survive a long distorted chessboard full of enemies, which are the basic chess pieces jumping around and moving following chess rules. The final step is to do checkmate by trowing this spiky ball to the King do decrease his health, but at the same time there is the Queen that tries her best to get in the player way.

It is an Immersive Virtual Reality game, where the player can experience a surreal world, which only VR can give, where our usual human point of view is rescaled and everything around us that in real life we are used to see small and innocent is huge and dangerous. I wanted to give another meaning to simple objects of our day to day life creating a whole new journey in this inspired Alice in Wonderland World.

Future Steps

I’m really happy with the result, all the basic mechanics work as I wanted and the visual surroundings are as I was planning of.

In the future I’d like to imrove it on the VR interaction, since during this period I could work on too much due to technical issues regarding my PC, which can’t support VR anymore, and I had the opportunity to see in VR only when I was onsite, which wan’t enough.

To improve the interactions I would have liked to keep the controlers and to match specific kind of hand movement to a movement in VR. for example if in reality you are moving the controllers fast up and down, in VR that means you are running. other wise by moving the controllers left and right that would change the direction in VR. for now a stick to basic movement controlled by the joystick to move in 4 direction and to a default speed.

Leave a Reply

Your email address will not be published. Required fields are marked *