2014/05/26

Sneaky Ninja - Level Design

The last two weeks have been very stressful, lots of work have been done in order to finish up our game for the beta that was last week and the final presentation on GGC this week. I've worked on a lot of features, implementing GUI, creating highlights for all the items and abilities, implementing sound effects and music, as well as doing general tweaking and bug fixing.
But the most fun and interesting thing I have been working on are the levels, I have designed and implemented three levels into our game. In this blog post I though I would do a quick breakdown of one of the levels explaining my thoughts and methods when I designed the level.
The first thing I did was deciding what kind of difficulty I wanted the level to be, when I started working on this level we already had a easy introductory level and a second a bit more advanced level, therefore I decided that this would be a harder level, so that we get a nice progression in the levels. Now it was time to figure out what the level actually was going to be.


I took inspiration from old Japanese fortress/castles and decided to try to create something similar for my level. As our game is basically 2 dimensional when it comes to the actual gameplay, it was not possible to create the layered effect, with several levels, of a real Japanese fortress. Instead I settled for having several layers of walls that the player would have to penetrate to simulate a castle like structure.


This is what the layout for the final version of the level looks like, a fortress with a outer wall, a inner wall and finally a small building where the secret plans are hidden. The major challenges for the player is to traverse the two walls, both have two entrances that require different items and strategies to use. It is possible to use the grappling hook item to climb over the outer wall, but the inner wall is protected by bamboo spikes making it impossible to climb with the grappling hook, this is so that the player is forced to go through one of the entrances to the inner keep. 

Guards at the main entrance.

Guards patrolling inside the main entrance.


Our game encourages planning, different strategies and choosing the right items for a certain level, therefore we always have more than one way to approach the objective. On this level you can either enter at the top through the main gate. Here there's a large collection of guards patrolling, this might look discouraging but with good timing or use of a item such as the distraction bomb or a smoke bomb, it is possible to sneak past this group of guards, the bushes inside the first entrance are also a excellent hiding spot for the player when planning their next move. To enter the inner fortress the player has to maneuver around these two guards, they simply rotate around the barricade in front of the entrance, by walking behind one of the guards the player can easily slip past and into the central fortress. But, in order to throw some wrenches into the players path there exists a third guard that has a longer patrol path around the entire inner fortress, if the player is unwary this guard might come around the corner at an inopportune time, catching the player between two guards.

An unexpected guard!

Inside the fortress.

Once inside the fortress there's three guards, one patrolling in front of the entrance, another walking in a L-shape in front of the door to the inner building. These two guards have overlapping vision cones making it hard for the player to slip by unnoticed. In the building there is a circling guard, here the player can use the dash to quickly move through the room behind the guard, or use an item such as the smoke bomb or shuriken to distract the guard for long enough to steal the plans. The player has to be careful not to get corned in the inner room as there is only one way out. 

When the player has the plans he will also have to escape with them, there is another way that the player can take, but that way I won't explain here, you'll have to play the game to try it out yourself, be careful to not use all your items on the way in though, as you might need them when escaping! 














2014/05/12

Sneaky Ninja - More items!

 This week I worked on finishing the final two items for our game, as well as implementing the item selection system, so that players can choose three items to use in the level.


Grappling hook, fire cracker, smoke bomb, shuriken, four of the five items in our game.

The two items I coded are the fire cracker/distraction bomb and the camouflage item. These items where a lot more simple to code smoke bomb and grappling hook I worked on last week. The distraction bomb can be thrown up to two tiles away from the player and will then generate a sound that draws all guards within a certain radius to come and investigate the sound. In order to "simulate" the sound from the bomb I used the same path finding system that we use for the movement in the game, this way sound won't travel through the walls in the game. The bomb uses the path finder to figure out how far away each guard is and then alerts all guards that are within range of the sound, these guards will then walk towards the source of the sound and then return to their patrol paths if they don't find anything.
The second item was the camouflage item, this item simply allows the player to become invisible for a number of turns, but only if they don't move, this item was really simple to code because the support for non transparent tiles is already in the game and could easily be manipulated to support the item.
My final big task for this week was to implement the item selection system that I created earlier so that it could actually be used with our game. The selection system uses a list of items that are simply a name, an icon and a ID number, once the player has selected the items he/she wish to use and starts the level the game will activate the item components in unity corresponding to the item ID.

This was a very short blog post as I have not encountered any big issues during this weeks work.

2014/05/05

Sneaky Ninja - Alpha bug hunt & items!

The first part of last week was spent on hunting down and eliminating some pretty nasty game breaking bugs in our code. We wanted to fix these bugs before we started working on the final feature we needed for our alpha, the items. Writing and reading about bug fixing is not very fun or interesting so I'll tell you more about the second part of the week instead, where we implemented the three items we decided to use for our alpha, the smoke bomb, grappling hook and shuriken. 

Concept art for the shuriken and grappling hook.
The items I coded where the smoke bomb and the grappling hook. The smoke bomb works by simply pressing the item icon in the HUD which would make the player throw a smoke bomb at his feet making the current tile he's standing on and the four adjacent tiles fill with smoke for two turns. Guards can't see through the smoke letting the player escape unnoticed. 
The grappling hook is a bit more complicated, the player clicks the item in the HUD to select it, he can then click an tile adjacent to the player character that contains a wall, the player character would then climb over the wall to the other side. 

Implementing the smoke bomb was relatively easy, we already had code for making tiles "blocked" so that guards can't see through them, the only problem I encountered was when I tried to make the tile only blocked for a certain amount of turns, we did not have any way to check what the turn the games was in and so I implemented a quick variable that stored what turn it is, when I had done this it was very easy to make tiles blocked only for a certain amount of time. A pretty stupid mistake I made was that I when testing the smoke bomb in my Unity scene I only changed the colour of the tiles that the smoke bomb was effecting in order to show the effect instead of adding the smoke effect created by our artists. When we ported the smoke bomb into the alpha scene where we had real textures on the floor tiles it was not possible to see what the smoke bomb was affecting. I did not have time to fix this before we had to show the alpha so this is something I will work on this week, I will also add the animation for when the player is throwing the smoke bomb, this animation is not done yet therefore I could not add it to the alpha.