-1

I wanted to save some html5 games on the laptop for my little brother to play when he's out of wifi range. I downloaded all the files and changed the paths so that no erros appear. Now when I open index.html a blank page oppen with a loader gif and nothing else loads. I dont understand why? No errors are thrown. The only error is the one that it cannot find ads (when loadvoyager is called). I tried to comment it, still nothing positively happends. This is an archive of the game: https://www.dropbox.com/s/5x3dk7w693j3os1/caca.rar?dl=0

Thank you!

Alex Stanese
  • 735
  • 4
  • 16
  • 33
  • Anyone please? Im sure its not a big deal here. Its just something I may ommit. – Alex Stanese Apr 11 '15 at 08:34
  • pretty sure you are acting against their terms of service: http://www.softgames.de/privacy-terms/ - if they wanted to offer those games free for download, they would. online-only and ad-supported is their business model. If you want to play games offline, buy some games that are made to be played offline. – Patrick Klug Apr 15 '15 at 07:32

2 Answers2

2

Solution

Go to this site:

http://scotty-staging.softgames.de/assets/api/voyager.js

or use this mirror i created:

File only : http://www.mediafire.com/download/4b8uhvm75fbqtwy/voyager.js
Full game: http://www.mediafire.com/download/y8ocia4rr5552jx/html5Game.7z

Save the javascript file in assets and than you can play the game.

update ( problem )

var displayLoadScrn = function(){
        var body = SG.d.getElementsByTagName('body')[0];
        if( typeof body != "undefined" ){
            if( SG.d.getElementById('sg-loadscrn') == null ){
                SG.debug && console.log('show load-screen: complete');
                body.appendChild(loadScrn);
            }
            SG.loadVoyager();  //<---- This is where it goes wrong //
        }
        else{
            if(SG.debug) console.log('show load-screen: body-tag not ready. retrying in '+SG.loadScrnTimer+'ms');
            setTimeout(displayLoadScrn,SG.loadScrnTimer);
        }
    };
    
    displayLoadScrn();

 var displayImage = function(){
        var body = SG.d.getElementsByTagName('body')[0];
        if( typeof body != "undefined" ){
            body.appendChild(loadScrn);
            SG.loadVoyager();  //<---- This is where it also goes wrong //

        }
        else{
            if(SG.debug) console.log('show load-screen: body-tag not ready. retrying in '+SG.loadScrnTimer+'ms');
            setTimeout(displayImage,SG.loadScrnTimer);
        }
    };

    displayImage();

The problem is that you didnt provide the voyager resource script in the assets folder, but it needs to be loaded

loadVoyager : function(){
    var sgc = document.createElement('script'); sgc.type = 'text/javascript'; sgc.async = true;
    var random = Math.floor((Math.random()*100000000)+1);
    //sgc.src = 'http://scotty-staging.softgames.de/assets/api/voyager.js';
    sgc.src = 'assets/voyager.js?_='+random; //<-- this line //
    //sgc.src = '//localhost:3000/assets/api/voyager.js';
    sgc.onload = SG.boot;
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sgc, s);
},

You see the middle "sgc.src = 'assets/voyager.js?='+random;" , that is still trying to load, what I did is removing the commented out lines, I kept the "sgc.src = 'assets/voyager.js?='+random;" uncommented and downloaded the voyager file and placed it in the assets folder.

You cannot comment out the loadvoyager, because it needs to be loaded. Otherwise your page will be loading all the time, with not response

Community
  • 1
  • 1
Jim
  • 361
  • 4
  • 16
  • Have you tried and its working for you??? Because I tried this before and now again and its not working. – Alex Stanese Apr 14 '15 at 15:13
  • @Jim is correct, I downloaded the voyager.js file and added it to assets and it was working for me. I zipped up the result, you can see it here http://tempsend.com/768132DC5D. Also, Adi has a point that the audio files won't load due to cross origin concerns. Using a local server to host the directory would solve that. – Scott Vickers Apr 15 '15 at 02:05
  • 1
    For me it worked. Have you downloaded the full game in my answere? – Jim Apr 15 '15 at 06:45
  • 1
    @Jim its finally working. It was the voyager as you said. However where did you get the voyager because its differite from the one from the site http://d3tlss08qwqpkt.cloudfront.net/assets/api/voyager.js?_=95057341 Its wotking fine with your verison of voyager but with the one from the site its not. – Alex Stanese Apr 15 '15 at 10:22
  • I downloaded the file from that site, then I placed it in my assets folder, because it was referenced to that folder, maybe if you commented out all of the sources and only enabled this one http://scotty-staging.softgames.de/assets/api/voyager.js, it might work than. If you go to that url it might be possible that what you see is not readable, I got it somehow readable to download it. Mark the answer as solved, so people know it has been solved – Jim Apr 15 '15 at 12:55
  • @Jim How did you found that site and how did you made it readable? I need to get other games too and I dont know if the same voyager.js works for all of them. I tried on another game and its not working: https://www.dropbox.com/s/nmgel0p845tiy9r/dnc.rar?dl=0 I'm not sure its because of voyager.js or not. Thanks – Alex Stanese Apr 15 '15 at 13:58
  • @AlexStanese I downloaded that file through visual studio 2013, what chrome and IE do is they open the file, instead of downloading it. Visual studio downloads the file and thats how i got it. The file you provided in your last message doesnt work on the official site aswell and I can't figure out what the problem is. – Jim Apr 15 '15 at 14:17
  • @Jim what do you mean? I uploaded another game with your voyager version. Here's the game on their site: http://games.softgames.de/do-not-crash/ – Alex Stanese Apr 15 '15 at 14:37
  • @AlexStanese The Game doesn't load in my webbrowser – Jim Apr 15 '15 at 14:40
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/75300/discussion-between-alex-stanese-and-jim). – Alex Stanese Apr 15 '15 at 14:53
0

Looks like a file named voyager.js is missing from the assets folder. Open the console in the browser for this detail(F12 in Chrome).

And just to be on the safer side try opening this game through a local-server this way you don't have to worry about all the things the browser is concerned about when running the game.

Adi
  • 5,560
  • 1
  • 24
  • 37
  • Yes, that error appears because it cannot display ads. I also commented the 2 loadvoyager calls from softgames-1.1.js and it's not triggering that error anymore. But still the game don't loads – Alex Stanese Apr 06 '15 at 17:44
  • do you have any idea?? – Alex Stanese Apr 07 '15 at 14:12
  • I went though the source but found nothing unusual, and just one more thing I did not notice `Phaser` being included anywhere. – Adi Apr 07 '15 at 16:17
  • do I need to include it? I didn't change anything in the sorce files just commented the voyager (ads). If you say that the code is correct why is it not loading? Or does the game load for you? – Alex Stanese Apr 07 '15 at 19:39
  • No it does not load for me either, If you have not changed any of the source then I am really not sure were the problem is. – Adi Apr 08 '15 at 02:52