How Flashpoint Works

From Flashpoint Datahub
Revision as of 09:14, 19 November 2019 by Nosamu (talk | contribs) (Added the How Flashpoint Redirects diagram)
Jump to navigation Jump to search
A diagram showing how Flashpoint's technology works.

Before you curate, it's worth understanding how Flashpoint works, as understanding what exactly Flashpoint does to play games will help you grasp curating later on.

See, Flashpoint is more than just a file and a program to play it. Flashpoint's underlying tech is actually a combination of three programs working in parallel - a web server, a redirector and a launcher. A web server is what the internet works on; computers around the world run web servers to host you when you visit a website. The entire internet runs on these web servers. When you open a page to, for example, YouTube, your computer is talking to a web server. Flashpoint runs a web server on your local computer. The second component is the redirector, which allows us to change where the web traffic from a particular application goes. And, unless you've never used Flashpoint, you've already used our Flashpoint Launcher.

These three techs work together in order to, in as basic terms as possible, pretend to be the internet. See, we need to do a lot of things to preserve Flash (and other kinds of) games:

  • Pass sitelocks. Some games will only run properly if they can detect they're on the proper internet.
  • Load resources. Some games will try to load resources directly from the internet, and fail if they can't.
  • Emulate servers. Some games will try to talk to servers (an example is Happy Wheels loading custom levels). This is impossible to do without a proper server.

You can hack SWFs on a case by case basis if you want, but Flashpoint is a preservation project - we're trying to keep the games in as an intact state as possible, for historical and practical reasons. For this, we use this technique of pretending to be the internet. A combination of our 'fake' internet and a program designed to redirect our software to talk to this fake internet is our approach; we can keep copies of websites on the local hard drive, and point programs at this 'fake internet' to trick it into believing it's talking to the real internet. Using our fake internet to run web games from is the best approach, thanks to being able to naturally avoid all three of the problems above. With that said, I'm going to outline below, step by step, how it works.

  • Flashpoint starts, including our three apps:
    • The launcher, for the player to interact with.
    • The server, which is hosting our fake internet.
    • The redirector, which can point programs at our fake internet.
    • (It is also worth noting that our software changes proxy settings so that we can check all the computer's traffic; we can't redirect if we can't check all traffic for the apps we want to redirect.)
  • The player picks a game to launch.
    • The launcher starts up the program to play the Flash game (in this case, we'll say it's the Adobe Flash Player Projector - a single window to run an SWF file, hereafter referred to as the projector) and it passes along a web address; this is where we're hosting the game on our fake internet.
    • The projector tries to talk to the real internet, but the redirector catches it in the act, and says "hey, use our fake internet instead."
    • The projector agrees, and uses the fake internet. It says hello to our fake internet and asks for the web address.
    • The fake internet (really the web server) looks inside its local files for the web address in question. This is in Flashpoint's "Server/htdocs" directory, with subfolders for web addresses and files further along in more folders.
      • If we're talking about Flashpoint Ultimate, the file will already be there, and it'll pass the file along to the projector.
      • If we're talking about Flashpoint Infinity, our fake internet will check if the file is there, and pass it along if it already is, or download it if it isn't, then pass it along.
    • The projector loads the file, and you can play it. Hooray!
      • In the case of a game that has a sitelock, as long as it is on the right address, the fake internet looks no different to it than the real internet. Therefore, if you put it in the exact right spot that it thinks it needs to be, it'll bypass the sitelock without a fuss. It's the same deal with extra resources; as long as the files are on the fake internet where the game expects them to be on the internet, it'll just work.

To summarize, we're hosting a fake internet inside our Flashpoint file directory on our own computer, and using a combination of all the software at hand, the software used to play games by talking to the internet is redirected to our fake internet hosted from our hard drive, and loads games from there.