Interactive Narrative Development Blog

Today I am going to start the creation of my interactive narrative. I have gathered all my assets and I am ready to put them all together in my chosen software, which is Unity. Im glad im using Unity this time around because I haven’t had a chance to use it before, so this will be a new learning experience for me.

After creating all my assets needed in order to create my game, I imported them into unity. Some assets were sprite sheets so I had to slice them as well as convert all the artwork to a 2D sprite format, so i could use them in Unity.

Importing Assets 

 

Slicing assets was very simple as there is an option to auto slice them and create a number of sprites. This is available after changing the sprite mode to multiple.

Adventure Creator 

I decided to use a addon within Unity called Adventure Creator, in order to make my development process a lot quicker. What this addon does is make a lot of presents, which make it a lot simpler to create a game from scratch. Unity is very heavy for writing scripts in order to get your game working, so AC does as well is make it possible to create a game from blueprints much like other softwares, such as Unreal Engine.

Adventure Creator is a great addon that I highly recommend for anyone using unity. It has a game manager tab that makes adding assets, scripts, cameras and much more so much easier and straightforward

.  Creating The Scene 

My first step was adding all the graphics I made into the scene. This is done by simple dragging the assets into the game world. I made use of photoshop to make a lot of them into different layers and this will help me later on down the line, for when I add a parallax effect.

Art assets in game.PNG

It was import to maker sure that the layer of the art asset was on correct to set the scene correctly, so it’s laid out the way you want. You can simply change the layer level with an option in the inspect menu tab.

asset-layers

NavMesh

I then decided to set out a Nav Mesh, which is an area in which the player can navigate around. This is simply done by adding a new Nav mesh in the AC editing menu and scaling to the area you want the character to be able to move in. I had some issues with the character clipping through some of the assets like the tree and the helmet, so I decided to add a collision box attached to the Nav mesh so this issue wouldn’t happen anymore.

To add a collision box I just created a new GameObject added a component of a polygon collider and shaped the collider around the tree’s base and the helmet. I also made it a child of the original Navmesh to make scaling it all a lot easier.

Game Markers 

I made use of the Game Markers to show Unity were I would like the player to start when they are in the scene. To add one in I went to AC editing tab and added a new marker, which I dragged to the position I wanted and then set as the scenes default player start marker.

Game start marker.PNG

Importing and Setting up A Player 

To start off I created a new empty GameObject and then tagged it as player. I then added the component player.

tagging-object-as-player

player-comp

Animation 

My next step was to get my character animation. Adventure Creator has a very clever way of doing a fair amount of this for you, But I first had to set up the animations myself. I dragged my character into the scene which brings up a create animation option. I used different stages of my sprite sheet as key frames to make walk up, down, left and right animations as well as idle ones for when the player isn’t moving.

Animating Sprite.PNG

It is important to name the animations correctly so AC can pick on which animation to play depending on the direction the player is moving. For example to walk right, you would name the animation “Walk_R”. Then all you had to do was type the animation name you wanted in certain boxes and AC would works out the rest.

Setting anims.PNG

I then made the beginning sprite a child of the player object and added a player controller, which was in the form of an animations controller. I then dragged that into the sprites animation controller box.

Dynamic Layering 

My player still had issues with clipping behind the tree as his layer was lower than the tree and it didn’t look very good in general. I decided to add a sorting map, which makes it possible for the player change layers dynamically depending on his position within the scene. In the AC editing tab I added a new sorting map and applied two markers within my NavMesh. One marker at the top and one at the bottom. I changed the values of what layer order he will be on for both markers, as well as the scale of the player so he changed size depending on his distance from the camera. This adds a great dynamic element to my game making it a bit more in depth.

 

Nav Cam

The camera at this point is very static, so I made a camera to follow the player around the scene. To do this I added a 2D NavCam in the AC editing tab and adjusted the settings so that the camera didn’t got past the background of the game(this is known as a constraint). This was very simple to set up because of the presents that Adventure Creator has.

 

Parallax Effect

I added in a parallax effect to the game to make the game seem less static. I need to most of my in game art work, such as background and trees. I was planning on doing this from the start, so this is why I imported my art  as different layers. To do this all you need to do is add a Parallax 2D effect component on the sprites you want affected and then just adjust the settings to your liking.

parallax-ef

Interacting

The next step was to make objects and NPCs intractable for the player. Again Adventure Creator makes my life a lot easier by having a bunch of features that help in this area. To add an interaction into my game I just went into the AC editing tab and added a Hotspot. This creates a yellow box that when in game you hover over it with the mouse you can have a number of interactions with it such as talking to or examining.

Hotspot.PNG

I added one for the Magicaltree, the helmet and the golden coin. I simply rescaled the yellow boxes to fit the sprites the best I could.

Hotspot in game.PNG

Within the Inspector tab you can create and interaction for that hotspot. For the helmet I simple created an examine interaction within the hotspot inspector. Adventure Creator makes very easy with tabs that create blueprint trees to decide what happens when you interact within something.

I made it so when you inspect the helmet the character says some dialogue. This is done by changing the blueprint to dialogue play speech that comes from the player.

For the tree it was a lot more complicated because it is a talking npc. In the same way I set up the player I created and empty GameObject, made the sprite a child of it and then added a component of an NPC script.

NPC.PNG

I then added two interactions, which is talk to and examine(right click as default).

Adding Conversations. 

To add a conversation I went to the AC editing tab and added a new conversation. I linked this to the tree Hotspot and added a number of speaking options for the player. Adventure creator has the scripts already in it for UI and a number of other things so all I had to do was add the words.

I liked the interaction with the tree in the tree inspector tab to make a blueprint tree I used to make the conversation.

Tree talk.PNG

Also for all my interactable objects or NPCs I added marker so that the player had to be close to the object before interacting with it, Before I did this he could talk to the tree across the map and it look good at all. This was done in a similar way to the player start marker but just used them as simply points the player walked to interact with things.

Tree Blueprint 

To make a conversation with the tree I used a blueprint system. This is where it gets a bit complicated, so i’m going to try and keep it as simple as possible. I started the first blueprint as the conversation I set up earlier to have a number of different option for each line spoken.

tree-convo-start

I then added the back and forth dialogue with the tree and the player by creating dialogue action blueprint and then linked those dialogue actions back to the conversation blueprint, so when it was finished it went back to the convo options.

simple-dia

In game Convo.PNG

did this for each line of the conversation I did earlier. However I didn’t want all of the conversation lines to be available from the start. To make this happen I added a dialogue toggle option blueprint, which I set to for when that line of dialogue was finished it would unlock the next one I wanted to lead on from that one. Then linked it back to the conversation start.

Toggle Dia.PNG

I also left the last dialogue option blank so it would kick the player out of the conversation.

Inventory Interaction 

I wanted to make it possible for the conversation to advance by collecting an item and giving it to the tree. This was done by making a hotspot again for the gold coin and making intractable (as stated above). I also added an item that can go into the player’s inventory. In AC editing tab I want into the inventory tab and created a new item. I added the sprite as the texture. Adventure creator already has an inventory UI that I used.

I then added an interaction with the coin in the hotspot inspector tab and created a blueprint to decide what happens with the object. I made it so that the sprites visibility was disabled as well as the use of the coins hotspot. I then made it so that the coin went into the player’s inventory and finally for the player to say some dialogue.

Blueprint coin inter.PNG

The step was to edit what happens when the player gives the coin to tree. This is done in the inventory tab that’s in the AC editing tab and this works much like creating an interaction with a hotspot. In the tree NPC tab you can create a new interaction when using an item. I made it so when you drag the coin onto the tree the coin is removed from the player’s inventory and the tree says some dialogue.

give-coin-bp

I also made a action list that makes it so if you use the item on something that doesn’t have a set responses it comes up with some dialogue. This is done by setting a global unhandled event blueprint in the inventory tab.

unhandle

To make it possible for the tree to have different dialogue depending on whether it has been given the coin or not I need to create a variable, which just states whether or not the coin has been been given to the tree. To do this in the AC editing tab under variable I just created a new local variable and set it as a boolean.

Vairable.PNG

I then need to let the game known that that variable was true went it is given to the tree, so I went back to the give coin interaction I made earlier and added a set variable section and made it true.

set var.PNG

This allowed me to make more options available in the tree conversation screen that only appears when this variable is true. I went back to my conversation blueprint and added a variable check section.

var check.PNG

This states that if it is true it unlocks more options with the toggle dialogue blueprint I used earlier. This was the last piece I need to make the conversation more complete. When it got to the end of the conversation I decided it should end the scene with an engine end game section.

end-game

Opening cutscene 

Original I made a animated cutscene, which can be found in a previous post but I am not able to add videos with the package of Unity I own so instead I decided to make a small cutscene within the game.

This is done by going to the AC editing tab and creating a new on start cutscene, which basically plays it when the game first starts.

on starts.PNG

I wanted to make it so it swooped out from the player and then back and her would do some movement and then finally say some dialogue. I started by creating a new camera and moving it to where I wanted the player to see. I then added to the on start blueprint the process I would like it to go through which was the camera to switch to the one I just made in a smooth manner and then switch back. I then got the player sprite to face right and then down towards the camera and say a few words.

opening scene BP.PNG

I really like the effect of changing cameras and decided to use it for the examine tree interaction as well. I made a new camera called Treecam made the smooth switch in the blueprints and got the player to speak some dialogue.

tree examine.PNG

This is the processes I went through in order to complete my games first scene. Again Adventure Creator was a great help in making this and made using Unity for newcomers a lot more user friendly.

Self Assessment 

Overall I am happy with my end product, but there are defiantly some areas I will improve next time around when making a game like this. I am glad I made the discovery of Adventure Creator as it has made a lot of the UI and scripting tasks a lot simpler. I really like the way the inventory system works as well as the interactions and conversation trees.

There are many aspects I feel need massive improvement. The main area I feel could use a lot more work was sound, which is a shame because I spent a lot of time acquiring and editing sound assets for my game. I just couldn’t figure out how to incorporate it into my game apart from the music. I wanted to include foot steps as well as noises for when you push past bushes, but again I couldn’t get my head around it before the deadline. I also created a whole animated cutscene, which I went through the process of making on a previous blog but I couldn’t addit to my game because of the personal version of Unity I own.

I am happy with the art style of the game because it is a personal favorite of mine and I had great fun creating all the assets. I did however have massive issues with animating my own character model, so i decided to get a spritesheet from online to have as the playable character. I created all other assets myself in Photoshop with exception of the helmet.

Links here:

Player Spritesheet

Helmet

I am also slightly disappointed in my time management. I underestimated the time it would take to create the game as well as the process of creating and editing sound assets. If I planned a bit further ahead I have no doubt I would of been able to complete the extra elements for the game I wanted stated above.

There are definitely a few changes I would like to make to the game, but I am overall happy with my Interactive Narrative Game.

Link To Gameplay:

Fall and Rise Gameplay

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s