Search Unity

Gooey Choomee - A Lightbulb-Changing Adventure!

Discussion in 'Made With Unity' started by Jessy, Feb 19, 2008.

  1. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,327
    Here is a "proof of concept" that there may be an opportunity to use as a springboard for teaching skills in the workplace...(not my idea, but I figured we could do this easily enough if there was a need for it). It was a way to become a little more familiar with the Unity GUI system, as well. Have fun! :roll:

    http://teamuv.net/games/gc.html
     
  2. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,810
    That's cool. Nice job.
     
  3. CoherentInk

    CoherentInk

    Joined:
    Jul 16, 2006
    Posts:
    216
    Nice! Reminds me of many of the old adventure games.
     
  4. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,293
    Cool, i've enjoyed it! :O)

    I wonder how bright the 1.000.000 bulb would have been and if it would have knocked out the electric supply in the region.
     
  5. walker

    walker

    Joined:
    Oct 19, 2007
    Posts:
    39
    hey - thats funny
    the 1.000.000 watt bulb exploded violently :)
     
  6. groovista

    groovista

    Joined:
    Feb 15, 2007
    Posts:
    21
    Wow! Cool!

    I'm a member of the local volunteer fire brigade, and the first reaction I got from the others when I described Unity to them was, "We need a real training aid for structure-wildland interface!" ( The jargon means "where the burning building has caught the surrounding landscape on fire." And now you need different techniques and equipment, more firefighters and MUCH more water :) )

    As a work-through of GUI techniques and ideas, it's really good! You might color-code to draw the eye more easily to the actions:

    Left Box: "Lightswitch" selected in blue;
    Next Box: "Turn Off" in same color blue;
    Action Boxes outline different from Feedback Boxes;

    Thanks for a nifty reminder of the simple effectiveness of the storyboarding technique! "Myst" is still engrossing despite its simple graphics, and every Pixar film is pre-visualized like this.
     
  7. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    I dropped the bulb, then stepped on it. Man I must be an idiot. Also, the compact fluorescent is 1000 watts? What?

    Lets be more eco friendly here :p
     
  8. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    873
    I love it! It's funny and creative. I made 3 mistakes, though. I fell off the ladder.

    Nice job :)
     
  9. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,293
    It's a good example for what simple things can make fun in a game and that especially 3d games often forget about this and end up as some interactive techdemos...

    Which also reminds me of that the old Circus Chairs (JeremyAce?) was one of the best little games shown here on the forum.
     
  10. nm8shun

    nm8shun

    Joined:
    Jul 14, 2007
    Posts:
    476
    That's cool Jessy. Would you mind sharing the bit of script you used to create the button that makes the game go full screen?
     
  11. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,327
    Not at all. Keep in mind that the current code is a placeholder until the following bug is fixed:

    http://forum.unity3d.com/viewtopic.php?t=9208&highlight=

    All the code for what should be working is in this as well. In every browser other than IE, I can get a delicious button which changes text and brings you both into and out of fullscreen. You will just have to change things around a bit (deleting and un-commenting), as I tried to describe for my own usage. Please let me know if I can help you any further.

    (Make sure you set the dimensions of the web player to match the variables! This game starts off as a 600x600 px square.)
    Code (csharp):
    1. var webGameHeight : float = 545;  // the height of the whole game (minus the logo/fullscreen button section), for web usage
    2. var webGameWidth : float = 600;  // the width of the whole game, for web usage
    3. var gUI_Square : float = 150;  // the GUI's vertical dimension in pixels, for web usage
    4. var fullscreenHeight : int = 35;  // the height of the fullscreen button
    5. var fullscreenWidth : int = 300;  // the width of the fullscreen button in windowed mode
    6. var logoClearance : int = 55;  // how many pixels are needed at the bottom of the screen to allow for the Unity logo (Windows)
    7.  
    8. // remove when the IE bug is squashed
    9. private var fsSwitch : boolean;
    10. private var fsText : String;
    11. private var logoHeight : int;
    12.  
    13. function Start () {
    14.     // remove when the IE bug is squashed
    15.     fsSwitch = true;
    16.     fsText = "Click this button to enter fullscreen mode.";
    17.     if (Screen.fullScreen) {
    18.         logoClearance = 0;
    19.     }
    20.     logoHeight = logoClearance;
    21. }
    22.    
    23. function OnGUI () {
    24.     // useful variables for resolution switching
    25.     var gameHeight = Screen.height - logoClearance;
    26.     var boxSide = (gUI_Square / webGameHeight) * gameHeight;
    27.     var gameWidth = boxSide * 4;
    28.    
    29.     // fullscreen button
    30.     var fsGameWidth = Screen.currentResolution.width;
    31.     var fsGameHeight = Screen.currentResolution.height;
    32.     var fsTop = Screen.height - (logoClearance / 2) - (fullscreenHeight / 2);
    33.     var fsWidth = (fullscreenWidth / webGameWidth) * gameWidth;
    34.     var fsLeft = (Screen.width / 2) - (fsWidth / 2);
    35.    
    36.     //the next section of code, along with the first lines of the Start() function, should be changed when the IE bug is squashed
    37.    
    38.     //  if (Screen.fullScreen) {
    39.     //      var fsText = "Click this button to exit fullscreen mode.";
    40.     //      var fsSwitch = false;
    41.     //  }
    42.     //  else {
    43.     //      fsText = "Click this button to enter fullscreen mode.";
    44.     //      fsSwitch = true;
    45.     //  }
    46.    
    47.     // remove when the IE bug is squashed
    48.     if (Screen.fullScreen == false) {  
    49.         logoClearance = logoHeight;
    50.        
    51.         if (GUI.Button(Rect(fsLeft, fsTop, fsWidth, fullscreenHeight), fsText)) {
    52.             Screen.SetResolution (fsGameWidth, fsGameHeight, fsSwitch);
    53.             logoClearance = 0;  // remove when the IE bug is squashed
    54.         }
    55.        
    56.     }  // remove when the IE bug is squashed
    57. }
     
  12. nm8shun

    nm8shun

    Joined:
    Jul 14, 2007
    Posts:
    476
    Thanks much for sharing!
     
  13. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,293
    @Jessy
    Will you make other ones as well?
     
  14. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,327
    Other what? Games based on a similar GUI?
     
  15. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,293
  16. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,327
    This project was made using the least amount of effort that we could put in, because the jobs that would come of it don't interest me (except for the money), and I would prefer to throw a similar amount of effort at them. My girlfriend (who did the art for this and game we did for Top DOG) is going to online school for "Animation and Visual Effects", and I am following along with all of those classes. So, it is likely that, soon, real-time 3D will be faster for us to use than than the current all-2D method. However, if any companies end up liking this current demo, then I will post the future similar projects here unless I am legally forbidden from it.

    It is nice that this project comes in at just above 1 MB currently, however.
     
  17. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,293
    I just was wondering if you continue this because you might try out further things or it's kind of a prototype for coming up work. Anyway it really liked the simpliticity because it was reduced to what you have to do without schnickschnack left and right.
     
  18. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,327
    Oh yeah! One thing I did NOT want to do was keep the useless stuff on-screen when you couldn't actually do anything with it. The list of objects and actions is constantly updated to keep everything clean. This IS something you will see in all of my future content, because I absolutely hate clutter.