On day 22 I did the GODD of the SinC, the CustomPlayer, and the gun shoot.
The first thing I did today was the GOD of Sync (Shooting Into Cubes [name that thought for now]). I will not explain how the GOD is, it is easier to see:
1. Executive
[indent=1]1.1. Game Type
The game will be a first person shooter puzzle.
[indent=1]1.2. Name
The name of the game will be for now SinC (Shooting Into Cubes).
2. Game Elements
[indent=1]2.1. Gameplay
The goal of the game is shooting into cubes in order to take them to certain areas. To do so the player will have a weapon capable of:
- Change the projectile velocity.
- Change the projectile mass.
- Change the projectile impact.
- Directional.
- Blast.
- Gravitational.
- Directional.
[indent=1]In addition to this weapon the player will also have the ability to stop time to prepare and plot the best strategy. While stopped in time the player can shoot projectiles, which also froze and returned to their trajectory when the time flow is restored.
[indent=1]2.2. Game Pacing
As the mechanics of the game will be very repetitive the game will aim to be casual, where the player doesn't need to follow stories and other elements.
[indent=1]2.3. Target Audience
The game will target audience of players who enjoy first person shooter and puzzle without age restrictions, because the game doesn't contain any violence or situations that may cause discrimination.
3. Story Elements
[indent=1]3.1. Synopsis
Not applicable.
[indent=1]3.2. Setting
Not applicable.
[indent=1]3.3. Player role
Not applicable.
4. Interface
[indent=1]4.1. Perspective
First Person Shooter.
[indent=1]4.2. Mechanics
Basically the game will feature a main menu and one where the player will be able to choose the level you wish to play.
[indent=1]4.3. Control
- Player's movement.
- W - Forward.
- S - Back.
- A - Left.
- D - Right.
- W - Forward.
- Mouse.
- Right mouse button.
- Mouse scroll.
- Mouse scroll when Ctrl pressed.
- Mouse scroll when the right mouse button pressed.
- 1, 2, 3 of the keyboard.
- Shift.
PDF version: Download.
Where I found (it has more models): Access.
After that I found here on the notebook, the prefab of a first person controller that I had made following a tutorial of FPS (I call CustomPlayer). He has the camera movement much smoother than the Character Controller that comes by default in Unity, actually I haven't looked too in the settings to see if it can achieve the same result.
In the videos below you can see the difference.
Character Controller
[media]
[/media]
Custom Player
[media]
[/media]
See for yourself:
The tutorial is very good, the author explains each line of code. Start watching here.
As CustomPlayer was ready I just needed to integrate with the gun. At this point I found a problem actually is the difference of coordinates between Unity and Blender (in Unity Y is up and Z in Blender is up). As the script places the gun in the direction of the camera (the player's eyes) and the coordinates are different, the gun stood aside. One way to solve this would be to change the script, but it would be very complicated, because I would have to keep the coordinates swapped. I researched and resolved in a way that is in Unity's own documentation (here), place the object inside an empty object (Like the empty object is created within Unity the coordinates are equal), then any manipulation should be done through this empty object .
After I fixed the position of the gun, making the shooting script was pretty easy at the moment it is only changing the projectile speed.
[media]
[/media]
Test here.
[size=2]PS: Sorry for the bad english.