Emergent Gaming Technologies
Mon Oct 09, 2017 2:46 pm
I have a University module called "Emergent Gaming Tech". Basically new technology in the industry such as VR, AR stuff like that. As well as using new tech you can re purpose old tech. A lot of the class went easy and done stuff like VR, Myo Armband and so on. Not these aren't cool techs in the industry i just wanted to do something different.
Thus i have decided to re purpose a DJ Hero Turntable to be used as a controller within Unity.
This was not an easy task at all. The deck came out in 2010. So there is no documentation on it integrating with Unity (from what i searched). I found an old forum post from 2009 of someone experimenting with the deck but via Xbox 360 through XNA. This user had a pre release version.
From that i had to find out the mapping of the deck itself. The forum post i found provided the ground work. Which was a life saver.
Here is an image of the mapping i created for others.
And here is the Wiki for the entire Xbox 360 controller mapping.
I am mostly using the mix side of the deck and i wont be using the turntable itself. To allow the deck to work with Unity i had to connect it via the Xbox 360 wireless receiver and make the deck an input device. The issue is the buttons are completely different compared to the controller. For example. The crossfade maps to the right stick on the controller.
I have managed to get the basic controls working. It may not look amazing but from extensive searching i haven't found anybody else using the deck with Unity. Here is a video of what i have so far.
The main issue i ran into when coding this is the deck knob. The knob has a value from -1 to +1. Seems easy enough yea? Well the issue is that the knob maps around. So if you turn it left and get to -0.9999 and turn a little it more it will jump to +1. This was a major issue as depending on the value or the knob it would set the players rotation. Thus meaning eventually while turning the knob your player would flick to the opposite side. I managed to fix this by multiplying the value by 180. It works a lot smoother now but i will still have to tweak a few things.
I have now been working on the map gen/ building spawn. It's actually rather easy. I make a list of buildings which can be spawned and i make a list of the locations i want them to spawn at. Here is a GIF of it working. Its still early so i need to tweak a few things like buildings spawning inside each other.
I have now added trees, bushes and rocks to the map gen. They sometimes spawn in each other but thats an easy fix.
I have updated the models and edited a few things about the spawning. Here is a new GIF
I have now got to the stage of creating enemies for the game. Basically what i am doing is make the enemies randomly patrol the world. Then every so often they stop and scan the area looking for the player - more on that later. Right now i have set up so the enemy patrols the land. This is done by using the nav mesh system so the enemy will go around an object. When the enemy spawns a random destination is given (marked by the blue cylinder). The enemy would then go to that location. When the enemy reaches the location the cylinder is destroyed and a new location is given. Here is a GIF
As mentioned above i have added in a scan system in which the enemies will randomly stop and scan the area looking for the player. An issue i found was that although the player is being haunted it's very hard to see the enemy. So i decided to give the enemy red eyes so the player can get some idea of where the enemy is. Here is a GIF of the scanning.
To make the game even more immersive i decided to make the enemies be triggered by audio also. I wanted the player to have to creep around the map being subtle to really drive in the fact they are being haunted, but i didn't want it to be too OP so i only made it when the player is sprinting they make noise. I feel this is a fair compromise. I done this with a simple co routine. When the player is running a "sound bubble" expands and deflates. This is to emulate the footsteps sounds. The footstep audio will be louder the faster the player moves.
So when the enemy enters the "sound bubble" they agro and try and go towards the source of the audio. Check it out.
If the bubble hits the enemy the enemy will go into its typical agro state.
I will update this thread the more i learn.
Thus i have decided to re purpose a DJ Hero Turntable to be used as a controller within Unity.
This was not an easy task at all. The deck came out in 2010. So there is no documentation on it integrating with Unity (from what i searched). I found an old forum post from 2009 of someone experimenting with the deck but via Xbox 360 through XNA. This user had a pre release version.
From that i had to find out the mapping of the deck itself. The forum post i found provided the ground work. Which was a life saver.
Here is an image of the mapping i created for others.
- Spoiler:
And here is the Wiki for the entire Xbox 360 controller mapping.
I am mostly using the mix side of the deck and i wont be using the turntable itself. To allow the deck to work with Unity i had to connect it via the Xbox 360 wireless receiver and make the deck an input device. The issue is the buttons are completely different compared to the controller. For example. The crossfade maps to the right stick on the controller.
I have managed to get the basic controls working. It may not look amazing but from extensive searching i haven't found anybody else using the deck with Unity. Here is a video of what i have so far.
- Spoiler:
The main issue i ran into when coding this is the deck knob. The knob has a value from -1 to +1. Seems easy enough yea? Well the issue is that the knob maps around. So if you turn it left and get to -0.9999 and turn a little it more it will jump to +1. This was a major issue as depending on the value or the knob it would set the players rotation. Thus meaning eventually while turning the knob your player would flick to the opposite side. I managed to fix this by multiplying the value by 180. It works a lot smoother now but i will still have to tweak a few things.
I have now been working on the map gen/ building spawn. It's actually rather easy. I make a list of buildings which can be spawned and i make a list of the locations i want them to spawn at. Here is a GIF of it working. Its still early so i need to tweak a few things like buildings spawning inside each other.
- Spoiler:
I have now added trees, bushes and rocks to the map gen. They sometimes spawn in each other but thats an easy fix.
- Spoiler:
I have updated the models and edited a few things about the spawning. Here is a new GIF
- Spoiler:
I have now got to the stage of creating enemies for the game. Basically what i am doing is make the enemies randomly patrol the world. Then every so often they stop and scan the area looking for the player - more on that later. Right now i have set up so the enemy patrols the land. This is done by using the nav mesh system so the enemy will go around an object. When the enemy spawns a random destination is given (marked by the blue cylinder). The enemy would then go to that location. When the enemy reaches the location the cylinder is destroyed and a new location is given. Here is a GIF
- Spoiler:
As mentioned above i have added in a scan system in which the enemies will randomly stop and scan the area looking for the player. An issue i found was that although the player is being haunted it's very hard to see the enemy. So i decided to give the enemy red eyes so the player can get some idea of where the enemy is. Here is a GIF of the scanning.
- Spoiler:
To make the game even more immersive i decided to make the enemies be triggered by audio also. I wanted the player to have to creep around the map being subtle to really drive in the fact they are being haunted, but i didn't want it to be too OP so i only made it when the player is sprinting they make noise. I feel this is a fair compromise. I done this with a simple co routine. When the player is running a "sound bubble" expands and deflates. This is to emulate the footsteps sounds. The footstep audio will be louder the faster the player moves.
So when the enemy enters the "sound bubble" they agro and try and go towards the source of the audio. Check it out.
- Spoiler:
If the bubble hits the enemy the enemy will go into its typical agro state.
I will update this thread the more i learn.
Re: Emergent Gaming Technologies
Tue Oct 10, 2017 2:50 pm
I'm interested in seeing where you take this - keep us updated, and keep up the good work!
Any chance we can get a look at a play-test of the game once you're nearing the completion of the project for the module?
Any chance we can get a look at a play-test of the game once you're nearing the completion of the project for the module?
Re: Emergent Gaming Technologies
Tue Oct 10, 2017 5:12 pm
Dylan wrote:I'm interested in seeing where you take this - keep us updated, and keep up the good work!
Any chance we can get a look at a play-test of the game once you're nearing the completion of the project for the module?
Will do. The game itself isn't the important part. We get marked on how we use the technology in the game. I will of course show the game but it wont work without the DJ Deck so it would only be a video.But yes, i will update this thread regularly
Permissions in this forum:
You cannot reply to topics in this forum
|
|