1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to play html5 game offline?

Discussion in 'General Programming Chat' started by alecstheone, Apr 6, 2015.

  1. alecstheone

    alecstheone Registered Member

    Joined:
    Jan 17, 2015
    Messages:
    67
    Likes Received:
    6
    Location:
    Romania
    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. Here's the game: dropbox.[replace]/s/5x3dk7w693j3os1/caca.rar?dl=0 (replace the [replace] with the corresponding ending -_-)
     
    Last edited: Apr 6, 2015
  2. Conor

    Conor Elite Member

    Joined:
    Nov 7, 2012
    Messages:
    3,577
    Likes Received:
    5,954
    Gender:
    Male
    Location:
    South Africa
    Home Page:
    Failed to load resource: net::ERR_FILE_NOT_FOUND file:///../caca/assets/voyager.js?_=37824753
     
  3. alecstheone

    alecstheone Registered Member

    Joined:
    Jan 17, 2015
    Messages:
    67
    Likes Received:
    6
    Location:
    Romania
    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 dont loads :(
     
  4. alecstheone

    alecstheone Registered Member

    Joined:
    Jan 17, 2015
    Messages:
    67
    Likes Received:
    6
    Location:
    Romania
    Any ideas please??
     
  5. 3tails

    3tails Registered Member

    Joined:
    Jul 18, 2012
    Messages:
    50
    Likes Received:
    6
    Location:
    East Coast, USA
    It sounds like there are some assets (probably supporting javascript files and linked images on the server) that are missing. HTML 5 games aren't your best bet for offline play because there are a bazillion files (not literally, but almost!) needed to make one run. When you download the page you just won't get them all and it's nearly impossible to get them all.

    Better alternatives:

    Anything from Good Old Games
    Yes, this is the non-pirate route, but seriously: there are great games here for less than a trip to McDonalds with no ads, viruses, microtransactions, or always online gameplay to get your little bro in trouble. Pretty much all the games are made for offline play. None of the games have DRM so you can download, use and share them all you want! I got a few games and put them on a flash drive as a present for my little brother. He loves it! They are always having sales so subscribe and keep an eye on the place to save more cash. It's like Steam if steam wasn't a DRM-filled mess.

    Snatch some SWFs (Flash Games).
    Go to somewhere like Crazy monkey Games and try downloading the flash files (.swf) with Flashget or some other browser attachment. This works sometimes, but not always as some flash files make calls to the server to get more data or require other files not included in the base flash file to work.

    Consider ROMs and Vaporware/Abandonware

    Vaporware/Abandonware are programs by professional companies that never were officially released but were leaked anyway because the developers thought it would be a shame to leave them to rot forever with nobody playing them. They are always free and some of them are great fun! Many are older games but they're still very playable. I recommend Morafft's Stones as a fun abandonware game for all ages.

    ROMS are rips of old game carts. Stick to anything from the SNES generation and back to avoid getting hit by piracy suits. Some people also make homebrew ROMs for fun and most of those are free online! You'll want an emulator for each type of ROM you use (ex: zSNES for SNES games) and from there you load the ROM in the emulator to play the game. This can get tricky and some games are better than others, so play around with this yourself before you toss him an emulator and a stack of ROMS.

    If you have a Wii or Wii U you can download some of the old nintendo games for cheap which is the easiest and most legal answer. Doing things the legal way means you don't have to deal with emulators or bad ROMs at all.
     
  6. alecstheone

    alecstheone Registered Member

    Joined:
    Jan 17, 2015
    Messages:
    67
    Likes Received:
    6
    Location:
    Romania
    3tails Thanks you so much for your reply! I'll definitively try your suggested alternatives.
    However there are some exclusive titles only on html5. That's why I would greatly appreciate if I could make this game work and with this also the others on the site softgames because all have the same problem: they don't load
    I tried before with games from other sites and it worked! There's got to be a way to get this one working too.
     
    Last edited: Apr 8, 2015
  7. 3tails

    3tails Registered Member

    Joined:
    Jul 18, 2012
    Messages:
    50
    Likes Received:
    6
    Location:
    East Coast, USA
    Most HTML 5 games actually are clones of older games or have clones of themselves in flash or whatever. For example, Bejewled has dozens of similar games from Pokemon Trozei (easy) to Seven Wonders (hard but fun). There's a good chance the "exclusive" game can be found elsewhere with different art and a different name where it can be played offline. As the vast majority of HTML 5 games are ripoffs of other games that can be found elsewhere, it's really not worth the time and effort to try to locate all the assets and save every last bit of them. You could probably buy any of them from any App store for under $5, buy a better version from Good Old Games, or find a ROM or Vaporware and play it for free.

    Even if you did take the hours of time and painstaking effort to save one tiny HTML5 game, HTML5 is not the only language that runs them as HTML5 is pretty much all graphics and layout stuff with no backend to make it "go". If the game's backend is actually written in server-side language like MYSQL, it won't run without a server even if you did get every single file. That's because server-side languages are made to be accessed from a website only! You could try to set things up so it reads like a server without being online, but that is a major headache and easy to get wrong. ROMS, Vaporware, or just buying games are your best bet.

    If you'tr trying to make a massive arcade by downloading someone's entire games website, know this: There's a good chance that your brother will only really play 1 in 10 games. Too much choice will make him skip through the games, get bored with most of them fast, and only really play his small handful of favorites. There's a strong chance that he might even not have any favorites and call all the games "kids junk" as most HTML5 games really are for the very casual and very young crowd. To avoid this, you need to find out what games he likes. Tell him you are looking for "games like this" and won't get him the exact same games, then focus on his likes.

    Also, downloading a random games site in it's entirety is a bad idea as games can have varied quality, especially when they're free "HTML5" games. You'll need to play each game as far as you can go to be sure there's no game breaking bugs, microtransactions, pay walls (buy to continue) or other bad junk in there As you're going to have to do this anyway regardless of what games you pick, why not focus on high quality games instead? Sometimes having only a couple good games is best. Remember growing up when getting a new game was a real treat? Now, share the joy by adding games slowly, carefully, and picking the best ones.


    What games were you wanting in specific? Half of the softgames games won't load on my machine but I can look at them and guess some similar games.
     
  8. alecstheone

    alecstheone Registered Member

    Joined:
    Jan 17, 2015
    Messages:
    67
    Likes Received:
    6
    Location:
    Romania
    Thanks again for the detailed answer. Actually the game is a clone from the well known android game "amazing thief" and thats why I wanted so much to get it played by my brother because I haven't found any falsh clone. There are several android clones that I would like to get them: "touch and catch", "do not crush", "road crossing", "fly with rope", "aliens", "the tower", "timberman", "tip tap".etc

    Your right. Anyway I never intended to create that massive arcade collection. I wanted him to play some of the top android games in a browser because he don't owns an android device as their colleagues do. Thats why I also opted for html5 games because with the explosion of android games many top titles get cloned over html5.

    Its strange, hovewer I downloaded html5 games before with all the necessary files and stuff and I could get them working. Only softgames gives me headaches even if I downloaded each and every possible file. Maybe its the thing that you say with the serverside even though it seems to contain all the neccessary ressources. I noticed that if I load the game and after I close the internet connection the game runs fine and only the ads wont load. So there's got to be a way :D