Publishing game that is way over file size and javascript extension

My friends and I recently finished a game and want to publish it. We have 2 questions regarding Snap!

1). Our project size is way too big. It's almost 60 MB. We have been saving it on our computer, but we really want to publish it on Snap! We know you can use the google drive link to the XML file, and let the user download it and then open it in Snap! However, we will be mostly sending this project to people without any coding or Snap! experience (such as our family and friends) and they probably won't play it if the process to open the game is too complicated.

2). Is there a way to automatically enable the javascript extension when the project first opens or save the setting when exporting it? We have a javascript code in our script and we want to make sure it works when we publish it without having to manually enable it.

Thank you so much for the help! This is my first time posting on a forum and our first self-made Snap! project. We really appreciate any help! Have a nice day!

Hi, welcome to the forum!

1․ Alas, file space costs money, and Snap! is not a well-funded project. The downside of exponential growth in users is exponential growth in costs. There's a tradeoff between supporting a large number of users and supporting a small number of users with huge projects, and we think the first of those is a better choice.

We are looking into ways to allow you to support your own file storage while publishing projects, such as letting you link your Snap! account with third party file services such as Dropbox and Google Drive. It's not our most urgent cloud support task, so don't hold your breath, but I hope we'll get there eventually.

Meanwhile, most huge projects have a lot of media, rather than a lot of code. Are your media sourced online? If so, can you save the project without the media and have it load the data when you start it, via the URL block?

2․ Alas, that would defeat the object of the exercise, which is precisely not to allow project authors to run Javascript code without the explicit permission of the user. I wish we didn't have to worry about security, but we were once badly burned by a malicious project using Javascript and so here we are.

A while ago I made a block to load projects stored in Google Drive. The downside, however, was that it used JavaScript and required a Google Drive API key.

if you store a sprite file that can be accessed using the URL block then you can do this:
my sciSnap! script pic (1)
whitch will import the sprite if FOO is a sprite XML

like this:
my sciSnap! script pic (2)

XML files, in my experience, usually aren’t allowed to be directly downloaded from Google Drive links, so I don’t think that would work.

Thank you so much for the reply! We made all the artwork and audio files our selves so they are not sourced online. Is there any way to embed the snap! project on a website without publishing it? We are trying to possibly publish it by making our own website if we can't publish it on Snap! Also, our instructor is Victoria if you still remember her.

Thank you so much for the reply. We made all the artworks and audios ourselves but we might try to transform them all into UMLs by putting them on google drive. We are not sure it will work though but thank you for the suggestion!

Thank you so much for replying! Do you think you can elaborate on how you did it?

you could convert it into a text file before putting it on google drive

If you would like to host it on your website, you can find the latest Snap! source code here:

If you fork the source code you can modify it to have JavaScript enabled by default by following these steps:

  • Navigate to the src folder and open threads.js in your favorite code editor.
  • Search for Process.prototype.enableJS = false once the file has opened (In most editors you can use the key combo CtrlF)
  • Replace the false part with true once you have found the correct line.

To test, you can open snap.html in the root folder of your Snap! installation, and check to see if the Javascript extensions checkbox is ticked.

After that, you can embed the Snap! installation to your website and use API.js to control the stage (put it into presentation mode) and load your project.

You can find the docs for API.js here:

Sure, save it to your computer as you're already doing, and copy it to your web server.

Sure! Say hi for me.

Yes, I will send it tomorrow or Saturday. I am currently on vacation.

Thank you for the information!

Thank you so much! If it's too much trouble you don't have to send it. But thanks for the help!

I think we will try that then. Thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.