Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Embedding a Game on the Forums

Default Bindings

This tutorial will show you how to share your arcade games on the Facepunch Forums by embedding them in your posts.

You will need the following before you start:

  • A working game that you want to share. See this tutorial if you need help.
  • A copy of the BudgetBoy Development Kit (BBDK) for your platform. You can download it here.
  • Either the .NET Framework 3.5 for Windows users (you will probably already have this), or Mono for non-Windows users.
  • A Facepunch Arcade account (register here).
  • A Facepunch Forums account.

Game Folder Layout

First you will need to make sure your game is in the right place for the BBDK to find it. There should already be a Games directory in the location you extracted the BBDK to, which will contain a couple of our example games. Any game you wish to test in the BBDK should be in a subdirectory of Games with a name to identify it, with all source code and other resources inside that subdirectory. You don't need to organize your game's files in any particular way beyond this, although it can be helpful to create additional subdirectories within your game's folder to keep things clean.

embed-1.gif
An example of where to put your game's source code and resources so it can be found by the BBDK.

Opening up the BBDK

Next launch the BBDK by running the executable. Initially it will be running one of our pre-packaged games, but you can switch it to run your project by clicking on the top bar and selecting it from the list on the right. It should have the same name as the folder you placed in Games.

When doing this make sure you select the entry with a green C# icon, this means you are loading the game from its source files rather than a previously compiled package.

embed-2.gif
How to load your game project in the BBDK.

Compiling a Game Package

Now that you've got your game loaded in the BBDK (and assuming there were no errors in your source code) you can export your game into a .bytes file. This file can be easily shared with other developers using the BBDK, or can be uploaded so it can be embedded on the forums as you'll see later on.

Before creating a package make sure the console is enabled (the light next to the >_ button should be green). We'll need the console so we can see where the package is exported to, and know when the packaging process is finished.

Now simply press the lower-most button on the left with a brown box for an icon. If this button is disabled you might have accidentally loaded the game from a package rather than from its source files.

You should see in the console at the top of the screen a couple of new lines; the first tells you where it is exporting to, and the second tells you that the exporting process has completed. For convenience you can click on a console line to copy its text to your clipboard.

embed-3.gif
Enabling the console, packaging a game, and then copying a console line by clicking on it.

Uploading Your Game

You should now find a .bytes file at the location given to you by the first console line.

embed-4.png
A .bytes file created by packaging a game.

Now you will need to upload it to the Arcade website. After you've registered for an account on the Arcade website you can upload your game on this page. After uploading, click on the Your games tab at the top. This is where you can manage all the games you upload, allowing you to update them, show / hide them from the public, or delete them.

embed-5.png
The Game Management page, with a newly uploaded game.

You can also click on the little controller icon within an game's entry in the list to test it in an embedded player. It will take you to a page like this one.

Embedding on the Forums

Before you continue, make sure you find an appropriate thread to share your game in. A good bet would be the most recent edition of the What Are You Working On? (or WAYWO) series of threads in the Programming Subforum. Please do not create a new thread specifically for your game unless it is a suitably large project that has already built up considerable attention in an existing thread like WAYWO.

Now click on the previously mentioned Play button (the controller icon) for your game on the Game Management page. Below the embedded player there should be a Forum embed code section, with a code like this:

[arcade]01ca6936-7663-4389-9aa3-e114da2af4e0[/arcade]

This is the code you should put in a post on the Facepunch forums to embed your game.

Now all you need to do is submit your post! To view embedded arcade games just click the play symbol that appears in the middle of the large black rectangle, which will load the Unity plugin.