Search Unity

Alphabet Soup

Discussion in 'Made With Unity' started by Dafu, Oct 17, 2006.

  1. Dafu

    Dafu

    Joined:
    Aug 22, 2006
    Posts:
    124
    [UPDATE: I implemented some of the advice given in this thread. Moving around letters should be a little less awkward now, and they can no longer be dragged out of the bowl. I've updated some of the textures, including the soup itself. I'm attaching a new screenshot, but leaving the old one for comparison. Universal Binary is updated. Are words being recognized on anyones computer? It works fine on my machine, but others seem to be having trouble, I'm wondering if its working for anyone at all!]

    This is my second project in Unity. My first attempt was the little bowling game I posted a few weeks ago.

    This project was more heavy on the scripting side. I was using JavaScript, but for my upcoming projects I'm going to try C# instead. The fact that JavaScript is not strongly-typed can get very irriating at times.

    Anyhow, let me know what you think!
     

    Attached Files:

  2. tbelgrave

    tbelgrave

    Joined:
    Jul 29, 2006
    Posts:
    321
    Wouldn't have a webplayer version by chance?

    ~t
     
  3. Dafu

    Dafu

    Joined:
    Aug 22, 2006
    Posts:
    124
    No, I didn't figure out how to do a webplayer version. The problem is that the game uses an external dictionary file that is loaded up on startup. You can't have external files with a webplayer as far as I know.

    Does Unity have a way of packaging raw data files along with your other assets, and provide a means of accessing those files during run-time?
     
  4. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    You can type the JavaScript used in Unity so it is resolved at compile time instead of run time. Also, JavaScript in Unity will infer file types at compile time if possible if the variable is not explicitly typed.
    Code (csharp):
    1.  
    2. var distance = 3.0;
    3.  
    will be typed as a float at compile type instead of defering type resolution at run time.
     
  5. Dafu

    Dafu

    Joined:
    Aug 22, 2006
    Posts:
    124
    Yes I realize this, but the benefit of a real strong-typed language is that it enforces proper decleration. The fact that Javascript can resolve types at compile time _if_ you remember to initialize them is of little help, because if you forget to intialize them you won't find out until later on.

    Furthermore Javascript promotes sloppy programming, and leaves the programmer doubting their own code.
     
  6. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Looks really neat although that "soup" looks placeholderish. Is it supposed to recognize words? It never did here. Also the rigidbody dragging is kind of annoying at times.
     
  7. Dafu

    Dafu

    Joined:
    Aug 22, 2006
    Posts:
    124
    Yeah it should recognize horizontal words, they will start glittering and then jump out of the soup, making other letters fall down.

    Yup the dragging is a little awkward, it's mostly because the letters don't follow the mouse directly, the mouse just exerts physical forces on them in the direction that it is being dragged. I wasn't sure how to do it otherwise, it is recommended to move rigidbodys by forces only, so I can' just translate to the current position of the mouse pointer.
     
  8. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    I would say use a bigger force and give the rigidbodies more drag. They aren't having frction with the soup surface are they? They shouldn't, drag would be a lot better.

    I tried again and I still can't get them to dissapear.
     

    Attached Files:

  9. Dafu

    Dafu

    Joined:
    Aug 22, 2006
    Posts:
    124
    Interesting, it looks like the english dictionary file is not being read correctly. I'll take a look at it later.
     
  10. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    Whatever that is :)
    I would hardly say it promotes sloppy programming. You can do sloppy programming in any language. Some would say the choice of whether to type gives you flexibility. There are some problems that are much easier to solve with dynamic typing.
     
  11. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    The cookies look a bit unhealty to me.