Results 1 to 2 of 2

This is a discussion on Tomogatchi Extension troubles? within the Plugins Troubleshooting section, part of the Chrome Plugins category: http://aaronrls01.webs.com/Examples/...iExtension.zip It's just acting weird. Right now, if your new, it makes you do the tutoral, if you have atleast ...


  1. #1
    ThatGuy is offline Junior Member
    Join Date
    Mar 2010
    Posts
    9

    Default Tomogatchi Extension troubles?

    http://aaronrls01.webs.com/Examples/...iExtension.zip



    It's just acting weird. Right now, if your new, it makes you do the tutoral, if you have atleast 1 pet before it skips it. This is NOTHING yet just the ghetto begings of the extension. The code is pretty simple, but it seems when I call the Game() function it likes to return when it's done.....I can't have that 0_o.....I never really looked into this every doing javascript, but......How can I get it NOT to return? This is thrown together in about an hour, sorry, I have to start somewhere and this is the alpha beta beta alpha.....I hope you guys can understand it, I have to get going soon. See you guys later ^_^

  2. #2
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    Looping? I don't really want to look at the code right now, but generally, because games are doing stuff constantly, they need to be in a loop.
    You'll want a non-blocking loop, which in JavaScript, your only option is a setTimeout loop.
    Code:
    function Game(){
    //game code...
    setTimeout(Game,100);
    }
    So Game() still returns, it just calls itself again directly before it does, to run 0.1 seconds from returning. The lag allows the browser to function normally in between frames, you're welcome to adjust it to whatever you think is reasonable.
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

Similar Threads

  1. chorme troubles
    By chormi in forum Chrome Troubleshooting
    Replies: 2
    Last Post: 02-24-2010, 09:34 AM
  2. Downloading and Installing Troubles
    By BJSwimmer in forum Chrome Troubleshooting
    Replies: 5
    Last Post: 08-06-2009, 08:26 AM
  3. php form troubles...
    By Zemo in forum Chrome Troubleshooting
    Replies: 3
    Last Post: 06-06-2009, 04:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •