Friday, 10 December 2010

Week 13: Assignment Preparation and final tweaks, last touches to the project.

           So far, I've learnt so much in Second Life, from socialising with community people to lot of fun exciting stuff like playing with toys as objects in virtual world. It has been a pleasure working on this editor and I would advice any designer or a programmer to go through this as a basic course with held in learning the tool to help in future outcomes.

Here are some final screen shots of the assignment sheets:


Wednesday, 1 December 2010

Week 12: Demonstration and Presentation for the second life funground game.

This week we are supposed to show our stall game to our lecturer 'Mike Hobbs', showing the progress and game development from all these weeks which the work we did in order to achieve the requirements and tasks. I took all the necessary advices and tips from him. Hopefully he would like my stall game and assess me the marks which I am supposed to recieve.

Here are some screen shots of the final fairground game of mine: (Wild West Shooting Gallery)


Wednesday, 24 November 2010

Week 11: Some Testing plans of the documents.

Here are few test screen shots of the stall which I have tested for the game in second life:

Wednesday, 17 November 2010

Week 10: Making Design documents for the assignment and some researching.

I started on my design document as early as possible to avoid further delays and complications for the assignment.
Here is my few screen shots of the design document which I have already started working on:


Wednesday, 3 November 2010

Week 8: Testing the stall with all weapons and rez launchers.

I tried placing the stall in between the sand box, placed all weapons and tins on the table to test it out.
here is the screen shot and the desired effect:





Wednesday, 27 October 2010

Week 7: Making the stall all together with linking all the wooden planks and some interesting texture

           I've tried to make a small stall as I started making through, realised that I need to make a bigger stall so that the objects which are going to rez need space in order to throw bullets at it. So I decided to make a lenghty stall as possible not consuming a lot of space in the sandbox:


Below I've tried to make some texture as west theme as possible by placing an American Flag on top of the stall:



Week 7: Making a script as a E-mail retriever, such that when avatar touches the object it sends as well as retrieves the message from the owner.

This week I tried achieve the following:
1. Scripting the object such that when touched email is being sent to the following string which the name you have put as "...."
2. Opening the Inbox of the mail and the screen shot proof of the mail being delievered!




The image below showing the mail delivered to the following recipient:

Wednesday, 20 October 2010

Week 6: Testing the Red Board with first person shooter objects such as guns, etc

I tried testing the guns on the red board wall, with random guns such as desert eagle, ak-47, shotgun, mini gun and automatic rifles. The site which I referred and bought objects (Guns) are from the following:

https://marketplace.secondlife.com/p/Free-Box-of-Guns-Over-40-Free-Full-Permission-Guns/923198?id=923198&slug=Free-Box-of-Guns-Over-40-Free-Full-Permission-Guns

The screen shot below shows the avatar in 1st person view shooting the tins objects with the gun:
(Note: the gun may not be visible when in mouse look mode)


The screen shot below shows the guns which have been placed on the stall:





Monday, 18 October 2010

Week 5: Making a tin object with desired with physics effect after the rez colliding with the tin.

I Made a tin object with physics, along with all the tins placed on the table. Upon hitting the bullets, the objects tend to fall down and cause physics effect:



After collided, as you can see the objects have fallen down with physics and upon pressing the reset button the objects are spawned back again. The screen shot below shown is the physics script embeded in the tin object Cylinder:

 default
{
    state_entry()
    {     
    } 
       collision_start(integer total_number)
    {
       llSetStatus(STATUS_PHYSICS, TRUE);
    }  
}

Wednesday, 13 October 2010

Week 4: Making a wall such that when the ball collides, shows the speed of the ball travelling and the detected object.

I've tried to script the wall such that, when the upon firing the rezz launcher it collides with the wall in front (Red wall) with the following screen shot as you can see:



Here is the screen shot of the script with desired effect:
default
{
    state_entry()
    {
    }

    collision_start(integer num_detected)
    {
        // Finds the name of the object that collides
        llOwnerSay("Collided with " + llDetectedName(0));
       
        //Finds the velocity in a vector and converts to its magnitude
        vector velocity = llDetectedVel(0);
        float normVelocity = llVecMag(velocity);
        string objectOwner = llKey2Name((string)llDetectedOwner(0));
           
        llOwnerSay(objectOwner + " travelling at " + (string)normVelocity + " m/s");
       
    }
}

Tuesday, 5 October 2010

Week 3: Make a simple object (Gun) which can fire bullets to the wall

In the third week, I tried to look up on the wiki lsl scripts which helped me buidling on some interesting and playable objects.

Here is what I've tried doing in the on going weeks for the prototype before starting the assignment:


Heres the script screen shot:

 default
{
    state_entry()
    {
        llSetText("Fire!",<0,1,0>,2);
    }


    touch_start(integer total_number)
    {
        // Gets parent object position, rotation and front, establishes projectile speed
        vector position = llGetPos();
        float speed = 25;
        rotation rot = llGetRot();
        vector front = llRot2Fwd(rot);
      
        //Sets trajectory based on front
        vector velocity = speed*front;
      
        llOwnerSay("Fire.");
      
        //Fire "projectile" from the parent object
        llRezObject("bullet", position, velocity, rot, 4);
    }
}

Thursday, 30 September 2010

Week 2: Second life time and collision detection test

1. "Greet by a name with a Good Morning/Afternoon/Evening message (as every 4 hours depending on game what time) when you touch the object your script implies."

I was supposed to create an object with a script consisting of the time box letting the user know the time and following with a greeting message. I must say LSL wiki has always been useful in terms of using variable names. As for the second life I had figured that it consist of four hours per day accordingly making the program work with integers and attaching strings in order to create basic logical program.

Heres a screenshot to show what it indicates:












 


Heres the piece of coding which it involved to make the greeting and time:

default
{
    touch_start(integer total_number)
    {
        float tod = llGetTimeOfDay( );
        llOwnerSay("Time since last position or SL midnight):");
        integer hours = ((integer)tod / 3600) ;
        integer minutes = ((integer)tod / 60) - (hours * 60);
        llOwnerSay((string) hours+"h "+(string) minutes+"m");
        if (hours < 2 )
            llOwnerSay("Good Morning Dover!");
        else if (hours < 3 )
            llOwnerSay("Good Afternoon Dover!");
        else if (hours < 4 )
            llOwnerSay("Good Evening Dover!");
      
      
    }
}




















The screen shot of the user when touched the box it greets with the message:



















2.  'Write a script, such that when a collision by any oject or an avatar that collides with it says its name and also the speed at which the collider was travelling and the owner of the collider if it was an object'.


I tried to script the box and used the "llDetectedType" integer as '0' where the when the avatar or an object has been touched/collided, the box's message would appear as follows:




















Second test I couldn't find any help so I decided to do it myself with the help of moving or shooting object for eg. I had a default gun from free landmarks where you get freebies toys etc. I managed to try and test out the collision through it, noticed that it didn't affect or show any response. It was unsuccessfull :P




























This screenshot shows the gun which i tried to shoot the object(Pandora's Box) was unsuccessful.


So the code which I enherited into the script was:
default
{
    state_entry()
    {
    }
    collision_start(integer num_detected)
    {
        //detects collision with the avatar and prints name
        if (llDetectedType(0) & AGENT)
            {
                llSay(0,"I Collided with " + llDetectedName(0));
            }
        //detects collisions with an objects and prints name
        if (llDetectedType(0) & PASSIVE)
            {
                llSay(0,"I Collided with " + llDetectedName(0));
            }
    }
}



And Here is the screenshot of the script:















Week 2: To make the object(Pandora's Box) detect avatars(Agents) within a certain radius.

Using a for loop starting at 0, i.e. the first index of the detected agent array, I gave some output based on that index. And execution:

With a greeting message.


















Only by clicking the object again the search takes place, as they were no one in the sandbox i managed to find myself.  :p

Here the screenshot of the code and execution:


default
{
    state_entry()
    {
        llOwnerSay("Hello, Avatar! How are you today?");
    }

    touch_start(integer total_number)
    {
        llSay(0, " Please Wait Searching for agents");
        //searches for avatars and gets the owner names
        if (llDetectedOwner(0) == llGetOwner())
        {
            //executes if owner is touching
            llSensor("", NULL_KEY, AGENT, 50, PI);
        }
        else
        {
            //executes if another avatar is touching
            llSensor("", NULL_KEY, AGENT, 25, PI);
        }
      
    }
  
    sensor(integer total_number)
    {   //number of owners tracked in the search radius
        llSay(0, (string)total_number + " agents in search radius");
        integer i;
        for (i = 0; i < total_number; i++)
        {   //outputs the results of no.of avatars detected
            llSay(0, "You've been detected, " + llDetectedName(i));
        }
    }
}

Wednesday, 29 September 2010

Week 2: Idea for the assignment

Dover's Rifle Range or Wild west shooting range

This is based on a 'Victorian' shooting range in common fairgrounds in real. The game is played with a gun and number of different targets, shooting the balls out of the clowns faces, shoot the sweets or cans from the shelf, or a real personal touch to knock over targets, these can range from something like a pirate themed event. Probably set up a prize as a card recieve to the player for the rank depending upon the level and accuracy of the target hit.



I was thinking of a theme such as 'Wild West Game Stalls' Utilising the same technique and scripting with a bit of sound effects if its possible to acheieve from the second life, so that playing a mixture of sound effects and themed music all helping to evoke the Wild West image. In addition to graphics I could also add some horshoes toss, cactus hoopla, shoot the indians or shoot the cavalry. I could also source various items such as cowboy hats and toy guns to allow the players to join in with the fun to play the stall with keen interest for a stunning themed event. Things could be added like inflatable cactus or life sized cut outs of 'John Wayne and Rowdy Yates'.


Wednesday, 22 September 2010

Week 1: Second life scripting

Task 1: "Write a script that, when touched speaks your avatar's name and then counts to 10. It should use an integer variable for the count and a loop (for or while)."

I was introduced to Second life scripting for the first time, during the week I have learnt how the box intracts with the user in terms of scripting so that it gives the integer variable count from 1-10.

I have posted some screen shots below of my work:


Here i will show my coding which i have worked on for the box to interact with the user when touched.

default
{
    state_entry()
    {
        llSay(0, "Hello, Dover!");
    }

    touch_start(integer total_number)
    {
        integer counter = 1;
        llSay(0, "You have touched me, now I will count till 10");
        while (counter < 11)
        {
            llSay(0,(string)counter);
            counter ++;
        }
    }
}






Task 2: ''Write a script that keeps count of the number of times that it has been touched.''

Here in this task I managed to write a script where when the user touches the box, message returns with the value depending upon how many times the box has been touched.




 integer touch_count = 0;
default
{
    state_entry()
    {
        llSay(0, "Hello, Dover!");
    }

    touch_start(integer total_number)
    {
       touch_count ++;
       llSay(0, "Touched " + (string)touch_count + "time(s).");
     
    }
}

And the execution for this is:






Number of times the object has been touched with the count depending on how many clicks you give.