Ass 3 Reflection

Ass 3 reflection 1.JPG

So this is it… my MUV journey is coming to its end, but I can honestly say that my second life will continue!

I am proud of the community game I was able to construct, simple as the design may appear the real complexity comes from the scripting. LSL Scripting has been a pleasure to work with and I found examples on second life wiki very useful and not to difficult to understand given my programming background.

I would like to thank Isa for all your efforts to teach us in the virtual world, and Belma for the enjoyable physical classes with interesting discussions. I have really enjoyed my MUV and SL experience.

I really like how second life allows people to take idea’s and make them a virtual reality, do things we wish we could in real life. I have always said I love programming because I can take an idea from my mind, and make it reality, usable in front of my eyes and for all others, there is a sense of greatness in being a creator.

The Assessment 3 creating an object with complex interactivity went rather smoothly for myself, the hardest part was making design decisions such as how I was going to support players taking their turn to select a column, so many way I could do this, but what was going to feel more natural was the direction I went with.

I decided to make the Biggest game model left out on my area available for any and all to COPY and have freely, then with transfer permissions for the COPY taken. No making COPIES or MODIFICATION or MOVING the original, permissions.

Yes I know I could sell this but I would rather gift it to the Second Life Virtual World. I am already going to some communities I joined and offering to have it there for people to play for leisure.

I hope any reader finds my blogs about MUV and Consecutive 4 informative and enjoyable to follow along with my journey, sorry to say this is my last and final blog you will find here as my paper being studied has come to an end.

Dean SH (deansh), SL Resident.

Advertisements

Ass 3 Final Product

Ass 3 final 1.JPG

So this is the big moment, the final product is ready to play and enjoy for all!! It has been a fun journey discovering LSL Scripting and the possibilities inside this virtual world called Second Life.

Small changes since my last development post, the top row now has a glow to it just to help indicate that these slot in the top row are where a player must click to select the column for their move with each turn!

Ass 3 final 7.JPG

Oh and without a doubt as mentioned in my Task Plan Originally if I got time I wanted to create a simple maze that someone who will teleport to my spacial area needs to navigate to find and play the Consecutive 4 game! Or just fly over the walls directly to it if your not one like me to enjoy figuring out a little maze!

Ass 3 final 2.JPG

Here a snippet of the script that welcomes nearby residents, I managed to get this working smartly to remember everyone that is currently nearby and only welcome them once, not repeatedly with each scan like the initial example I used was doing over and over… I then did a fix which made it only welcome residents once.. and wont welcome anyone again even if left and returned, until such time that nobody at all was nearby making the list memory clear itself.

I also had a problem with it only greeting myself at one point, but thanks to some debugging and help from Isa Goodman I was able to solve what caused this and rectify the situation, finally fixed the use of list memory to update the list with each scan, removing anyone who has left the nearby area, so that once they come nearby again it shall welcome the resident again without any need for all nearby residents to first leave an clear the memory list, so works perfectly now!

Ass 3 final 3.JPG

And here you can see the start of the Master Script which really makes the game work and possible to enjoy! Notice the link for every column slot has been mapped out for various purposes that all make the game work.

Ass 3 final 4.JPG

And as you can see this Master Script runs to 653 lines long!! I must say I am rather chuffed with myself for getting this working so nicely, and so interactively not just dialog boxes to control all interactivity for game play! The time seen at the end of the script animates a play piece to fall into place for a slots position, as part of processing a players move!

FULL SCRIPT CODES (3 SCRIPTS) AVAILABLE HERE!!

https://2018muv601.wordpress.com/c4-lscripts/

Also available at this link ^^ is the full NOTE CARD details available from the game, that outline what the game is, the goals of the game, rules and how to play step by step!!

Ass 3 final 5.JPG

Here you can see I was welcomed when came nearby, and Rano is currently playing a game against the Hard AI, he is RED while the AI is always YELLOW. Notice play pieces GLOW while game is running, and LED lights below GLOW Yellow or RED for who’s turn it is now! While GREEN means game is reset and ready to play!

Now another problem that I ran into when testing with Isa was the game object being heavy on the server, it was decided this is due to having to many scripts on the object, as previously I had a script on each slot, making clickable and animating itself for a piece falling into place! But in the Final Product this heavy script issue of 45 scripts was reduced to 9 scripts.. removing the floating text script on a link, and most slot scripts, leaving only the 7 scripts along the top slots of the top row now for column selection touch support only, and 2 scripts on root prim! With the master script now animating all falling pieces into place.

Ass 3 final 6.JPG

And there you have it Rano just defeated the AI and RED wins the game, he did set himself up pretty good there, hehe.

Notice all pieces now stopped glowing, other than the winning set of 4 that ultimately earned Rano the win this match!! And did I ever mention that this game is totally re-sizable to any size you like.. well maybe not to small or too big, but yes the distance a piece falls from into place is calculated by the size of the pieces. So that’s it I think I pretty much covered everything in all my post, next stop reflecting time!

The Consecutive 4 Game was proudly built, is owned by and available from… Dean SH aka Deano!

Ass 3 Development

Its been a hard week of developing until 4am in the morning sometimes, just dying to finish what im working on and see it working so I can rest easy when I lay down to sleep at the end of each development iteration. Hmm where to begin…

Ass 3 dev 10.JPG

So first I made the cube, tube and cylinder(play piece), colored & textured them before finally linking the 3 together, next duplicated this set holding shift key and dragging it, until I created a single row for the game. I then duplicated that row upwards 6 times to form the game board & made the cube to sit at the bottom before creating hemisphere shaped LED glowing lights to place along the bottom cube. Lastly was creating the side pillars using a cylinder with taper and twist plus cube with twist then another cylinder with taper on top and textured the pillar, and linked everything together making the game object!

Ass 3 dev 1.JPG

So once visual game existed I began to code scripts that will do the work required for the game to function and work the way I desire, there is a total of 3, Master script, column selecting script and scanner script to welcome nearby Residents as seen in the above image. Also seen is a few of the other messages the game says into nearby chat… such as informing a player if there is no available spaces for that column meaning its full and to choose another, or declaring who the winner was! The floating text centered above the game shows who is playing and what color as, but there is no active game is the above picture hence the GREEN Led light is glowing indicating that the game is awaiting players!

Ass 3 dev 2.JPG

Meeting a requirement through dialog menu’s I have made it show this menu when any part of the game is touched (other than the top rows 4 game piece spaces), here the Resident can decide to play as RED or YELLOW, Play an AI level, Reset the game, get a Note Card about how to Play or Visit this blog!

When a Resident becomes RED, the option will no longer show in the menu until game reset, same for YELLOW but once YELLOW is assigned to a Resident or AI, all the YELLOW related menu options wont show anymore until game reset.

Ass 3 dev 3.JPG

In the image above you can now see looking at the floating text above the game that RED is myself while YELLOW is Consecutive 4 (The AI I have scripted). Because both positions are taken the game has now started and the LED light glowing is now the Red one, indicating that it is RED’s turn and Red always goes first in this game! Now how to select a column for my play piece to fall into an complete my turn? At first I added a touch script to detect touching, for all the 42 spaces possible using that to play the game. But after showing the game to Isa my tutor and getting informed about how heavy the game is running due to having so many scripts on the object I changed this now to instead of 42 scripts on each space, there is now only 7 touch scripts along the very top row of spaces only! In order to select a column for your play piece to fall down in, a resident now only needs to click a space from the top row identifying the column they desire.

Ass 3 dev 4.JPG

So as you see from the above image when its YELLOW’s turn the LED glowing light becomes the Yellow one! And also in accordance with preference from Isa my Tutor I have made all game pieces glow so they pop and stand out more easier to see during game play!

Ass 3 dev 5.JPG

Also during Game Play if any part of the Game is clicked by a player of other resident they will only see these 3 option in the Game Menu! But it would be rude to reset a game while others are playing!! And just to clarify, Players cannot place another piece or accidentally choose where the opponents piece will go, etc.. because I have scripted processing checks preventing such things which could disrupt or error the game.

Ass 3 dev 6.JPG

This image above is a bit embarrassing, I was planning to screenshot how the game looks when a resident wins being myself, but the Hard AI defeated me winning the game as i rushed so I just captured who that looks anyway!

Notice even though the game ended, the Glowing LED light remains Glowing to represent the winner until such time the game gets reset! You can also see that once there is a Winner all the play pieces stop glowing, other than the winning set of pieces… this makes it clear which 4 in row got the win!

Ass 3 dev 7.JPG

For this game to work as I have previously mentioned there is 3 scripts, two are found directly in the root prim and visible without going to edit linked mode, I could have just included the scanner scripts code in the master script but decided to leave it separate. As you can see Land Impact of 139, so there is 139 Primitives forming the game object.

Ass 3 dev 8.JPG

Then if we go into edit linked mode and select any of the spaces(play pieces) from the top row, we find the column select script which is very simply just detecting if touched and messaging the master script as to which column was touched. From this information the master script will identify the next available space for that column to fall down into and then move the play piece into position ready to fall, setup the color and glow and alpha effects accordingly before animating the fall of a play piece into position and checking if it created a win for that colored player!

Ass 3 dev 9.JPG

This image shows the details of the NOTE CARD that a resident will get if they choose the How To Play option from the Game Menu, it outlines the goal and rules of the game along with instructions about exactly how to play. So the game was pretty much finished once I developed all this and got it working , playing as both RED and YELLOW myself while getting the scripts to work, showing LINK numbers visually with floating text to debug and write out all the winning set combinations through identifying the 4 prim links involved for any winning set because I noticed the link number seen in build tools when editing link can be very inaccurate.

CREATING THE ADDITION OF AI???

So this was not apart of my plan originally, but I decided to give it a go after getting tired of playing against myself. Let me explain how I have designed this AI!

So the first thing AI needs to do, is check if there is any combination of 3 YELLOW(AI’s Color) where by adding a 4th piece is actually possible right now to create a Win and Win! If not.. the AI then checks the same for RED(AI’s opponents color) and if identified will take the 4th in a row space blocking RED from winning!

Next I scripted AI to failing the above, Check for any 2 in a row combinations from RED’s pieces and start blocking those from becoming 3 in a row, if no suitable move for this can be found to exist the AI will then check the same for itself to try form 3 in a row!

So if the AI still has not identified the best move to do… the AI will then look at the last move RED made and follow RED placing a piece on the top, or either side of the last played piece by RED, at random. By this stage it should be able to have made a move!

In the rear case (usually only when board is almost full) the AI might resort to using the fail safe move routine which simply scans the whole game board for any possible space to play its move into using the first it finds!

The Easy AI does not do all those checks above, making it weaker and more likely to do a bad move!

The Average AI does all of the above, making it a decent opponent but still prone to setting up a win for its opponent without knowing it!

The Hard AI has an additional check added which enables it to once a move has been identified, imagine playing that move, then check if by playing that move, it will be setting up its opponent to win that next move or not…. if not it makes the move but if that move will setup a win for the opponent then the AI will skip that move as an option and continue on looking for another good move to make instead, I call this the Bad Move Check!!

And that concludes the development and implementation process for Consecutive 4!

Ass 3 Requirements

So I have built the bits and pieces that ultimately form the Consecutive 4 game and figured out how I intend to meet every Requirement, with thought and care towards covering all aspects of content creation for complex interactivity! Lets check it out and I can specifically outline just how…

Ass 3 pic3.JPG

Contribution for Content Creation is as a leisure resource, through the form of a simple game users can play called Consecutive 4.

Requirements:

All builds must display

    • A minimum of 100 and a maximum of 300 prims, with a combined land impact less than 350.

As you can see in the image above, the land impact is 136 currently, and that is from a total of 136 individual pieces all linked together forming the display, and is obviously between 100-300 at this point.

    • At least three different primitive types (i.e. Sphere, Torus, etc.) & At least four different forms of prim manipulation (i.e. Cut, Twist, etc.)

Ass 3 pic5.JPG

  1. Boxes that have been made Hollow to fit tubes that contain the play pieces.

Ass 3 pic6.JPG

2. Tubes that hold the play pieces of yellow or red, have had the Hole Size customized to be just right for the job.

Ass 3 pic7.JPG

3. Cylinders that have had Twist and Taper modified to add visual style to the sides.

4. Spheres as LED glowing lights to be used as status indicators, but the first 3 meet the shapes and shape manipulation requirements on their own.

    • The use of different textures and colors with at least two different texture manipulations (i.e. Glow, Shininess, etc.)

I have used 4 different textures for the build of this game so far, but this might yet increase if I end up adding seating for players for example. You can see the same texture repeating across the many blue square sections of the play area, and the grass area I have detailed for my given space also has a texture repeating but that is not really apart of the game.

I have used solid colors too, and have Glow on the LED lights, while play pieces are using transparency, which will be the default state of 100% so they are invisible, until a player has a turn where by the outcome requires the play piece to become visible and have its color set accordingly. I have also modified the colors of textures.

    • The appropriate use of multiple textures on a prim and appropriate scale for purpose both in construction and texture use.

I have used multiple textures on a single prim and then I have also used a single texture on a linked set of prim’s such as the sides of the game. Scaling to purpose for me has meant having it larger than myself, I desire a game I can walk around and see the details too clearly, and play on a giant board game scale. However I also have tested resizing the game as a whole and it looks great big or small, could easily be sized to fit on any table and have players sit either side to enjoy!

Ass 3 pic8.JPG

Complex interactivity

SIX Chosen methods other than game play itself…

  • A scanning system to detect the presence of an avatar and interact with the avatar in some manner.

When someone comes in range of the game they will be welcomed and asked to come play!

  • A prim’s inventory item passed to an avatar.

This might end up swapped for having an avatar seating at the game to interact with it, but if not.. I will use this to pass a NOTE CARD to the player with details about the Game and how to play!

  • Scripted communication with residents in main chat.

This goes hand and hand with the first one, as I will use this medium to welcome residents who come near the game. I will also likely use this to show status messages such as who’s has won the game or that a column is full and player needs to select a different column.

  • Dialog menu with a at least three options displayed.

I intend to use these to allow residents to reset the game, choose to play as yellow, or red, and take a NOTE CARD about how to play, possibly using it to ask players what column they desire to place the next game piece in for their turn!

  • A link out to a web page.

I am thinking to use this in regards to opening a web page link to this very blog so any user can see where it all begun!

  • Prim movement through scripting.

Lastly, I desire to see the game pieces fall from top down into place.. for graphical effect so fingers cross I can get that working.

Ass 3 pic4.JPG

Ass 3 Problems/Solutions

So the way I see it in order to create consecutive 4, I must focus on 4 key problem area’s:

1. Meeting all the requirements of the build in my design.

Solution: Having to use more than 100 prim’s to create the game is going to be interesting, There is 42 spaces and 42 pieces and then no less than 2 parts for the sides if not more which should get me close, I am sure there will be other things I discover are needed along the way to get me over 100.

At least three different primitive types well that should not be to hard to do between the square sections and play pieces then the sides I can imagine needing three easily.

At least four kinds of prim manipulation and two different texture manipulations, well I will need to factor this in as I am building it to try things and see what works or looks good along with considering appropriate scaling.

Textures and color’s throughout the build shall be applied as I create each part before linking it to anything which has a different texture etc, i sourced these from the display board setup by our Tutor.

2. Building and designing the physical object itself.

Solution: This is a problem for any newbie to the virtual world who desires to build, all I can do is research more and apply skills and knowledge gained from virtual world classes to help me create the game object i require.

I must think about keeping the visual game play to a minimum and inside my ability range as best I can as much as I would like to have the game pieces laying on the ground and player click one and drag it, moving it up to the slot they wish to drop it into and see it fall down nicely into place completing the players move, I believe it will be best to keep it simple and get it working first and foremost.

Ass 3 pic1.JPG

So my solution to keeping it simple is that players only select a column and it then spawns the players colored piece into place where it would end up, or hopefully show it kind of falling down into place at best, or instead of spawning pieces they might exist in position ready but invisible until needing it to show, and setting the color accordingly once it shows.

So in the image above you see I have built 3 shapes that I intend to use for creating one single section of the game, the part where pieces go, and the piece itself, which once all together look like the image below, and can be duplicated many times to form the rows and columns for the game.

Ass 3 pic2.JPG

3. Find and understand all the LSL code to make it work.

Solution: Well there is an array of different functionality I will need to research and understand to combine and make everything working the way I intend listing them all this early is not possible, but of the top of my head and after some research I have done I feel I may need to use some of the following….

http://wiki.secondlife.com/wiki/LlMessageLinked

llMessageLinked will help me to communicate between different scripts on the game object, or between different linked prim’s depending where I attach scripts.

http://wiki.secondlife.com/wiki/LSL_101/Using_Variables

Reading here about variables because I understand my game will likely need local variables in the functions I create along with global variables storing not so temporary data such as names of the two residents currently playing which would remain until the game is reset through its menu options which reminds me, I need a menu?

http://wiki.secondlife.com/wiki/Dialog_Menus

http://wiki.secondlife.com/wiki/LlSetSitText

http://wiki.secondlife.com/wiki/LlSetTouchText

Well it appears we cannot customize the pie menu very much other than changing the sit here text, and touch text in the pie menu, so dialog menu’s are the way to go here I believe, I can use this to reset game, or let players choose which color they will be playing as.

So using just that which I have found now, I should be able to get a lot of the interactivity for the game working, But still need to solve things like how to change the transparency, color or moving a single linked part, display whos move it is, who the winner was, or complexly cycle through all playing pieces checking for 4 of one color consecutively to know that a player has won the game!

4. Meeting all the requirements of the build in my code.

Solution: This part will be difficult, because I must meet 6 of the criteria for complex interaction, and there is only 9 options provided off which most do not really suit the game being created, which means I just have to force them in somehow, that is all the solution I have at this point, I will leave this to last after everything else is done, to start forcing in some of these requirements however and where ever I can.

 

Ass 3 Task Plan

Assignment 3 Task Plan!

Selected Option: Content Creation – Complex Interactivity.

Content Idea: A simple game community users can play and copy, following a common classic called CONNECT FOUR or 4 IN A ROW, but I will name mine “C4″ standing for “Consecutive 4“.

Purpose: The purpose of this assignment is to create a simple game for residents of the MUV601 community to enjoy interacting with at what is considered a complex level in terms of scripting. As someone who likes to play online games, I think of this as creating a online 2 player game only it is with in a virtual world. I think once complete that others in the MUV601 community will enjoy playing each other in friendly matches. I could potentially make it be for sale if good enough, or just have it freely available to MUV601 residents to add to inventory.

Learning Goal: Having a Software Development Major, I wish to know more about Linden Scripting Language in the Second Life Virtual World, how to apply scripts and manipulate them to do what I desire, while learning how to do all the scripting that will be required to make a working 2 player game of “Consecutive 4“, support at least 6 of the requirements in the assignment, and the visual requirements too. Once complete I should have a better understanding of how the scripting and building of in world objects is accomplished.

Resources: I will need to look up the rules of the classic game, and count how many slots are needed to complete the playing space I think it is 7 long by 6 high making 42. I also need to look at how the classic game presents itself, and make something similar in design to make it obvious enough to residents familiar, what this game is hopefully. Other resources will be textures, of which I have collected many freely from the texture board provided by Isa Goodman (Aaron), and will play around with I dont think I need any further textures. Lastly will be researching the LSL scripting codes I am going to need and find a way to make the game function in the way I desire, Second Life wiki has tons of useful code snippets and explanations which I intend to source bits of code from.

Extra: If I complete this game with time to spare I plan to also develop a simple surrounding environment such as a Hedge Maze that the community can navigate through until they find the “Consecutive 4” game to start playing, just a for fun.

Image result for connect 4

 

 

SL Karaoke Community

MUSIC ~ ELIXIR OF LIFE

  • KARAOKE ,
  • 24 hours a day/ 7 days a week
  • LIVE SINGER VENUE every Wednesday
  • OPEN MIC weekly Monday at 12 pm
  • sing on voice or stream
  • OUTDOOR STAGE
  • LIVE VIDEO STREAMING

Ass 2 pic9.JPG

Founded by resident Kalilah Beck, born 06/09/2007 with interests in Building, Meeting & Exploring, the Elixir of Life is a Karaoke Community with a total of 164 members after joining myself. The purpose of this Community is Karaoke which is a personal hobby when having drinks with friends and family so I decided to reflect this interest through my Second Life!

Ass 2 pic6.JPG

Aside from usual Community Standards, I asked if there was any rules for the community and was told, “to mute mic while a singer is on, be nice, no nudity” which seems fair enough, I Joined another 2 Karaoke Communities to but they did not seem to run regular events of any kind, and a Resident named Grace I befriended hanging out at the “O-Lounge” Second Lifes number 1 Karaoke location and largest community with over 1500 members including myself. She invited me to become a member of the community she helps run which does have events, the Elixir of Life!

Ass 2 pic10.JPG

I have been hanging out in the Elixir Lounge listening to other sing, having a dance and chatting to other, clapping always at the end of a performance just enjoying myself. I attended the Live Singer event last week on Wednesday in Second Life time, but actually 8AM Thursdays for my real world time, which is usually when im getting ready to head to work or classes and getting the kids of to school, which made it hard to attend the events given the timing of them, but I managed to get to the one and have a sing myself which was good fun I dont think others are used to hearing a New Zealander on the mic singing, alot seem to be older folks with a taste for country style or old songs, luckily im an old soul myself.

Ass 2 pic4.JPG

So I finally got to meet the founder of the community and introduce myself at the event, and was given what I need to connect to the stream and have a sing using 3rd party audio streaming software like BUTT, yes it sounds a bit rude but that is what the name of the software is.

Ass 2 pic5.JPG

Everyone in the community is wonderfully nice and polite at all times, its a relaxing place to hang out and have a sing or listen. Event notifications are emailed to me, and visible under the community events tab, along with being advertised on location around the area. Feel free to check it out…

Ass 2 pic3.JPG

sURL:
http://maps.secondlife.com/secondlife/Virtual%20Holland/24/238/22

FaceBook: https://www.facebook.com/MUSIC.Elixir.of.LIFE/

Tool to stream: (BUTT): https://danielnoethen.de/
They host 2 weekly events, a Live Singer Event and Open Mic.

EVERY MONDAY 1 PM – OPEN MIC – MUSIC ~ ELIXIR OF LIFE

Time:

07/05/2018 1:00 pm

Duration:

3 hours

Location:

MUSIC ELIXIR OF LIFE on Virtual Holland

Host:

Kalilah Beck

Category:

Live Music

Cover:

FREE

 Ass 2 pic12.JPG