Curation Tutorial: Difference between revisions

From Flashpoint Datahub
Jump to navigation Jump to search
(Undo revision 2222 by ThePowerPlayer (talk))
(Replaced Curation Tutorial)
Line 1: Line 1:
The following page is an introductory tutorial on how Flashpoint works, and how to curate games.
This page is a basic tutorial on how Flashpoint works and how to curate games to add them to Flashpoint.


For more advanced platform-specific tutorials, see [[Platforms]].
For more advanced platform-specific tutorials, see [[Platforms]].


For more details on the how to package a curation, see [[Curation Format]].
For more details on how to package a curation, see [[Curation Format]].


== How Flashpoint Works ==
== How Flashpoint Works ==
[[File:HowFlashpointRedirects.png|thumb|A diagram showing how Flashpoint's technology works.]]


{{:How Flashpoint Works}}
Flashpoint is more than just a program to play files; rather, it's a combination of three programs working in parallel:
* a '''web server''', which hosts game files from a hard drive and pretends to be the original Internet source the games ran off of,
* a '''Redirector''', which points the game files and resources to the server to make them believe they're on the Internet,
* and a '''launcher''', the user interface to select and play games from.


Flashpoint itself also comes in three primary versions:
* '''Infinity''', the version that downloads games from a server as you play them,
* '''Ultimate''', the gigantic version with every game included and ready for offline play,
* and '''Core''', the version with only a few games for testing, most often used by Curators to add games.
Infinity will download files as you play games that request them, while Ultimate and Core know the files are already there. All three make the files believe they're being ran on their original source. This has numerous benefits, the two most important being bypassing '''sitelocks''' and supporting '''multi-asset''' games. For now, though, let's walk through curating a single-asset SWF file.


== Setting Up Our Software ==
== Setting Up Our Software ==


To download game files from the Internet, you'll need:
* Flashpoint Core, used to add and test new games. It can be found at the bottom of our [https://bluemaxima.org/flashpoint/downloads/ Downloads] page.
* A modern browser such as Chrome or Firefox, which have a built in Network monitor that we can use to find and grab individual SWFs, and sometimes multi-asset titles with low amounts of resources.
* cURLsDownloader, found in the Utilities folder of the Flashpoint Core directory. This isn't strictly necessary, but it helps immensely; you'll see why later on.


To actually rip games from the internet, we are gonna need some software. This guide will be purely curating Flash games; if you want to curate something a little more complicated, it'll need more than this guide. This is just meant to show you how Flashpoint works at a base level; you can build on this knowledge later if you need to on other tutorials.
Download Flashpoint Core, extract it to your hard drive, run it via its shortcut in the extracted folder, and make sure that the included games play properly before you continue.
 
 
With that said, you will need some extra software:
 
 
* Flashpoint Core. This is a version of Flashpoint that only has a handful of games; it's mainly meant for adding, testing and just generally playing around with the platform. You can usually find a link to it [http://bluemaxima.org/flashpoint/downloads/ at the bottom of the Downloads page].
* If you're doing simple, one file SWF games, you can make do with a modern browser like Chrome or Firefox. These browsers have a built in network monitor that we can use to find and grab individual SWFs, and sometimes multi-asset titles with low amounts of resources.
 
 
There are more tools that you can use, but since we're not dealing with multi-asset games yet, we're just gonna work with these two for now. Download Flashpoint Core, extract it to your hard drive, run it via the usual shortcut, and make sure that the included games play properly before you continue.
 
 
== Grabbing Our First Game From The Internet ==
 
 
We're going to start really simple; we're going to curate a game that's a single SWF file, has no sitelock, and is just easy to get along with.
 
 
[https://www.newgrounds.com/portal/view/218014 Here's the link]. Yep, it's Interactive Buddy. We already have it (and you should always check the [[Game Master List]] before you curate something) but it works well as a tutorial. You might need to enable Flash to get it to play (just clicking on the middle of the screen and clicking 'Enable Flash' in the top left should be enough. It's worth noting that you can't do this tutorial if you have the Newgrounds Player enabled.)
 
 
Now, if you're using Chrome or Firefox, press F12, and don't panic at the overwhelming panel that just showed up on one side of the screen. We only need to focus on a couple of things going on with this. You should see a tab called "Network"; click it. This panel lets us see what is loading on the page in real time as it loads. It should be on 'All' by default, which *might* work, but thankfully, the browser makes this easy for us by letting us filter files that are 'abnormal' by clicking the "Other" tab in the row next to the "Filter" box. Once you have the Network tab open and Other highlighted, click the Refresh button on your browser.
 
 
You'll probably see a fair few weird entries there, but if you hover your mouse over each entry on the list, you'll get a full URL of each file as a small tooltip. There's one in particular you're looking for: here's a clue, the URL will have "swf" somewhere close to the end. You can also look at the "Size" column if this is your first time loading the file; it'll probably be a lot bigger than most other things on the page. Once you have this file, right click on it, and click "Open in New Tab". You should be prompted to save the SWF somewhere, but if not, just press Ctrl-S and save the file somewhere you'll remember.
 
 
== Moving Our Game Into Flashpoint ==
 
 
Congrats, you just downloaded your first SWF. There's more to it than this though, don't celebrate yet. Go to where you saved that file, and copy it (right-click in Windows, hopefully you know this by now). Navigate to where you extracted Flashpoint Core, and go into the Server folder, then the htdocs folder.
 
 
Time for a bit of an explanation. This 'htdocs' folder is the root of our fake internet, the very peak of it, and the folders that go down are fake 'websites' that are hosted in Flashpoint when it launches, and for our software to talk to. We need to keep an eye where we paste any files into this folder, so that we can efficiently put our game into Flashpoint later on. With that said, you should already have an 'uploads.ungrounded.net' folder in the htdocs folder. For now, let's go into that folder, then paste the SWF we just downloaded straight in there.
 
 
Now we can go back up two directories and launch Flashpoint Core. In Flashpoint Core, you should see, in the bottom left, a "New Game" button that you can click, and get a list of things on the right. There are four things we need to pay attention to at this very moment:
 
 
* The title. We need to be able to tell it apart. Name it "Interactive Buddy" or "Test Game" or anything you like, it doesn't matter at this point.
* The Platform. This determines what XML this goes into (our database is split into different platforms - Flash, Unity, etc.). For the purpose of using Core for testing purposes, this isn't massively important, but you need to select one for this to work, so just select Flash.
* The Application Path. This determines what piece of software is used to start up the file we specify. In this case we're using a single, simple SWF, so we want to pick out the Flash Player Projector; in the current version of Core, this is listed as "FPSoftware\Flash\flashplayer_32_sa.exe", so pick that.
* The Launch Command.
 


There's the big one. We need to talk about URLs now. On the normal internet, a URL, for example, will look like this:
== Finding the Source of Your Game ==


https://uploads.ungrounded.net/218000/218014_DAbuddy_latest.swf?123
As a tutorial, we'll start by curating the simplest type of Flash game: a single SWF file that isn't sitelocked, specifically [https://www.newgrounds.com/portal/view/218014 Interactive Buddy]. You might need to enable Flash in your browser to get it to play (this tutorial won't work if you're using another player such as the Newgrounds Player).


This URL is split into a few sections.
[[File:SWFAssetInChrome.png|thumb|The SWF for Interactive Buddy in Chrome's network tab; it should look similar on Firefox.]]
* If you're using Chrome or Firefox, press F12 to open the Developer Tools and click on the Network tab. This shows us every asset that loads on the page in real time.
* You can filter miscellaneous types of assets such as Flash files by clicking the Other tab within the Network tab.
* Refresh the page to find that a few assets loaded. The game file has an extension of '''.swf''', and has a type of x-shockwave-flash in the table.
* Once you find the SWF, you can hover over it to see its URL and confirm that it ends in .swf.
* Right-click the asset and select Copy > Copy link address.


== Generating Content Folders with cURLsDownloader ==


* "https://" < this is what determines what protocol is used. For those of you who don't want an internet lesson, this will pretty much always be a variation of http:// or https://
If you've followed the tutorial up to this point, you should have copied this link to the SWF for Interactive Buddy:
* "uploads.ungrounded.net" < this is a domain; basically a folder that determines where something is on the internet.
* "/218000/218014_DAbuddy_latest.swf?123" < this is the rest of the domain; folders leading down to the file, which will load.


https://uploads.ungrounded.net/218000/218014_DAbuddy_latest.swf?123


We need to create a URL inside our fake internet for our Flashpoint Core to load in the same way, so let's put one together, piece by piece.
Flashpoint calls files from a file directory created from the URL of a game, packaged into a folder called '''content''' for each curation. Instead of creating a content folder manually, though, we can use a tool called cURLsDownloader to do it automatically.


* cURLsDownloader should be in your Flashpoint Core folder > Utilities > cURLsDownloader.
* Open cURLsDownloader and paste your game URL into its input.
* Select Option 1 to grab the SWF file.
* cURLsDownloader will automatically download the SWF and create a content folder for Flashpoint, located in its Downloads folder. Use option 1 when finished if it detects a broken filename, which will very likely fix it.


The first part is the "https://", however, I need to say this here. Due to a lack of technology capable of doing the job, using a "https://" in the Launch Command will always, '''always''' load files from the real internet instead of from the fake one. This cannot be avoided, this is an easy mistake to make, and it sucks, but it must be noted and checked for. We can end up accidentally loading a game from the internet, seeing it 'working' in Flashpoint, and then have a surprised Pikachu face six months later when the site goes down and suddenly the game doesn't work. To summarize, '''always use http:// at the beginning of a launch command, NO EXCEPTIONS.'''
We'll come back to this Downloads folder later to move it to its proper place.


http://
== Curating with Flashpoint Core ==
[[File:LaunchCommandMatchesContent.png|thumb|What your curation should look like when you're finished. Note how the Launch Command matches the Content Files.]]
The most optimal way to curate is to use the "Curate" tab in Flashpoint Core. To do that, open Core and select the Curate tab, then click the New Curation button to see a list of fields to fill in. These are the most important ones:
* The Title, which tells the game apart from others. Name it "Interactive Buddy" or "Test Game" or anything you like, it doesn't matter right now.
* The Platform, which determines where the game goes inside our database, split into several platforms (Flash, Shockwave, Unity, etc). When using Core for testing purposes, this isn't massively important, but Flash is selected for SWF files and by default.
* The Application Path. This determines what piece of software is used to start up the file we specify. In this case we're using a single, simple SWF, so we'll use the Flash Player Projector; in the current version of Core, this is listed as "FPSoftware\Flash\flashplayer_32_sa.exe", and is selected by default.
* The Launch Command, based on the URL of the game's source file.


To summarize, the Launch Command of a game is most often the URL of its source file. However, '''be extremely careful''' about the beginning of this game's URL; it uses HTTPS instead of HTTP. Flashpoint can't handle using HTTPS, and will download assets from the live Internet instead of from its fake Internet server, which can lead to a game going off the web later and not working in Flashpoint when that happens. To summarize, '''no matter the URL, always use http:// at the beginning of any Launch Command, NO EXCEPTIONS.'''


The second part is our domain. On the real internet, this is almost impossible to visualize; top level domains are talked to via DNS, which redirects you to the correct server. Thanks to the way Flashpoint works, though? It's a lot more simple than that. Our domains are all contained in the first folder of htdocs; all of those folders you saw earlier are domains. In our case, we moved our SWF into the 'uploads.ungrounded.net' folder; so that'll be the next part of our URL.
To add the content you generated earlier using cURLsDownloader, click the "Open Folder" button at the bottom of your curation and you should see a "content" folder. Move everything from cURLsDownloader's "Downloads" folder into this "content" folder.


http://uploads.ungrounded.net
Take a look at the image to the right to see how your tutorial curation should look. If any field is highlighted in yellow, it's a warning; take another look at your own curation and see what's wrong. Curations of your own should have as much metadata filled in as possible, but the fields mentioned above ensure the game will work in Flashpoint. You can fill in the rest of the fields if you like, but it's not necessary right now.


Once you're confident your curation looks good, click the "Run" button next to the "Open Folder" button to test the game and you should see Interactive Buddy pop up.


The third part and beyond are the subfolders inside the domain, and the file on the end. Every time you go into a folder, whether it be the domain or any subfolders in said domain, you should add a slash onto the end, like so:
Congrats! You've successfully made a curation. Now let's see how to deal with more complex games.
 
http://uploads.ungrounded.net/
 
 
This tells our fake internet to look inside the uploads.ungrounded.net folder in the htdocs folder for where it needs to go next. If we wanted to go into another folder, we would need to add the folder name on the end of the URL, followed by another slash. For example, if I wanted to go into the "59000" folder? It would look something like this:
 
http://uploads.ungrounded.net/59000/
 
 
In our case, at this moment? We don't want to do that; our SWF that we downloaded and copied in the previous steps is just in uploads.ungrounded.net. When we're in the folder we need to be in to get to our SWF, all that's left is to put the file name on the end of the launch command. So our launch command, assuming you didn't rename the SWF you downloaded before (good behaviour, you'll see why in a bit), your launch command should look like the line below.
 
http://uploads.ungrounded.net/218014_DAbuddy_latest.swf
 
 
Once you have your full launch command, paste it into the Launch Command box. Once you have a title, platform, application path and launch command filled in, click the tick in the top right of the edit dialog, and the box containing the title should appear in the games list, in which case you should be able to just double click said box to launch the game. If you do so and see Interactive Buddy after a couple of seconds? Congrats, you did it.
 


== Sitelocks ==
== Sitelocks ==
[[File:AndkonSitelock.png|thumb|The sitelock telling you to go to Andkon Arcade, despite the game already being on Andkon Arcade.]]
Some Flash games will check the domain the game is being hosted on, and "lock" the game from being played if it's not on the correct site, called a sitelock. This can even occur, though very rarely, on the original site where the game was hosted, as is the case with [http://andkon.com/arcade/adventureaction/monsterslayers/ Monster Slayers]. Click this link and try to play the game; your result will be the image on the right. Despite the game already being hosted on andkon.com, it'll activate its sitelock and tell you to go to Andkon Arcade. Try to find and download the SWF using the method described in the previous section.


You should find this source URL:


That's your first game working in Flashpoint. Now to do something that's a little more...how do we put it, '''locked'''. See, Flash games were well known back in the day for being 'sitelocked'; a process in which the game would check what domain the game was being hosted on, on startup. If it wasn't on a domain that it would like, it would fail, and usually prevent you from playing the game. While this did help things like revenue shares, at least to some point, sitelocks would eventually come back to bite Flash preservation in the butt in more than one way. A lot of Flash games would, if downloaded to the hard drive, still run off the same sitelock, and since Flash can also detect whether it's being run via local files, the sitelocks would trigger and you couldn't play the game.
http://andkon.com/arcade/adventureaction/monsterslayers/monsterslayers.swf


This ironic sitelock is due to Andkon's main domain changing to "andkon.com", when it used to be "arcade.andkon.com". Therefore, changing the "andkon.com" in the URL to "arcade.andkon.com" will give us a Launch Command that bypasses the sitelock:


There is also a second case though, which is much rarer, and 110% more hilarious. See, sometimes website designs can change, and this can result in certain games sitelocks being specific enough that even the little changes they made are enough to set off the sitelock. Allow me to show you an example, which we're going to download and curate. Open this URL in your browser, and try to play the game in question: http://andkon.com/arcade/adventureaction/monsterslayers/
http://arcade.andkon.com/arcade/adventureaction/monsterslayers/monsterslayers.swf


This particular URL uses http:// instead of https://, but '''always make sure the Launch Command uses http://''' regardless.


Yup, it actually sitelocks, and not only that, it tells you to '''go to Andkon Arcade, where you already are, to play the game'''. I'll let you get over the fit of the giggles this absolute nonsense brings about, and let you grab the SWF the normal way. Once you have it, we're going to put it exactly where it is on the real internet, then load it via Flashpoint, to show you that this isn't a fluke, this is actually the sitelock in action.
Try to create a new curation by downloading the SWF from the top URL using cURLsDownloader, and setting the bottom URL as the Launch Command. Use the Curate tab in Flashpoint Core to test your game; Flashpoint should bypass the sitelock and allow you to play Monster Slayers as Andkon once did.


It's important to use correct Launch Commands and proper content folders for every curation you make (even if you're curating a non-sitelocked SWF), to ensure that all the game's assets are loaded exactly as they would be on the real Internet, without running into any possible sitelocks on the way (even if the game appears to be playable outside of Flashpoint).


So here's the URL of the SWF in question.
== Using cURLsDownloader for Multi-Asset Games ==


http://andkon.com/arcade/adventureaction/monsterslayers/monsterslayers.swf
Up until now, we've only curated single-asset SWF files. However, many games were made at a time where downloading one large file was a large pain. This meant games were split into several, smaller assets. Whether these games load all of the assets at once or if they load assets as you play the game depends on how they were programmed, making curation of multi-asset games more difficult than single-assets.  


Let's break it apart into individual folders.
Let's check out a multi-asset game called [https://www.newgrounds.com/portal/view/372340 Gateway II]. Here's the link to the main SWF of the game:
https://uploads.ungrounded.net/372000/372340_gateway_2.swf?1547470930
Try curating this SWF as described above and testing it in Flashpoint with the Run button. You'll only get to the language select screen before the game freezes once you pick one.  


http:// andkon.com / arcade / adventureaction / monsterslayers / monsterslayers.swf
Check the Redirector window for anything labeled (404 Not Found). This means the game was calling for one or more assets that it didn't have offline, making the game freeze because it failed to load a required asset. Thankfully, Flashpoint can handle these assets as long as they're downloaded properly.  


Once again, instead of manually downloading lots of assets, we can use cURLsDownloader to save time and effort.


If you've been paying attention you know exactly what to do here, but if you don't, we're gonna make this exact path in Flashpoint Core. To do so, we're gonna go to Server/htdocs again, and we're gonna make an 'andkon.com' folder, then we're gonna go into that and make an 'arcade' folder, then 'adventureaction', then 'monsterslayers', then we're gonna paste that SWF in there. The upside of this approach of placing the URL exactly where it is on the real internet, is that we can copy this URL, and use it as our Launch Command, exactly as is!
'''Option 1:''' Download the assets called by the game as you test it in Flashpoint Core.
# In the Redirector, select Copy > Copy all 404 Not Found URLs and paste the results into a text file.  
# Save the text file and drag it over cURLsDownloader.
# Wait for cURLsDownloader to finish fetching assets. Use option 1 when finished if it detects broken filenames, which will very likely fix them.
# Move the contents of the Downloads folder in cURLsDownloader to the content folder of your curation.
# Test your game with the Run button and repeat this process if any more 404 errors appear in the Redirector.


'''Option 2:''' Download all the assets that the source page of a game loads as you play it on the live Internet (but some assets downloaded won't be part of the game).
# Once again, press F12 to open your browser's Network viewer, then refresh the page.
# Play through your game on the Internet, loading assets as you go.
# When you're confident you've loaded all of the game's assets, click the "All" tab in the Network viewer and right-click on an asset.
# Select Copy > Copy all as cURL (cmd) and paste the results into a text file.
# Save the text file and drag it over cURLsDownloader.
# Wait for cURLsDownloader to finish fetching assets. Use option 1 when finished if it detects broken filenames, which will very likely fix them.
# Open the Downloads folder in cURLsDownloader and determine which folder contains the necessary files to play the game.
# Move the contents of your chosen folder to the content folder of your curation.
# Test your game with the "Run" button.


''NOTE: ''remember that some URLs can still use https:// at the beginning, so doing a copy-paste of that into the Launch Command will not work right if you forget to make it http instead of https.
When testing games, if a game lets you get through more than one level without loading another asset, you'll ''generally'' be okay to assume that there's no more assets to be found, but this is never a guarantee, and you should always test your game in Flashpoint as much as you can.


== Wrapping It Up ==
Try curating your own game now that you know about curation. '''Be sure to check the [[Game Master List]] before curating!''' Otherwise, you might waste time and effort to save a game that's already been saved.


So you can either make a new game entry like before, or click on the one we already made, click the Edit button (it's a pencil in the top right on the right sidebar) and change the launch command there, then click the tick. Either way, do that, then try to launch the game, and you'll see the sitelock there, clear as day, just as it was in the browser. Now, as for determining what exactly this kind of sitelock wants...well, that's a tutorial for another time, but since this version of the game is already in Flashpoint, we already know how this sitelock works, and can fix it right away.
If you think your game might not be a Flash game, try viewing the tutorials for other [[Platforms]] like Shockwave or HTML5. If you know your game is Flash but still can't get it to work, check the [[Flash Curation]] page for more detailed info on specifically Flash games. If all else fails, ask away in #curator-lounge on our Discord and we'll try to solve the issue together.
 
 
See, the way Andkon used to be structured is that it used to run on the domain "arcade.andkon.com" and not just "andkon.com", and the sitelock on this particular game was designed to check that it was running on "(something).andkon.com" and not just "andkon.com" because of that. When Andkon updated at some point in the past, it broke this sitelock code, and the game wouldn't run properly. Thankfully, we have a fake internet we can bend to our will, so this can easily be fixed.
 
 
With that said, I'm going to put on the Jeopardy music, and let you see if you can figure this one out. The file is in the domain "andkon.com" at the moment, and we need it to be on "(something).andkon.com" for it to work right. How would we accomplish that, and what two things would we need to change to make it work?
 
...
 
If you answered "the domain folder in htdocs" and "the Launch Command of the game" you're correct!
 


* We need to change the name of the 'andkon.com' folder in order to fool the sitelock. So if we go back up into htdocs and rename this folder, we can make it work. (In this very specific case, we can use anything as a substitute for the (something) in '(something).andkon.com'. For my example here, I'm going to rename the folder to "bumfluff.andkon.com", because seriously, in this ''one case'' that works.)
Once you're sure you've gotten a game working in Flashpoint, it's time to add the additional parts of any curation. The [[Curation Format]] page tells you how curations are laid out in order to add it to the master build of Flashpoint with as much information as possible.  
* But once we've done that, our Launch Command becomes invalid. See, it'll still try to load 'andkon.com', and it will probably fail. At least, it will absolutely fail on a fresh hard drive. In order to compensate for this, we also need to go and edit the Launch Command in the game's entry in the launcher to match up with the domain's new folder name.
 
 
Once you've done that, and you can launch the game again, you've successfully bypassed a sitelock. Congratulations, again.
 
 
I want to end this section off with a note about sitelocks; in most cases, sitelocks are still working as intended on most Flash portals, so grabbing them, loosely throwing them into Flashpoint and playing them just won't work, which is why recreating the exact structure of where the game was on the website, like we did with Monster Slayers up there, is always good practice; not only do you ensure that a loose SWF floating around in the master copy doesn't overwrite any other files, any sitelocks that might come up will be headed off at the pass, because you already put them in the right place on our fake internet to fool the sitelock to begin with. Two birds, one stone. There's also the third benefit of keeping the files like this being historically accurate, which is good for a preservation project. So basically, always have the game in the right place.
 
 
== Multi-Asset Games ==
 
 
Multi-asset games can be a lot trickier to deal with. When we say multi-asset, we refer to a game that loads more than the initial SWF when you play it. See, Interactive Buddy and Monster Slayers were all self contained in one file, no fuss, no problems, load them and go. But remember that we were dealing with games that were likely to be loaded on dial-up connections, so for some titles, every kilobyte you could save on loading games would work - giving someone on dial-up a 2MB game to download at first to let them play a little, instead of forcing a 20MB download that would leave it unplayable for them, was considered a good thing in some circles.
 
 
This also leaves things like Flash games in a really tough spot when you try to back them up. Sometimes these games are programmed well, and will load the resource from the folder the actual file is next to. Sometimes they'll just talk to an absolute, direct web address, leaving it unplayable once that file goes down. It's almost impossible to tell that this might be a thing sometimes. With that said, we're gonna back up a multi-asset game, and hopefully give you a tool or two to help with these games, although it's never a guarantee.
 
 
The game we're going to be using is adventure title Gateway II, hosted on the developer's site here: http://cockroach.se/gateway_2/ Before you allow Flash Player through though, make sure you hit F12, Network tab, Other highlighted. Then once you start to play the game, you'll notice that instead of one SWF, it loads a relative ton of them, and also some XML files. In the case of Gateway II, you need *all* of these files to actually finish the game. As an experiment, feel free to download gateway_2.swf, then try and play it, just by itself, in Core, using the methods we've gone over. You'll get to the language select, then you'll stop dead once you pick one.
 
 
Now, the hard way is to download all of these files manually, make sure they're in the right spots, and that will basically do it. If you scroll over the list of URLs, you'll notice that they're all in different directories in relation to eachother, so it'll actually be a lot of manual groundwork to get this done right. You can do this, and I recommend you do it at least once, to get used to the idea of making sure everything lines up nice and neatly; when one file ends up out of place or forgotten, you'll either not be able to play the game, or you'll submit it, only to end up having someone complain later.
 
 
Thankfully, we do have a tool to help expedite this process; it's called [http://bluepload.unstable.life/curlsdownloaderv54.zip cURLsDownloader], and we can make it work for us pretty easily. So when you have all the resources loaded in Gateway II's case, you can right click on one of the files, and click Copy > Copy all as cURL (cmd), paste that into a text file, save it into the same folder as that cURLsDownloader.bat (make sure you extracted it) and enter the text file name into the prompt you get when you run said batch file, and it'll download all the links for you.
 
 
This isn't to say you shouldn't be cautious, though. There are certain games out there that only load these resources when you need them. One example is a few Nitrome games; they will only load the XMLs that contain their level data once you get to them; therefore, you need to play the entire game, end-to-end, before you can safely copy the cURLs into a text file and download them. Sometimes, and only sometimes, you can take apart the SWF with a decompiler and check for all the files you need, but this is never a guarantee (and that goes beyond the scope of this tutorial). There are others as well, including some games that will only have an ending loaded from external files. You can never be 100% sure, without playing through an entire game, whether or not this is the case.
 
 
With that said, it is easy to miss this kind of thing when you're working on games, which is why the golden rule is ''to always, ALWAYS test in Flashpoint Core before you go submitting a game''. Preferably with your internet cut off and your internet cache files wiped (there is a convienient option to do this in the Redirector's File menu, you should do this every time you curate a new multi-asset game). If you have the launch command set to HTTP and the game itself doesn't try to talk over HTTPS, you'll find it easy to notice when things don't load in multiple ways; the game will stop dead, or the Redirector window will throw up "404 NOT FOUND" messages next to certain file names, which you should always try to grab (if you did the smart thing of reconstructing the exact same file structure on the fake internet as the real one, you might be able to just copy and paste straight from the redirector to the real internet to grab the file in question). If the game, whether by you leaving a HTTPS in the launch command or by the game itself trying to, ends up trying to talk over HTTPS, you'll see something along the lines of this following line in the Redirector:
 
(404 Not Found) GET http://ocsp.comodoca.com/MFIwUDBOMEwwSjAJBgUrDgMCGgUABBR64T7ooMQqLLQoy+emBUYZQOKh6QQUkK9qOpRaC9iQ6hJWc99DtDoo2ucCEQC66MA/sMbTbAk54Fmbn6wF
 
 
Basically though, there's no "end all be all" solution to the multi-asset problem that isn't constant vigilance. If it makes you feel better, in the absolute majority of cases since this project has started that we've observed, if a game lets you get through more than one level without loading another asset, you'll ''generally'' be okay to assume that there's no more assets to be found, but again, this is never a guarantee, and you should always test as much as you can.
 
== Wrapping It Up ==


When you've created a proper curation in the Curate tab, click the "Export" button at the bottom of your curation, which will save a .7z archive of the curation ready to be imported into the master build. Name it something relevant (typically the name of the game), and save it wherever you'll remember it.


Now that we have it all working as expected, its time to send our game into the proper curation channels. [[CurationFormat|This page here]] tells you everything you need to know about our curation format, and how we use it to pack up and send in games for adding into the master copy. Once you have a proper curation ready, follow these steps to make sure it gets added to Flashpoint:
Once you have your .7z ready, follow these steps to make sure it gets added to Flashpoint:


{{:Submitting a Curation}}
{{:Submitting a Curation}}

Revision as of 01:04, 19 February 2020

This page is a basic tutorial on how Flashpoint works and how to curate games to add them to Flashpoint.

For more advanced platform-specific tutorials, see Platforms.

For more details on how to package a curation, see Curation Format.

How Flashpoint Works

A diagram showing how Flashpoint's technology works.

Flashpoint is more than just a program to play files; rather, it's a combination of three programs working in parallel:

  • a web server, which hosts game files from a hard drive and pretends to be the original Internet source the games ran off of,
  • a Redirector, which points the game files and resources to the server to make them believe they're on the Internet,
  • and a launcher, the user interface to select and play games from.

Flashpoint itself also comes in three primary versions:

  • Infinity, the version that downloads games from a server as you play them,
  • Ultimate, the gigantic version with every game included and ready for offline play,
  • and Core, the version with only a few games for testing, most often used by Curators to add games.

Infinity will download files as you play games that request them, while Ultimate and Core know the files are already there. All three make the files believe they're being ran on their original source. This has numerous benefits, the two most important being bypassing sitelocks and supporting multi-asset games. For now, though, let's walk through curating a single-asset SWF file.

Setting Up Our Software

To download game files from the Internet, you'll need:

  • Flashpoint Core, used to add and test new games. It can be found at the bottom of our Downloads page.
  • A modern browser such as Chrome or Firefox, which have a built in Network monitor that we can use to find and grab individual SWFs, and sometimes multi-asset titles with low amounts of resources.
  • cURLsDownloader, found in the Utilities folder of the Flashpoint Core directory. This isn't strictly necessary, but it helps immensely; you'll see why later on.

Download Flashpoint Core, extract it to your hard drive, run it via its shortcut in the extracted folder, and make sure that the included games play properly before you continue.

Finding the Source of Your Game

As a tutorial, we'll start by curating the simplest type of Flash game: a single SWF file that isn't sitelocked, specifically Interactive Buddy. You might need to enable Flash in your browser to get it to play (this tutorial won't work if you're using another player such as the Newgrounds Player).

The SWF for Interactive Buddy in Chrome's network tab; it should look similar on Firefox.
  • If you're using Chrome or Firefox, press F12 to open the Developer Tools and click on the Network tab. This shows us every asset that loads on the page in real time.
  • You can filter miscellaneous types of assets such as Flash files by clicking the Other tab within the Network tab.
  • Refresh the page to find that a few assets loaded. The game file has an extension of .swf, and has a type of x-shockwave-flash in the table.
  • Once you find the SWF, you can hover over it to see its URL and confirm that it ends in .swf.
  • Right-click the asset and select Copy > Copy link address.

Generating Content Folders with cURLsDownloader

If you've followed the tutorial up to this point, you should have copied this link to the SWF for Interactive Buddy:

https://uploads.ungrounded.net/218000/218014_DAbuddy_latest.swf?123

Flashpoint calls files from a file directory created from the URL of a game, packaged into a folder called content for each curation. Instead of creating a content folder manually, though, we can use a tool called cURLsDownloader to do it automatically.

  • cURLsDownloader should be in your Flashpoint Core folder > Utilities > cURLsDownloader.
  • Open cURLsDownloader and paste your game URL into its input.
  • Select Option 1 to grab the SWF file.
  • cURLsDownloader will automatically download the SWF and create a content folder for Flashpoint, located in its Downloads folder. Use option 1 when finished if it detects a broken filename, which will very likely fix it.

We'll come back to this Downloads folder later to move it to its proper place.

Curating with Flashpoint Core

What your curation should look like when you're finished. Note how the Launch Command matches the Content Files.

The most optimal way to curate is to use the "Curate" tab in Flashpoint Core. To do that, open Core and select the Curate tab, then click the New Curation button to see a list of fields to fill in. These are the most important ones:

  • The Title, which tells the game apart from others. Name it "Interactive Buddy" or "Test Game" or anything you like, it doesn't matter right now.
  • The Platform, which determines where the game goes inside our database, split into several platforms (Flash, Shockwave, Unity, etc). When using Core for testing purposes, this isn't massively important, but Flash is selected for SWF files and by default.
  • The Application Path. This determines what piece of software is used to start up the file we specify. In this case we're using a single, simple SWF, so we'll use the Flash Player Projector; in the current version of Core, this is listed as "FPSoftware\Flash\flashplayer_32_sa.exe", and is selected by default.
  • The Launch Command, based on the URL of the game's source file.

To summarize, the Launch Command of a game is most often the URL of its source file. However, be extremely careful about the beginning of this game's URL; it uses HTTPS instead of HTTP. Flashpoint can't handle using HTTPS, and will download assets from the live Internet instead of from its fake Internet server, which can lead to a game going off the web later and not working in Flashpoint when that happens. To summarize, no matter the URL, always use http:// at the beginning of any Launch Command, NO EXCEPTIONS.

To add the content you generated earlier using cURLsDownloader, click the "Open Folder" button at the bottom of your curation and you should see a "content" folder. Move everything from cURLsDownloader's "Downloads" folder into this "content" folder.

Take a look at the image to the right to see how your tutorial curation should look. If any field is highlighted in yellow, it's a warning; take another look at your own curation and see what's wrong. Curations of your own should have as much metadata filled in as possible, but the fields mentioned above ensure the game will work in Flashpoint. You can fill in the rest of the fields if you like, but it's not necessary right now.

Once you're confident your curation looks good, click the "Run" button next to the "Open Folder" button to test the game and you should see Interactive Buddy pop up.

Congrats! You've successfully made a curation. Now let's see how to deal with more complex games.

Sitelocks

The sitelock telling you to go to Andkon Arcade, despite the game already being on Andkon Arcade.

Some Flash games will check the domain the game is being hosted on, and "lock" the game from being played if it's not on the correct site, called a sitelock. This can even occur, though very rarely, on the original site where the game was hosted, as is the case with Monster Slayers. Click this link and try to play the game; your result will be the image on the right. Despite the game already being hosted on andkon.com, it'll activate its sitelock and tell you to go to Andkon Arcade. Try to find and download the SWF using the method described in the previous section.

You should find this source URL:

http://andkon.com/arcade/adventureaction/monsterslayers/monsterslayers.swf

This ironic sitelock is due to Andkon's main domain changing to "andkon.com", when it used to be "arcade.andkon.com". Therefore, changing the "andkon.com" in the URL to "arcade.andkon.com" will give us a Launch Command that bypasses the sitelock:

http://arcade.andkon.com/arcade/adventureaction/monsterslayers/monsterslayers.swf

This particular URL uses http:// instead of https://, but always make sure the Launch Command uses http:// regardless.

Try to create a new curation by downloading the SWF from the top URL using cURLsDownloader, and setting the bottom URL as the Launch Command. Use the Curate tab in Flashpoint Core to test your game; Flashpoint should bypass the sitelock and allow you to play Monster Slayers as Andkon once did.

It's important to use correct Launch Commands and proper content folders for every curation you make (even if you're curating a non-sitelocked SWF), to ensure that all the game's assets are loaded exactly as they would be on the real Internet, without running into any possible sitelocks on the way (even if the game appears to be playable outside of Flashpoint).

Using cURLsDownloader for Multi-Asset Games

Up until now, we've only curated single-asset SWF files. However, many games were made at a time where downloading one large file was a large pain. This meant games were split into several, smaller assets. Whether these games load all of the assets at once or if they load assets as you play the game depends on how they were programmed, making curation of multi-asset games more difficult than single-assets.

Let's check out a multi-asset game called Gateway II. Here's the link to the main SWF of the game:

https://uploads.ungrounded.net/372000/372340_gateway_2.swf?1547470930

Try curating this SWF as described above and testing it in Flashpoint with the Run button. You'll only get to the language select screen before the game freezes once you pick one.

Check the Redirector window for anything labeled (404 Not Found). This means the game was calling for one or more assets that it didn't have offline, making the game freeze because it failed to load a required asset. Thankfully, Flashpoint can handle these assets as long as they're downloaded properly.

Once again, instead of manually downloading lots of assets, we can use cURLsDownloader to save time and effort.

Option 1: Download the assets called by the game as you test it in Flashpoint Core.

  1. In the Redirector, select Copy > Copy all 404 Not Found URLs and paste the results into a text file.
  2. Save the text file and drag it over cURLsDownloader.
  3. Wait for cURLsDownloader to finish fetching assets. Use option 1 when finished if it detects broken filenames, which will very likely fix them.
  4. Move the contents of the Downloads folder in cURLsDownloader to the content folder of your curation.
  5. Test your game with the Run button and repeat this process if any more 404 errors appear in the Redirector.

Option 2: Download all the assets that the source page of a game loads as you play it on the live Internet (but some assets downloaded won't be part of the game).

  1. Once again, press F12 to open your browser's Network viewer, then refresh the page.
  2. Play through your game on the Internet, loading assets as you go.
  3. When you're confident you've loaded all of the game's assets, click the "All" tab in the Network viewer and right-click on an asset.
  4. Select Copy > Copy all as cURL (cmd) and paste the results into a text file.
  5. Save the text file and drag it over cURLsDownloader.
  6. Wait for cURLsDownloader to finish fetching assets. Use option 1 when finished if it detects broken filenames, which will very likely fix them.
  7. Open the Downloads folder in cURLsDownloader and determine which folder contains the necessary files to play the game.
  8. Move the contents of your chosen folder to the content folder of your curation.
  9. Test your game with the "Run" button.

When testing games, if a game lets you get through more than one level without loading another asset, you'll generally be okay to assume that there's no more assets to be found, but this is never a guarantee, and you should always test your game in Flashpoint as much as you can.

Wrapping It Up

Try curating your own game now that you know about curation. Be sure to check the Game Master List before curating! Otherwise, you might waste time and effort to save a game that's already been saved.

If you think your game might not be a Flash game, try viewing the tutorials for other Platforms like Shockwave or HTML5. If you know your game is Flash but still can't get it to work, check the Flash Curation page for more detailed info on specifically Flash games. If all else fails, ask away in #curator-lounge on our Discord and we'll try to solve the issue together.

Once you're sure you've gotten a game working in Flashpoint, it's time to add the additional parts of any curation. The Curation Format page tells you how curations are laid out in order to add it to the master build of Flashpoint with as much information as possible.

When you've created a proper curation in the Curate tab, click the "Export" button at the bottom of your curation, which will save a .7z archive of the curation ready to be imported into the master build. Name it something relevant (typically the name of the game), and save it wherever you'll remember it.

Once you have your .7z ready, follow these steps to make sure it gets added to Flashpoint:

Submitting a Curation

Submissions are uploaded in the Flashpoint Submission System, which requires you to join our Discord server first. An explanation of how the site works is available here.

If you have any questions, ask in #curators and a Curator will answer them.

After you have uploaded your curation to the website, a Curator will check it. This can take some time, so please be patient. You will be pinged in #fpfss-notifications about whether or not your submission was approved, and if any changes need to be made.

Once your first submission is approved, you'll be given the Trial Curator role. That means you will be able to submit more curations and upload bigger files.

Congratulations! Your submitted game/animation will appear in the next update to Flashpoint.