Open SupercraftD opened 2 years ago
Hi! There are some steps here, and will work only for HTML5 games:
Open the direct link of the game in Kongregate (or any other relevant website). Can be found by opening the game on Kongregate normally, and then searching in the page source for the location of the game IFrame.
On the direct link, press ctrl+s to save the page to your computer, and choose the option to save as type "Webpage, Complete". This will transfer some of the basic files the game uses - index.html, and css/javascript files.
The files will get a ".download" file type, you will have to change them to the original type.
Based on the game file structure, you might have to organize some of your files in specific folders.
Now it's time to run the game locally. I do that by setting up an "http-server" on the relevant folder with NodeJS, but there are probably more ways to do that. Then I can go to the url "http://127.0.0.1:8080/" and it will activate the index.html file.
The game won't work, because lot of files will be missing - image files, sound files, JSON files, etc. Either the NodeJS console or the browser console will tell you what went wrong, and you will have to download the relevant files one-by-one from Kongregate.
After you downloaded everything successfully, all that is left is to do some basic clean-up on the game files. For example, remove references to Kongregate API in the code; or similar stuff if you downloaded the game from other sites (like Armor Games or Coolmathgames).
I'm experienced with this process by now, but it's not trivial at all.
Thanks!
Hi! Sorry to bother you. I tried to download some things off coolmath games following your tips, and it was mostly going smoothly until I had to download the other assets. How do you download specific files one-by-one like mentioned in your post? Is it something only on Kongregate and not on Coolmath?
Thanks in advance!
You can download the specific asset files, from any website on which the game is hosted. To do that you will need to find the direct path to those files. This is done by combining the direct link to the game (found in previous step), and the relative path to each file based on the game folders structure. The browser console or the "http-server" console should tell the path to a missing file, I think.
For example, direct link to the game on Kongregate is: http://game309173.konggames.com/gamez/0030/9173/live/
and the direct link to the textures image is: https://game309173.konggames.com/gamez/0030/9173/live/html5game/A-Pirate-and-his-Crates_Kong_texture_0.png
Hi! There are some steps here, and will work only for HTML5 games:
- Open the direct link of the game in Kongregate (or any other relevant website). Can be found by opening the game on Kongregate normally, and then searching in the page source for the location of the game IFrame.
- On the direct link, press ctrl+s to save the page to your computer, and choose the option to save as type "Webpage, Complete". This will transfer some of the basic files the game uses - index.html, and css/javascript files.
- The files will get a ".download" file type, you will have to change them to the original type.
- Based on the game file structure, you might have to organize some of your files in specific folders.
- Now it's time to run the game locally. I do that by setting up an "http-server" on the relevant folder with NodeJS, but there are probably more ways to do that. Then I can go to the url "http://127.0.0.1:8080/" and it will activate the index.html file.
- The game won't work, because lot of files will be missing - image files, sound files, JSON files, etc. Either the NodeJS console or the browser console will tell you what went wrong, and you will have to download the relevant files one-by-one from Kongregate.
- After you downloaded everything successfully, all that is left is to do some basic clean-up on the game files. For example, remove references to Kongregate API in the code; or similar stuff if you downloaded the game from other sites (like Armor Games or Coolmathgames).
I'm experienced with this process by now, but it's not trivial at all.
I was wondering what do you mean by removing references to kongregate api?
Most games on Kongregate use the Kongregate api, to be able to give achievements to the players and save their data on highscore leaderboards. Because my version of this game is detached from Kongregate, I don't want the relevant code that comes it with.
Sorry not an issue, but I've been a fan of your autosplitters for a while. Everyone at my school plays them! I've always wondered how you took the game files from Kongregate and then made it run on its own. Can you please share? Thanks!