Today I got the projectile sorted out. The player needs to clench their fists when they want to take a shot and a power bar will go up and down and when they reach the power they want they must release their fists and the ball will be instantiated at the end of the cannon barrel with a velocity determined by the selected power.
The grey bar at the bottom fills with a yellow gradient and then retracts and so on until the player releases their clenched fists.. at that point the ball is fired from the point and rotation of the barrel.
The one problem I have come across which is giving me a lot of problems is the fact that sometimes it thinks you are doing a different hand gesture when you're not leading you to fire bad shots of less than 15 power, I tried stopping this by using an if statement only allowing a shot to be fired if the power is above 15. It has reduced the problems but they still remain, mainly due to the sensor capability.
Hand Cannon, Unity3D, Leap Motion
Wednesday, 26 March 2014
Big Progress
Today I have managed to complete a lot of the layout and got a real feel for how the game will play out.
You can see now that I have built the structure that the player will knock down, the structure is made out of a set of blocks all stacked on top of each other. This will make for some interesting physics coming into play with structures being built out of many blocks and seeing how they will all react to be being hit into by a cannon ball.
You can also see how I am trying to contain the player and the destruction area to a "lane", this is to simply to add boundaries and limit the size of structures and to limit the range of player movement. Also take note of the golden block on the top of the structure, this is the goal. The goal is to make all the golden blocks hit the floor enabling the player to progress to the next structure.
Playable Area
I have now finished with the movement and rotation on the cannon, it all works very fluently with the players hands. I am having the odd problem with it losing a player hand briefly causing jerky movement, although this is just a problem with the lighting in the room I have tried to decrease the likely hood of it happening by saying "if two or more hands are showing then move", as apposed to the hand count must equal two. I have done this because depending on the players fingers, head, or whatever else will be near the sensor the hand count can bug out and so I have tried to minimise that possibility.
The next thing I am working on is a playable area for the player. I am doing this as so I can keep the player in a "lane" so that I know where I need to build the structures and so I can control the flow of the game much easier. In the picture below you can see the fence in the background, this fence is a rather large box around the player but what limits the player to that set area, once the cannon reaches it, it will collide and now be allowed to travel further.
also take note in this picture how I have separated the barrel from the body of the cannon, this is so I can manipulate the cannon barrels rotation without changing the body's too.
The next thing I am working on is a playable area for the player. I am doing this as so I can keep the player in a "lane" so that I know where I need to build the structures and so I can control the flow of the game much easier. In the picture below you can see the fence in the background, this fence is a rather large box around the player but what limits the player to that set area, once the cannon reaches it, it will collide and now be allowed to travel further.
also take note in this picture how I have separated the barrel from the body of the cannon, this is so I can manipulate the cannon barrels rotation without changing the body's too.
Movement
After studying the control system for the flight demo provided on the Asset store for Leap Motion I have managed to figure out my own control system for my cannon. I now have a basic movement script that picks up the players hands and allows the player to move on the Z axis dependent on the height difference of the players hands.
The next step for me is to get the gradient of the cannon working dependent on the players hand gradient.
Leap Motion
One of the very first things I need to do is to integrate leap motion into my project in order to use the device. I will need to do a lot of learning in order to figure out how to control my cannon with hand gestures and one of my first steps will be to use the demos provided on the Asset store to try and figure out some of the different controls used.
The basic control system for my cannon will include left and right movement based on the Y distance between my two hands and the cannon barrel's gradient will be derived from the gradient of the players hands. I am hoping these controls will give a nice and natural feel when controlling the cannon.
An idea I have had for the shooting mechanic is for the player to clench their fists to power up and shot then release their fists to fire. I am trying to keep all aspects of the controls relatively simple and natural so players with little experience with the leap will pick it up quickly.
The basic control system for my cannon will include left and right movement based on the Y distance between my two hands and the cannon barrel's gradient will be derived from the gradient of the players hands. I am hoping these controls will give a nice and natural feel when controlling the cannon.
An idea I have had for the shooting mechanic is for the player to clench their fists to power up and shot then release their fists to fire. I am trying to keep all aspects of the controls relatively simple and natural so players with little experience with the leap will pick it up quickly.
Tuesday, 18 March 2014
HandCannon
I decided on going for the second option, the cannon game in which the user had to knock down blocks by controlling a cannon and firing the cannon ball.
Here is an early screenshot of the cannon design.
Here is an early screenshot of the cannon design.
The player will control the turret's up and down rotation as well as the cannon's movement along the Z axis.
Monday, 17 March 2014
Initial plans
For one of my assignments I have been given the spec to develop a game with one or more emerging technologies, for my project I will be using Leap Motion and if that goes well, looking into implementing voice too.
The first idea I have is a game which mimic'ed an old popular 2D game, which is, you must eat the smaller fish and dodge the bigger fish and by doing so you would grow, till you were at the top of the food chain. I would implement this in 3D and use the Leap Motion to have sort of a "Flight mechanic" to simulate swimming.
The second idea I have is a game which will allow the user to control a cannon or catapult type of weapon and the idea will be that the player will have to move, aim and fire using only their hands hovering above the Leap sensor and the goal will be for the player to knock down some sort of castle.
The first idea I have is a game which mimic'ed an old popular 2D game, which is, you must eat the smaller fish and dodge the bigger fish and by doing so you would grow, till you were at the top of the food chain. I would implement this in 3D and use the Leap Motion to have sort of a "Flight mechanic" to simulate swimming.
The second idea I have is a game which will allow the user to control a cannon or catapult type of weapon and the idea will be that the player will have to move, aim and fire using only their hands hovering above the Leap sensor and the goal will be for the player to knock down some sort of castle.
Subscribe to:
Posts (Atom)





