This is a Team project I made with my partner, Zhimo Li (Click here to visit his website). We want to create a playable VR game demo that players can enjoy. 
VR Blade fight can be briefly described as a face-to-face melee duel. We have always wanted to create a more immersive and interactive combat, and VR fits our needs perfectly. The whole demo can be divided into two parts: combat and exploration. In the exploration part, the player can freely move, watch the surrounding scenery, get tips, and move to enter the combat part. In the combat part, the player will fight against enemies in the scene.​
My works: 
Health System
Block System
Visual Effects
Optimize Character Animators
Visual Effects
Environment Compositing
Enemy AI


For the rest part of the work, please visit Zhimo's website for more details.  
Game Play Video
The left video is our first version, and the second is our updated version!

What did we update in the V2.0: 
1. add a new training section at the very beginning, the enemy will only have one attack action and can only be eliminated by execution. 
2. add player dialog when entering certain areas, which gives a basic game storyline and improves players' immersive in our game
3. add background music. The music will change with the game's progress. The boss' combat music will switch when he goes into stage two! 
4. replace the old map with a new map. 
5. fix some bugs that affect the gaming experience
8 collision box we made to track player's hand movement
8 collision box we made to track player's hand movement
The code we implement for combat system--collision box tracking system
The code we implement for combat system--collision box tracking system
Enable and disable different collision box based on enemy's attack action
Enable and disable different collision box based on enemy's attack action
One animator I create
One animator I create
Enemy's AI funciton
Enemy's AI funciton
How do we track the movement of the player's hand? 
8 collision boxes
To track the player's hand's movement, we decided to create 8 collision boxes as the figure shows. The outer four collision boxes are tagged as "Large" and the inner four are tagged as "Small". When the enemy performs an attack, for example, the attack starts from the right moving to the left. Then the collision box on the player's left side will be activated. 

To block enemy's attack, player will have to wave their weapon from left to right,  collide with 2 collision boxes, and then collide with the enemy's weapon to block the attack. The number of times the player blocks enemy's attacks is recorded, and this number is related to the condition of performing a heavy attack.
Enemy AI System
As the code figure shows on the right, the enemy's AI was controlled by several coroutines like this. By these coroutines, the enemies can action step by step: generate attack action, attack player, and then move to the next loop. During this process, if the enemy's attack is blocked by player, the update function will stop the coroutine and start a new coroutine that controls the injured status. During this period, the player can do heavy attacks on the enemy to deal significant damage (This heavy attack system is designed and implemented by Zhimo). 

We intentionally reduce the player's normal attack's damage and make the heavy attack really powerful. In this way, we want to encourage player to block the enemy's attack during combat and get advantages by using heavy attacks. 
Enemy's AI function (BOSS)
Animiator
Combined with the Enemy AI system, I made Animators for enemies. These animators are designed to make sure enemies won't be blocked if they are not performing an attack, or get into injured mode if they are not blocked. Moreover, to ensure the smoothy of the combat, some transactions are "Has no exit time" (for example, block). In this case, the enemy will instantly go into blocked action if they are blocked, which gives the player a real battle experience. 

Moreover, each animator is controlled by several triggers and bool, which cooperate really well with the script. 
Citation
Character models and animation: https://www.mixamo.com/#/
Map: Chinese Ink Painting, by Jesse Mario, https://assetstore.unity.com/packages/3d/environments/chinese-ink-painting-249173
Music: Colossal Game Music Collection, by The Indie Devs Nation, https://assetstore.unity.com/packages/audio/music/orchestral/colossal-game-music-collection-88190

Powerpoint for persentation

You may also like

Back to Top