Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post

    Game loading JavaScript

    Hi,
    well i searched at google and was not exactly able to find what i was looking for, i am looking for a script the shows by logo while loading the game at back end, shows loading percentage or bar representing how game is loaded and then makes the my logo disappear once the game is loaded e-g like this site has used http://www.gamegape.com/en-2095-elemental-battles.html
    if some thing like this is not available can someone atleast tell me how this site has done it, so we could copy it from them ^_^

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,171
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    That's a FLASH animation. Nothing to do with JavaScript.

    You can do similar stuff with JavaScript, but you need server-side help to know what percentage is loaded. If you don't mind "faking" the percentage, you can do it.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Old Pedant View Post
    That's a FLASH animation. Nothing to do with JavaScript.

    You can do similar stuff with JavaScript, but you need server-side help to know what percentage is loaded. If you don't mind "faking" the percentage, you can do it.
    First of all thanks for reply,
    well i do have server side access as i upload all of the games so i have access to it but i don't want to fake it, as faking is not an option for me. I am using games in one of the lightbox that i have. And in that lightbox even if you have not triggered it (in simple language even if you have not opened it) the fake preloader starts working, so before someone clicks play, all the time has ran out already ^_^

    I have seen many sites using scripts to show the actual loading not through flash

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,171
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    It depends on WHAT you are downloading.

    If you are just downloading *data* then you could easily download it in chunks and show the progress as each new chunk is received.

    I'm not sure what it means, though, to download a JavaScript-written game or whatever. How do you measure what percentage of the *code* has been downloaded?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #5
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Old Pedant View Post
    It depends on WHAT you are downloading.

    If you are just downloading *data* then you could easily download it in chunks and show the progress as each new chunk is received.

    I'm not sure what it means, though, to download a JavaScript-written game or whatever. How do you measure what percentage of the *code* has been downloaded?
    Well i found a script that can do that and works perfectly i have tested it but there is a problem that is teasing, can you sort out that part of script?
    here you can see the post that i have made http://www.codingforums.com/showthre...44#post1208144


  •  

    Tags for this Thread

    Posting Permissions

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