Castle
DownloadsGet the Castle client.Frequently Asked QuestionsLearn more about Castle.ExamplesUse this list of examples to bootstrap your game.Quick StartGet started in under 5 minutes.Creating an AccountWhy and how to create a Castle account.Make Your First GameFollow this small tutorial to get oriented with a basic workflow.Describe your Game with a Castle Project FileThis tutorial will provide an overview and motivation for a project file.Adding Games to your ProfileShare games you made by adding them to your profile on Castle.Hosting Your Own GamesLearn how to add games to Castle which are hosted on another service.Game Dimensions and ScalingChange the dimensions and scaling behavior of your Castle game.Manually Make a New Castle Game from ScratchAn educational resource for advanced usersCastle Project File ReferenceThe project file contains the title, description and other metadata about your game.User API ReferenceGet information about users playing your game.Post API ReferenceIntegrate with Castle's post system.Storage API ReferenceStore shared or per-user data in the cloud.Game API ReferenceNavigate to or get information about other games on Castle.UI API ReferenceDisplay user interface elements such as buttons and text boxes that allow users to interact with your game.System API ReferenceGet information about or perform activities relating to the system Castle is running on.Code Loading API ReferenceLow-level functionality for loading Lua code over the network.Community Reference LinksUseful community links for learning about Lua and LÖVE.

Adding Games to your Castle Profile

By The Castle Team // 5-21-2019
If you made a game you want to share with others, you can add it to your Castle profile. This article describes why, and how, you would do that.

Why add games to my profile?

When you add a game you made to your Castle profile, here are some things you get:
  • A permanent link you can share, like http://castle.games/+abc123/@your-name/cool-game
  • A game card that shows up on your profile.
  • Presence in Castle Search, Recents, and anywhere else Castle might want to surface your game to players.
A profile which contains one game
A profile which contains one game

How do I add games to my profile?

1. Click "Add Game".

You can find this button on your own profile. If you don't have a Castle account, now is a good time to create one.
Adding a game to a profile on Castle

2. Choose the folder with your game's source code.

Click the Choose Folder button and find the folder containing the game you want to add.
Your game must have a Castle Project File which includes your Castle username in the owner key. In most cases, Castle already added this for you. If you don't have a Castle Project File, follow this guide to add one to your game.
Choosing a game directory with a Castle Project File

3. Make sure everything looks right.

After you choose a directory, Castle will render a preview of the game at that directory, including the title, description, and the future link to the game.
Previewing a game to add
Bear in mind that after adding your game, you can update it at any time later.
You might notice the greyed out +id shown in the previewed url for your game. Your game will get a random id after you Add it, but we don't know the id until you finish adding the game. So we show a placeholder within this url preview.

4. Click "Upload and Add Game".

Castle will upload your game's code and assets to Castle's server, and then it will Add the game to your profile.
Congratulations, you've added a game to your profile.

What's next?

Make sure your game looks great

Now that your game is on your profile, anybody in Castle can find it and play it. You might want to make sure the game looks as good as possible, for example by adding some artwork or a primary color. There are lots of ways to customize your game's appearance, so check out the Castle Project File Reference for the full list.

Update your game

You can Update your game at any time. Find the game's card on your profile, click the (i) button, and click Update....

Use your own file hosting

If you prefer not to upload your files to Castle, you are welcome to use a different hosting service. For example, some people like to use a Github repository instead. You can change where your game's files are hosted at any time. For more information, see Hosting Your Own Games.

Check in your .castleid file

When you add a game, Castle writes a small file called .castleid to your project directory. This file helps Castle maintain an association between your local source code and the online Castle game, so next time you want to update your game, we can recognize that it's the same project.
If you're using source control, we recommend that you check in the .castleid file and don't ignore it.