Light spell refinement

Finally finished college and all my assignments. Haven’t had time to touch the project until today.

Worked on some refinement for the light spell, slowly working my way through each spell. The light spell is pretty much finished now, all I need to do is make some  additions to particle effects and add in destroy animation for the light pulse.

Basically I added in a timer for the spell. When you hold the trigger down, you have 10 seconds of light. If you run out of time or stop pressing the trigger, after 1 second, a slow recharge will happen, and will eventually give you another 10 seconds of light. It is possible to add on more time to the light by finding small floating power ups in the level.

A feature I was going to include was making it so that holding down the trigger fully used more power, but I’m not sure if I will implement it. I will have to see how the spell works in a real level scenario and then decide.

Other than that I added in an “Unable to use spell” sound effect. I have the push spell working from a few weeks ago and will make a new blog post showing a gif of that in action tomorrow hopefully.


Sounds, Fire and positional tracking

So this week I have been working on a couple of things.

Firstly, I went about getting some sounds for the game. I have some of the sounds for the light spell implemented, but I just need to edit the sound so it matches the spell a bit more.

The main thing I worked on however was the fire spell. It was quite straight forward to create. It works very similar to the light shoot spell, except instead of it being a light it is a fireball prefab. It also gets destroyed upon coliding with an object, unlike the light spell. Once I had this, I started thinking up some good uses for the fireball spell.

One of the things I thought would be really cool would be to add in a way to light up torches to illuminate the darkness. I decided to do this because using the lightspell might not be sufficient to get through the entire world, especially when you might have to solve a puzzle using another spell, which will plunge you into darkness. So now the light spell will be mainly used for getting around and finding torches that you can light up, and also navigating areas where there are no torches.

Here is a gif to demonstrate:


Lighting a torch with Fire Spell

The particle system you see for the fireball is only a place holder and I plan on making it more fireball like. I will be continiously tweaking the fire spell until it feels right, as it is now, it is a bit too hard to make contact with the torches, mainly due to the particle effect not representing the fireballs direction well enough.

I also got the integration for the Hydra and Oculus working together. It is a bit glitchy at the moment but I will be working on it for the next while. The main issue is the Razer Hydra. I think it needs to be held in a certain way for positional tracking to work correctly. I will probably have to purchase a fanny pack and make some adjustments to it and use that to hold the hydra around the player.

Other things I will be working on this week will be;

  • Adding in more sounds
  • Adding lerp to the Levitation spell, this will stop the object from just popping to the end of the wand and instead transition to the player
  • Finding the best area for the Razer Hydra for optimal positional tracking
  • Adding in a force push to the physics spell

Levitation Spell now working

Worked on this yesterday along with the light spell. I have now finished the levitation spell and I am very happy with the result. It takes advantage of both the trigger and the bumper buttons. The way it works is you pick up an object by pointing at it and pressing the bumper button. Once you have the object  picked up, you press the bumper again to put it down. I utilized the trigger button by having the spell utilise the pressure sensitive nature of the trigger.

If you have the object pick up, you can push in the trigger button, and press the bumper button again to shoot the object. Pushing the trigger in fully will give you a max charge, while holding it in only slightly will give it a small throw. Here is a gif that demonstrates how it works:


Physics Spell Charge Short

There are things I still need to add to the spell, such as sounds and particle effects. I also want to try add in some sort of particle system that follows the object, so you can see where you are shooting the spell too.

This is the first part of the physics spells. I will be working on the second part now, which will be a type of “force push”, sort of like what you see in Star Wars. You would use this when you need to move many objects at once. Hopefully I will have something working for that next week.

Fully functional light

So previously I had the light spell working to some extent. The problem was that it allowed the player to shoot as many lights as the game could handle, and they went through walls and all sorts. I finally implemented a way of destroying the lights. Right now as it stands, you shoot a light, it moves until it hits something, and upon hitting something, it sticks to it. The intensity of the light is lowered once it is attached however. The light lasts around 5 seconds, and after that time is up, the light is destroyed and the player can shoot another.

There is more work to be done with the light spell however. I want to add in particle effects to show the light in both instances, when the player shoots one or simply increases the light around them using the Trigger button. I also want to add in a pulse effect, so the light doesn’t seem so static, and it will make the world feel more “alive”. The strobe effect should be easy enough, however I’m not sure how much work will go into the particle effects.

After this is done I can look into adding in some sound effects for the light. Sound will be very important as it will be the only indicator to the player on if they can use a spell or not, as there will be no HUD. So if you use your ambient light spell, and run out of magic power, there has to be a sound effect to indicate to the player that they have ran out of power. Also if they try to shoot a light when there is already one instantiated, they will have to be notified also.

Spell Selection Basics

Not a big post today but I was working on fixing a problem I was having with shooting the light from the wand which is finally fixed! The features I plan on adding to the light spell are as follows:

  • Adding a slight strobe/pulse effect to the light to give more life to the environment
  • Adding in an object pool to handle the light shots so only 1 may be shot at any given time
  • Making it so that when you shoot a light it will stick to the first collider it touches. It will stay here until its time in the object pool is up. It will then dissapear and the player will be able to shoot another spell
  • Adding in some sort of partcile effect to the tip of the wand to make it look a bit nicer
  • Adding in sounds eventually

It will be quite a lot of work. Some of the things may never get finished in time as I have to start on other spells but I think it is good to point out what I plan on introducing to it.

Other than that, I added in basic change spell functionality, which is just pressing buttons on the Hydra and changing the colour of the light, as each spell will give off a different ambient light. I also added in checks to make sure that the Light Spell attacks could not be used while another spell is selected.

Each spell will have to have a unique looking particle effect, so I will eventually add that in along with spell functionality. I have a small GIF showing off the change spell:


Change Spell Early Test

Turned out to be a longer post than I expected, but oh well. I’m going to get to work light collision and the levitation spell next I think.

Light Spell in early stages

Like I said I was going to update the blog with a dedicated post on the light spell as it is right now.

At the moment I have a basic version of the spell working, with the light following the wand around and casting shadows. There is 2 versions of the light spell, one corresponding to the pressure sensitive trigger, and the other corresponding to the bumper button. Each have different uses.

Pressure Sensitive Trigger: This gradually increases or decreases the light depending on how much pressure is put on the button. Having the button barley pushed in will use less magic power than having it fully pushed in. Here is a GIF of it in action:


Early Light Spell Trigger

Bumper Button: This doesn’t use any magic power but it has a cool down timer. This is used when the player runs out of magic power. Right now it shoots a ball of light. I plan on adding in a collision detection system for it so the light sticks to whatever object it hits and will last until the cool down timer expires. Once again, another GIF to demonstrate.


Light Spell Early Shoot

These are both work in progress, I plan on adding collision detection to the shooting light as I said and I also plan to integrate some form of particle effect system, add make the trigger light have a sort of strobe effect. I plan on working on a levitation spell next, which will work sort of like the gravity gun from Half Life 2, and a sort of  ‘telekinetic-magic’ push, which will move objects out of your way


So quite a bit of progress on the Final Year Project front.

I got the Hydras working with a default hand model that is fully animated, this model is provided by the Hydra team, I may or may not create my own hand model, depending on time. I may just modify this hand model to have a wand in it, but it’s not important right now.

I managed to get the basic version of the Light spell working. I’m not going to go into too much detail here as I want to make another blog post explaining it in more detail, along with a video of it, but I am quite happy with it. The main thing I want to do with the Light Spell is have a decent looking particle effect at the end of the wand that gives off a nice source of light. The light source also needs to be adjusted so the lighting is a bit better around the environment.

Finally, I got a very basic positional tracker working. I haven’t tested it with the Oculus yet, but it works pretty good with just the Hydra in place. I took this functionality out for now as I am focusing on getting the spells working and training rooms for each spell.

I’m going to be updating the blog more frequently now as I get more deep into the project, but that’s all for now.