Upload your game to Dropbox

Favourite 40 favourites
Tutorial written by AshleyOriginally published on 18th, July 2011 - 9 revisions

Have you finished your game and want to share it with the world? If you have your own website and some HTML know-how, you probably are comfortable integrating the exported files to your site. However, if you don't have your own website, you can share your games on Dropbox!

You can also upload your game to Google Drive.

Get a Dropbox account

If you don't have one already, head to Dropbox.com and sign up an account. It's free, and you get about 2GB of storage (that's plenty for our games!).

While you're getting a Dropbox account, it is strongly recommended to set up a daily backup to your Dropbox folder to keep your work safe no matter what happens. For more information, see the tutorial Keep your work safe with Construct 2's backup options.

Install the Dropbox app

As part of getting a Dropbox account, you'll install the Dropbox app for your computer. It should make a Dropbox icon appear in the system tray (the icons by the clock in the start menu).

The Dropbox icon.
Double-click the icon to open your Dropbox folder. This is a folder on your computer which is automatically synchronised with Dropbox's servers. So any files you copy to this folder will be automatically uploaded shortly after (providing you're connected to the internet).

The Public folder

All files and folders on Dropbox are private, so nobody else can access them unless you invite other people to share. However, the exception is the public folder, which can be seen by anyone on the internet. If you want to share your project publicly, this is where to put it.

Note: new accounts signed up to Dropbox no longer have a Public folder by default. Older accounts should already have it, but if you're missing it, you can enable it by signing in and clicking this link to enable the Public folder on your account.

You must put the entire project in the Public folder - it can be in a subfolder too, but it must be under the Public folder, otherwise the exported project will not work. Even if you place your project in a private folder and get a public link for index.html, it still will not work: you will have only made that single file public, and none of the other many files required for the game to work will be available.

Export your project

Open the game you want to share. In the File menu, click Export project.

Export Project
Export as a HTML5 web site (usually the default). Set the folder to a subfolder in the Dropbox Public folder, e.g.: C:\Users\Ashley\Dropbox\Public\MySuperAwesomeGame

Click Export, and your project is exported. The Dropbox icon in the Start bar should change to an "uploading" icon. Hover your mouse over the icon for status. After a while, it will change back to a "complete" icon, with a green tick. Your project is now uploaded!

Getting a public link

In Windows Explorer, open the folder you exported to, where index.html is. Right-click index.html and select Copy public link.

Copy Public Link


Now you have a link to your publicly viewable project on your clipboard!

Sharing the link

You're now armed with a public link to your game that you can paste anywhere. Paste it to your friends, send it by email, link to it from your blog, tweet it, put it on Facebook, Google+ it, do what you like! Your game is now accessible to the whole world. Have fun! :)

Bandwidth limits

Dropbox is a convenient way to share your project with a small number of people. However, note that Dropbox is a personal file host, so the free account has some fairly low bandwidth limits. If too many people play the game, Dropbox will shut down your public folder with a "bandwidth exceeded" message. If you want a more reliable host in case your game is popular, have a look at the tutorial Publishing and promoting your Construct 2 game for some alternative ideas.

Congratulations on finishing this tutorial!

Did you learn a lot from it? Share it now with your friends!

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.

Comments

2
ludodesign 22.5k rep

This is so fast, help so much.

Monday, July 25, 2011 at 9:45:41 PM
1
techdojo 2,231 rep

There's an even EASIER way to get your app onto dropbox.
Simply install the dropbox client on your machine and then copy the entire exported project over to the dropbox folder on your local machine and bingo your project will be online - you can even get the public link locally by rightclicking on the project folder!

Wednesday, October 19, 2011 at 2:35:15 PM
1
Bigheti 12.7k rep

I did it exactly this article and...voilá! I can demonstrate my games for the peoples. Tks for this way!

Tuesday, November 15, 2011 at 6:15:35 PM
0
dimakoles 2,603 rep

what is your dropbox URL?

Monday, November 21, 2011 at 12:06:05 PM
1
Unknown 3,243 rep

this very good tutorial, helped me a lot in some doubt.

Thursday, November 24, 2011 at 5:19:25 PM
0
devilsgarage 2,781 rep

Comment by dimakoles

what is your dropbox URL?
I believe dropbox auto generates a URL for your specific index.html file.

Saturday, November 26, 2011 at 10:16:22 AM
0
raptor0723 3,135 rep

Error (404)
We can't find the page you're looking for. Check out our Help Center and forums for help, or head back to home.

:(

Thursday, March 22, 2012 at 5:04:01 PM
0
HTML5Nomad 2,044 rep

I just finished the first tutorial, and runs great when started from Construct2 (which I have to say is just amazing, thank you Scirra!) I exported it to a folder.

I uploaded the folder (including the images subfolder) to my Dropbox public folder, and got the public link to index.html.

http://dl.dropbox.com/u/1526900/FirstHTML5Game/index.html

Whenever I try this link (using latest Firefox and Chrome), all I get a black screen with your link at the bottom. My friend has the same results.

Since I can't get it to run from the hard drive, and Dropbox isn't working, I may have to leave Construct2 for some other program. Stop this from happening!

Saturday, March 24, 2012 at 7:17:30 AM
1
HTML5Nomad 2,044 rep

For anyone else who is having the above problem, don't spend two hours looking and just go here:

http://www.scirra.com/forum/r-81-log-is-not-defined-c2runtimejs1510_topic49919.html

or the relevant bit that fixed my problems, from Geo:

---
1. open the exported index.html in notepad
2. just before the </head> line, add this line:

<script>function log(str) {}</script>
---

Thank you, Geo!

Saturday, March 24, 2012 at 9:51:01 AM
0
Ashley 113.1k rep

@HTML5Nomad that bug was fixed in r82 and we're already on r83, I'd recommend staying up to date!

Saturday, March 24, 2012 at 2:50:16 PM
0
Blue Hare 2,462 rep

When I upload my game and open index.html all I get is a black screen.

I'm using r84 so this shouldn't be the bug in r81

And it seems dropbox has been updated there is no public folder to be found and you can't copy public link by right clicking index.html.

Any ideas how to fix this?

Wednesday, March 28, 2012 at 4:58:41 PM
1
Blue Hare 2,462 rep

Problem solved.

It seems I deleted public folder with the other crap. I had to recreate it. Stupid thing really, that public folder has to be named "public" in order to work.

And no "add public folder" button, you have to add new folder and name it public.

Wednesday, March 28, 2012 at 5:25:27 PM
0
yearzero 2,037 rep

@Ashley I don't believe the bug HTML5Nomad mentions was fixed... I always get the latest update as soon as it's released and every time I've exported for HTML5 I have the same issue he did. (That is: the black screen with Construct 2 link under it).

Adding the line before </html> that he mentions, however, fixed it for me as well.

Wednesday, April 11, 2012 at 6:13:22 AM
0
Ashley 113.1k rep

@yearzero - we fixed that bug long ago and had many confirmations from different users that it was indeed fixed - I'm sure it must be something else. Did you check the browser error console?

Wednesday, April 11, 2012 at 2:51:54 PM
0
iggyvolz 2,188 rep

You don't even have to copy the folder from your desktop to Dropbox, you can just export it directly to your public folder. That way, you can make a quick change and with the press of a button (and enter), your new version will go out to the public.

Thursday, April 19, 2012 at 9:56:11 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.