Development Update 3: Character Implementation and Animations

9
The model I was going to make, before realising how long it would take me to build.

 

Before putting a character into unity, there needs to be a character model. Though it would be possible to build one in Blender from scratch, the process would be very time consuming. So instead I’ve opted to download a pre-rigged character model to save time. I may come back and change the model at a later date, but in the meantime a pre-made character model will do.

10

This is the character model I’ve decided to use in the meantime. It is a useful model as it is already rigged and has a walking animation, running animation and an idle animation.

Because of this it will be very easy to implement into the game, it could also be used as a reference or base for when I create my own model.

 

11After changing some values, like size and position, the model has the scripts from the player object applied to it and is put in place of the player prefab. The model is now in place of the red square. After changing some collision settings and stuff to fit this new model, it works. However, the model has no animation, so is rather motionless. To fix this we need to create an animator controller. Because This model has a walking and running animation I want to create a run button and a variable that changes the animation depending on the speed of the player. After some changes to the script, it’s time to incorporate the animations.

13
The blend tree with 3 animations

A new input to the game is added and the animation window is opened. I create a blend tree, which is essentially how Unity transitions from one animation to another, to make gameplay appear fluid. Because there are 3 animations that need transitions between them (idle, walk and run), there needs to be 3 motion fields.

14

After some more debugging and changes to the player physics and controller, we can see that the player animations now depend on the variable, that is the speed of the player. When the player isn’t moving (speed=0) the player is in the idle position. As the player picks up speed (speed=8) the walking animation begins. When shift is held (Speed=12) the run animation begins. Because of the blend tree, this all looks nice and fluid.

Development Update 2: Player Spawn and Camera Tracking

56

 

 

 

 

 

 

 

 

7
On the left we see what the game looks like. On the right, we see the mechanics and how the objects interact. This includes the camera which is following the player.

I’ve created 2 scripts. One determines the player spawn in relation to the camera and the other is the movement of the camera.The new settings means that the player object has been turned into a prefabricated object that’s part of the game manager script. Instead of being apparent from when the game is loaded, the player will now spawn into the central camera position and be followed by the camera.

In the camera’s script there is a void, which is the camera’s target. This void is filled with the prefabricated game object, which is the player. This means the camera now follows the player… Or at least that’s how I explain it to myself in my head.

 

 

8As indicated earlier, we can now see that there is not initially any sign of the player until the play button is pressed and the script starts. Once started, the player spawns and can be controlled.

 

Early Alpha

Here is the (extremely) early build of the game from the previous post that you can download and run by opening the 2.exe file. The player is controlled with the left and right arrow keys to move and space bar is jump.

Development Update 1: Physics and Controls

iphone 61Though I majorly considered building the game in GameSalad, unfortunately it keeps crashing. So instead I’ve opted to develop Carrot Bomb in Unity. Though this mean development will be more challenging and likely take longer to build in Unity (rather than GameSalad), it also gives the game more potential. Unity is far more advanced. Although the scripts will be hard to write, there is essentially unlimited potential compared to the simplistic drag and drop system in GameSalad.

 

1Before any  design element comes in, we must first start with the mechanics of the game.So, to begin with I’ve created 2 objects, the floor (green) and the player (red)

2Next the scripts have to be written. One of these scripts will be the commands that the player inputs, the other is the physics of the object in the game-world. This will all determine how and which objects will be affected by gravity and how objects collide. To make objects collide, there needs to be a selected layer that  can be applied to objects (like the floor) that determines whether and how they interact.

3To ensure that there are no errors in the code, the game is now tested in Unity by pressing the play button. Fantastically, after glossing over a few minor errors, the code works fine, an the cube is now controlled by the left and right keys, and the space bar to jump.

4If I duplicate the ground object (green) and place the duplicate somewhere else in scene, the player object can interact with it too, and even jump on to it. From here, all the base is set out to create a very simple obstacle course, essentially. However, the camera doesn’t follow the player, which means it remains stationary in the original position. This is something we’ll tackle next time… With more coding!

 

Habitica: Using Gamification to Create Habits

unnamed
My Habitica Dashboard

Habitica (https://habitica.com/) is a free iOS, Android and web application which uses gasification as a way of creating habits. The app lets you input goals and, as you tick them off, gives you credits and experience points. This game allows a player to create a character and battle monsters as they complete their goals. This use of positive reinforcement, I think, is a really good and accessible use of gamification. Habitica has earned a lot of credibility and has been featured by Forbes, The New York Times and Discover.

Though this service has the ability to be used to influence a healthy lifestyle, it doesn’t primarily target health and fitness. If it did, it would be a great way of inspiring young children to live healthily. The fact that it gamifies aspects of life means that it would be a fun and potentially competative way of incramenting healthy habits and abolishing unhealthy habits in a child’s day to day life. Habitica doesn’t seem to be targeted toward the audience of 8-11 year olds whom I want to reach. The stylisation and optimisation of the app doesn’t appeal to allow ease of use for a young child, and I don’t believe would be entertaining enough for a child in that demographic. Though the app may be a good gimmick as an aid to change habits, I believe the gasification aspects of it could be more optimised toward the game side to make it seem like more of a game and less of a lifestyle app.

How could it be targeted to a younger demographic?

1. The registration process of the app requires a Facebook, Google or email account. Despite more and more children having access to these things in this digital age, I believe that this process is unessential and uninteresting for 8-11 year olds. Being able to immediately create a character and start playing for be far better suited for a younger audience.

2. By allowing more focus on character creation creation, it would allow the user to have a higher level of attachment to the avatar. Habitica’s current character creation isn’t heavily focused on and is a lot more passive, besides weapon and armour upgrades.

3. A higher focus on the game and gameplay itself instead of on lifestyle changes would make the app more entertaining and would help retain attention of younger players. Yes, some focus on lifestyle changes are crucial, but this should appear secondary in order to disguise the less exciting aspects.

4. If a competitive aspect was added (i.e. a way to battle and challenge friends or other players) it would give another motive for players to continue playing and level up. For example, if the way to level up the character, gain experience and ready the character for battle was eating healthy, then the player could battle friends with these characters it would give the player great initiative for a healthy lifestyle while having fun.

5. An issue with the app is that it can be exploited with false data. Though this is an issue that is extremely hard to tackle, there could be ways to at least help prevent it. If with each action photographic evidence had to be provided or even something as small as a written example of why experience was earned it would help with the prevention of cheating and griefing. Another thing that could be added is clear guidelines. With clear guidelines, the app would be more understandable and there would be less room for error in terms of the player reward system.

6. Though Habitica works well as an all-around habit altering application, if it was optimised towards one clear goal (like healthy living) there would be a lot less ambiguity and balance. If it were optimised, it could categorise activities which would make it easier for young players to follow, as well as incorporating suggestions for activities and possibly even daily challenges (like “do 10 push ups” or”eat a vegetable”).

7. The stylisation of the app isn’t fun. It’s simple and easy to understand, but it isn’t exciting. This is probably because it doesn’t necessarily need to be, as I imagine it’s demographic as it stands is probably teens and young adults who are looking to change their life styles in a more interesting way, as opposed to play a fun game. A less business-like layout would be more appealing to a younger demographic. It could be improved if it actually resembled a game more with original graphics and interface, opposed to looking like thousands of other application.

8. Adding more activities within the game/app would make it more immersive. Like telling the player to do exercise to earn an achievement or complete a quest. Instead of being a passive app which logs when you complete a pre determined action which the player has set, there could be challenges that the app gives the player. Again, there could be daily quests and/ or a storymode. If there where different levels of storymode, like different levels (in 2 sense) of physical activity that get harder as the player progresses. and the daily challenge was to have a healthy meal.

 

Overall, this application has provided a lot of food for though and inspiration in terms of a gamified application which could be used to get children to be more healthy and active.