Thursday 20 March 2014

Scripting & Making things look more Professional. - Title Screen, subtitles etc...

First off my animatic completely helped me with scripting and sound 

I also learned from my last project that mapping out a floor plan of trigger scripting points is a very good idea so I did this again - 

Adding Exit Level in game/ Trying subtitles/ Main menu creation/ Credits Creation
Scripting proved to be a hard challenge this time around I found myself being stuck for hours on sound scripting and trying to figure out how to create a main menu that would link my pages to start the game, quit it and link the player to the credits and back.
I also needed something that would end my level inside the game itself.
I started by working from what I already knew from the last level I made for dissertation i knew that i had a teleport script that i knew how to make and a OnTrigger script for activating sound on impact of a game object, however I knew for this project that this script would not work properly as it is a poem being narrated and I didn't want the player to have the poem repeated to them if they stepped out of the box collider and back into it again, it would ruin the feel of the game and the professionalism of it too. 
So i started to search the internet again for scripts that would help me and I literally spent about four hours looking, finding scripts, working them out, entering them, messing about with components, only to find that I was doing something wrong. 

I made a list to help me along my way jotting down the scripts that worked and ones that didn't so I knew which ones i had already used and which ones i could use in the future for other projects.
Here is the list below-

I also went on digital tutors to get a better beginners understanding into scripting in unity

Creating an Exit Level Script

I kept my teleportation screen as a back up plan B just incase I couldn't figure out in time how to end the level, I will go into detail later on of how i did this. 
At first I thought about screen fading only to find out that this wasn't possible. The video was insightful and interesting though. 






I went through several scripts trying to figure out what the heck was going on but it proved difficult. 
I found that in the end to load the level up you had to only have on script in it. 
It took my a while but i finally got there in the end and i know now for next time what i did right and wrong. I learnt quite a few good scripts too. 

Here is the code i used to make my exit level screen. I used an image plane and the word QUIT in the fancy writing i used in the title to act as something a player could interact with to leave the game. I scripting the sound well so even if the player wanted to adventure around the level again they would not here the poem again only the scripted sound effects of the waterfall and environment etc.
I thought that giving the player the option of when to quit the game would give them more control and feel to the game as players like this sort of choice and interaction. 



This video was vital in helping me -

this one was interesting but useless for this project

this one helped and was interesting 

Trying to create subtitles in Unity/Script them.
I had a look around the internet as i thought that subtitles would look really cool however i ran into a lot of people wanting you to buy things and download tool kits and things so i thought this was a  little out of my price range and out of my skill set as this was new software we were downloading into unity. I didn't have enough time to learn and do this but i will look into it again as i would really like to know how to do it, it creates a much more fulfilling interaction between the player and the game and just gives the feel of the game that all around polished look. 


Creating a Main Menu in Unity
This turned out to be a lot of fun and so easy to do!
I used my head and used the same script for the credits and main menu start and quit script but i played around with the code a little bit and inside the build and run settings so that it would know which scene to load next etc.


Heres what i came out with in the end I made the background in photoshop and used DAFONT.com to find a nice medieval title to fit in with the style. I decided to go with black and white over colour as it is set in the olden days so i thought this type of thing might suite the style and tone of the piece, simple yet pretty and effective. 
I'm really happy with the out come of this menu i placed the titles where i wanted them and added the scripts which turn them red and make them selectable and place you into the correct location when clicked :)
Making and adding this really gave the level that finished off polished feel to it It is now pretty much ready for hand in and the end of year show and I'm happy with what i have produced. 
I also added sound to the title screen that is in the game itself like they do in mainstream games as i thought it created a nice atmosphere for the player before the level was played this happens in all indie games, games on steam etc and looking at Dear esther and flower etc... All those games are based around music and sound like mine is so i thought it was essential to place this extra feature into the title screen main menu and the credits also. 


Here is the script i used-

Creating a Credits Page in Unity
At first i tried to get a little fancy this was whilst i was thinking about making the fade screen i also thought it might be easy to make a scrolling text down it but the internet made it look really hard, telling people to download this and that, 2d text tool kit, GUI texture this and that. 
So after a while of looking and finding little answers and way too complicated scripts that i don't understand yet (but i tried!) 
I decided to scratch the scrolling titles and go for something a little more simple.

I copied what i did in the last one to make the game menu screen by creating text in unity and then adding box colliders to the words, i then changed the text and MADE SURE THAT THE IMAGE PLANE WAS IN FRONT OF THE PLANE other wise you could not hover over the word and it would not go red and be clickable, this took me a while to figure out a few times but then i remembered it.



Here is the credits screen i made in photoshop to thank and credit the people that had helped.
I kept the style the same as the menu title screen and created a nice border for it too,


I did however test what a colour version would look like but i preferred to keep it the same and chose black and white over colour. 


I then added the final Exit script and box colliders etc and it was done!


REMEMBER - image plane must be in front of other plane or it doesn't work. 



No comments:

Post a Comment