Friday, 18 April 2014

Working Processes / Planning: Creating the Game - New idea, Google Sketchup, take and move new items.

I have a new idea!

So far I haven't had an idea on how the user will actually escape from the room.

However, I know that cans from vending machines are aluminum, and these are a good conductor of electricity. I can change the picture frame near the shelf, which currently has no use, into a fuse box. Inside the fusebox, two parts will be disconnected and one part would still be connected. The disconnected parts would be for the Door and Lights whilst the still connected part would be there for the rest of the electricity.

There is also nothing on the shelf there, so I could add scissors there which could be used to cut the can.

The first thing I need to do, is to open my Google Sketchup document.

Using the components list from the materials menu I added scissors and placed them on top of the shelf.

I could not find a suitable fuse box. I searched for an alternative name - distribution board and found one which looked nice.
This fuse box had door panels, however they weren't split into different groups, this meant that the doors could not be opened.
I decided to keep the door panels, but delete the box behind. Then group each door panel individually and redraw the box behind. There were now three groups of components to make the fuse box instead of just one. This meant that I could now rotate the doors how I wanted.

I took printscreens of the fuse box with the doors open and closed and imported them into Flash.


 I traced around the first image and added the doors to a new layer. In the next frame, I deleted the doors from the layer and drew them again but open. As I did not have any content inside this fuse box, I drew them straight into Flash on a separate layer, with some wires unconnected.


As there was a shelf to the left of the fuse box, it meant that the contents of this camera angle was wider than normal. I could have scaled both of them down, to create a zoomed out effect, but I wanted the contents to be close enough, even if it meant that a door had to be cut off the stage in the process.

I then made it so the scissors could be taken from the shelf and added to the inventory and applied a drag an drop function, which I used with the lightbulb, to both the scissors and the can. I adjusted the code accordingly so it would work with these items too.

Thursday, 17 April 2014

Working Processes: Creating the Game - Adding to the Vending Machine, sorting password on note

I added more to the vending machine script so that now after the item code had been entered correctly, the vending machine would dispense the Amnezol drug.

The following script was used:

// ---------Check what to do next---------
receiptBooleanCheck()
function receiptBooleanCheck():void {
    if (! receiptInserted) {
        vendingFriendlyText.text="PLEASE INSERT RECIEPT";
    } else if (receiptInserted && vendingMachine_txt.text!="AC42G") {
        vendingFriendlyText.text="PLEASE ENTER YOUR CODE";
        stage.addEventListener(Event.ENTER_FRAME, vendingTextCountListener);
        stage.addEventListener(Event.ENTER_FRAME, vendingTextCountReset);
    } else if (receiptInserted && vendingMachine_txt.text=="AC42G"){
        vendingFriendlyText.text="DRUG READY TO COLLECT";
        orderedDrug = true;
    }
}

By adding this script and setting a boolean to true, this means that I can add an if statement so that once the boolean is set to true, the drug can would appear.

I created a new frame, and gave it the lable of "viewVendingDispenser". I then drew in the art for the bottom of the vending machine and created the can.

I used the following code for this frame:

if (orderedDrug) {
    vendingDispenserView.itemDrugCan_btn.visible=true;
}

I then fix the issue regarding the password, as noted from the user testing, placed on the note.

Before

After



This looked much better and now contained a password which could be used to log into the computer.

Working Processes / Planning: Feedback from User Testing [2]

Today, I had the game tested again.
Since I had created more content for the game since the last time, there were now other features to be evaluated.

They were the following:

Feedback Type Solve it by Importance
esc go back Feature Adding it Extremely
click outside to close Feature Adding it Very
4 looks like A in notebook Art Separating the C from the 4 Moderate
M in password looks like W Art Breaking the font and adjusting the appearance of the lower case M manually Very
C is R - Wrong Password Art Changing the letter to the correct one Extremely
back wasn't clear Feature Adding notification to let you know it's there Moderate

The reason that each letter issue with the Art has a different importance level is due to the following reasons:

Users are likely to be able to figure out that the 4 is actually a 4 and not an A. Very few users had issues wit the 4 looking like an A and knew the C was placed before it.

The M in the password did look like a W, but still looked more like an M. 

The wrong letter was given at the end of the password meaning that it would be nearly impossible to log into the computer. This is extremely important to fix otherwise it would be completable.


It also took the user 12 minutes to complete the uncompleted gam.

Wednesday, 16 April 2014

Working Processes: Creating the Game - Reading the Note, Vending Machine Code and Splice Issues

Today, I made it so that the note [on the table] can be read, if you have the lightbulb inserted and are wearing your glasses (otherwise the text is blurred).

I have also introduced the ability to add the order code, found from the notebook, into the vending machine. Since adding the order code to the vending machine was through buttons on the vending machine, this meant that I would have to convert each button into a movieclip. To avoid doing this I created a invisible symbol and place it on top of each button. This way, I didn't need to create a new symbol for each button. The symbols could be copied and pasted, and thus reused with different instance names.

I created the following code for the buttons.

// ---------Characters on 5 - Remove buttons ---------
function vendingTextCountListener(event:Event) {
    if (vendingMachine_txt.text.length>=5) {
        trace("No Room Left");
        removeVBtnListeners();
        receiptBooleanCheck();
        stage.removeEventListener(Event.ENTER_FRAME, vendingTextCountListener);
    }
}
// ---------Characters on 0 - Add buttons ---------
function vendingTextCountReset(event:Event) {
    if (vendingMachine_txt.text.length==0) {
        trace("Characters Reset | Room to type");
        addVBtnListeners();
        stage.removeEventListener(Event.ENTER_FRAME, vendingTextCountReset);
    }
}
// ---------Start Again---------
VbtnCANCEL.addEventListener(MouseEvent.CLICK,vBtnCancel);
function vBtnCancel(ev:MouseEvent):void {
    vendingMachine_txt.text=("");
    stage.addEventListener(Event.ENTER_FRAME, vendingTextCountReset);
    stage.addEventListener(Event.ENTER_FRAME, vendingTextCountListener);
}
// ---------Add / Remove functions---------
function addVBtnListeners():void {
    VbtnA.addEventListener(MouseEvent.CLICK,vBtnAListener);
    VbtnB.addEventListener(MouseEvent.CLICK,vBtnBListener);
    VbtnC.addEventListener(MouseEvent.CLICK,vBtnCListener);
    VbtnD.addEventListener(MouseEvent.CLICK,vBtnDListener);
    VbtnE.addEventListener(MouseEvent.CLICK,vBtnEListener);
    VbtnF.addEventListener(MouseEvent.CLICK,vBtnFListener);
    VbtnG.addEventListener(MouseEvent.CLICK,vBtnGListener);
    VbtnH.addEventListener(MouseEvent.CLICK,vBtnHListener);
    VbtnI.addEventListener(MouseEvent.CLICK,vBtnIListener);
    Vbtn1.addEventListener(MouseEvent.CLICK,vBtn1Listener);
    Vbtn2.addEventListener(MouseEvent.CLICK,vBtn2Listener);
    Vbtn3.addEventListener(MouseEvent.CLICK,vBtn3Listener);
    Vbtn4.addEventListener(MouseEvent.CLICK,vBtn4Listener);
    Vbtn5.addEventListener(MouseEvent.CLICK,vBtn5Listener);
    Vbtn6.addEventListener(MouseEvent.CLICK,vBtn6Listener);
    Vbtn7.addEventListener(MouseEvent.CLICK,vBtn7Listener);
    Vbtn8.addEventListener(MouseEvent.CLICK,vBtn8Listener);
    Vbtn9.addEventListener(MouseEvent.CLICK,vBtn9Listener);
    Vbtn0.addEventListener(MouseEvent.CLICK,vBtn0Listener);
    VbtnS.addEventListener(MouseEvent.CLICK,vBtnSListener);
}
function removeVBtnListeners():void {
    VbtnA.removeEventListener(MouseEvent.CLICK,vBtnAListener);
    VbtnB.removeEventListener(MouseEvent.CLICK,vBtnBListener);
    VbtnC.removeEventListener(MouseEvent.CLICK,vBtnCListener);
    VbtnD.removeEventListener(MouseEvent.CLICK,vBtnDListener);
    VbtnE.removeEventListener(MouseEvent.CLICK,vBtnEListener);
    VbtnF.removeEventListener(MouseEvent.CLICK,vBtnFListener);
    VbtnG.removeEventListener(MouseEvent.CLICK,vBtnGListener);
    VbtnH.removeEventListener(MouseEvent.CLICK,vBtnHListener);
    VbtnI.removeEventListener(MouseEvent.CLICK,vBtnIListener);
    Vbtn1.removeEventListener(MouseEvent.CLICK,vBtn1Listener);
    Vbtn2.removeEventListener(MouseEvent.CLICK,vBtn2Listener);
    Vbtn3.removeEventListener(MouseEvent.CLICK,vBtn3Listener);
    Vbtn4.removeEventListener(MouseEvent.CLICK,vBtn4Listener);
    Vbtn5.removeEventListener(MouseEvent.CLICK,vBtn5Listener);
    Vbtn6.removeEventListener(MouseEvent.CLICK,vBtn6Listener);
    Vbtn7.removeEventListener(MouseEvent.CLICK,vBtn7Listener);
    Vbtn8.removeEventListener(MouseEvent.CLICK,vBtn8Listener);
    Vbtn9.removeEventListener(MouseEvent.CLICK,vBtn9Listener);
    Vbtn0.removeEventListener(MouseEvent.CLICK,vBtn0Listener);
    VbtnS.removeEventListener(MouseEvent.CLICK,vBtnSListener);
}
// ---------The button functions---------
function vBtnAListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"A");
}
function vBtnBListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"B");
}
function vBtnCListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"C");
}
function vBtnDListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"D");
}
function vBtnEListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"E");
}
function vBtnFListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"F");
}
function vBtnGListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"G");
}
function vBtnHListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"H");
}
function vBtnIListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"I");
}
function vBtn1Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"1");
}
function vBtn2Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"2");
}
function vBtn3Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"3");
}
function vBtn4Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"4");
}
function vBtn5Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"5");
}
function vBtn6Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"6");
}
function vBtn7Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"7");
}
function vBtn8Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"8");
}
function vBtn9Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"9");
}
function vBtn0Listener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"0");
}
function vBtnSListener(ev:MouseEvent):void {
    vendingMachine_txt.text=(vendingMachine_txt.text+"*");
}

I scripted this so not only would the user be able to to use each number and letter of the vending machine, but also so that if they had gone over 5 characters, the eventlistener would be removed so they weren't able to continue.
The cancel feature (the red c), was made so that users would be able to delete the characters they typed in if they wanted to start again.


The entering of the buttons were applied to a new frame, so that the user had to zoom into the buttons before proceeding.

There were also issues with the Splice feature which I needed to address.

When testing the game myself, each time I had plugged in the lightbulb and went to view the drawers to collect the key, upon pressing the back button - they key would automatically be removed from my inventory. This created a lot of confusion as I didn't know why this was the case, since to my knowledge, the code was flawless.

What I had not realised is that the splice feature will remove the last item added to the vector if it cannot locate the item referred to in the script.

So since the lightbulb had already been removed [from inserting it into the lamp], when going back to that frame, it removed the key.

The splice feature was only suppose to be active if the lightbulb had an if(hitTestObject) with the lamp.

What had happened was that instead of me scripting it so that it would remove the child, I instead made it invisible - so that it would disppear. Meaning that once the light was inserted, it was still there on top of the lamp. Thus meaning the splice was always active.

To fix this I added a removeChild after the lightbulb had (hitTestObject with the lamp.

Tuesday, 15 April 2014

Working Processes: Creating the Game - Fixing glitch, Adding a camera angle, Adding bin contents/ receipt and Drawing notebook

The first thing I done was fix the glitch as reported from the user feedback.

The glitch would occur after you have taken the glasses from the coat. The user would then change the camera angle and then back again, it is here where the coat would appear again and the user would be able to take a new pair of glasses.

In order to do fix this, I have created a boolean so that when the item has been picked up, the coat will disappear.

On the timeline, the following code has been used.

if(glassesFound){
    roomView.coatHanger.itemGlasses_btn.visible=false;
}

This will be applied each time the user goes to that frame, so it can be sure that another coat will not appear.

I also added another camera angle, this was of the vending machine. In order to create this vending machine camera angle, I found the appropriate angle in my sketchup document and took a screen shot. I then imported this into Flash and traced around it.




I changed the appearance of the vending machines buttons to suit the context of my game. I also created a screen which would notify the user messages. There is also now a series of numbers and letters the user can type in added all the appropriate buttons to link to this camera angle.

On frame 2 of the vending machine, I opened the cage door. This would happen once the user has used the right key on the padlock of the door.

In the process of adding this camera angle, I changed it so that the lightbulb can not be picked up from the desk, but instead whilst facing the vending machine itself (since you're nearer).

There are now two ways to face the vending machine, from rotating on to it from the main camera angle, or by getting to it from the desk camera angle.

I then gave the bin, under the desk, a script so that it would produce a receipt when it is clicked on. I then applied the drag feature from the lightbulb and key onto the receipt so that I could drag it.

I added hit tests for the key and vending machine lock so that the cage would open.

I am yet to add one to the receipt and vending machine, which would be done tomorrow.


I then drew the notebook open and added contents inside of it. This was done as a movieclip which has it's own layer and is applied to all the frames of the Flash apart from the Name Enter. This is so that the notebook can be open and read anytime.

The user will be required to wear the glasses they've picked up, otherwise the notebook will not be readable as it will be blurred instead.

Monday, 14 April 2014

Working Processes / Planning: Feedback from User Testing [1]

When showing others my unfinished game for feedback, I received the following.

Feedback Type Solve it by Importance
Unlimited Glasses from Coat Glitch Fix glitch Extremely
Unclear moving mouse left and right to rotate around room Feature Instructions Very
Window looks like Chalkboard or a big TV Art Add trees/ moons Mild
Don't know how to make inventory appear Feature Instructions Very
Surgeon / Dr Paphitis placed on 2nd Door Art Adding it Mild
When username and password wrong = message Feature Adding error message Moderate

I will fix and correct to these in the order of importance that they have to the game.
To me, I believe that the glitch is most important to solve as it could break the game.

Working Processes: Creating the Game - Adding 2 Camera angles, Cursor changes and Item features.

I added two camera angles, cursor changes when hovering over items in the inventory and made it so you could drag the key out the inventory.

1) The picture frames
2) The door

These two camera angles currently have no scripting. It is likely that the picture frames camera angle won't have any button scripting, other than going back to previous camera angle, as they are just there to look at.

The main door will have scripting so that the door would be able to be opened once an item is used on it and some booleans have been set to true.

I have inserted different cursors into the cursor movieclip is that a wider selection is available. This is not for the user to choose which cursor they want, but as a way of indicating which item does what.
In the inventory, if an item is draggable, a hand will appear.
If the item is only suppose to be clicked on, then the pointer cursor will appear.

Finally, I made it so that the key, which is received from the drawer, can be dragged from the inventory, just like the lightbulb was.

The code used is exactly the same just with different instance names and functions.

For the cursors, I used this website to help me:
http://kirill-poletaev.blogspot.co.uk/2010/07/mousecursor-property-in-actionscript-3.html