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.

Castle Project File Reference

A Castle project file (for example, my-project.castle) is a text file with a special format that you can write to describe your game. To learn more about Castle project files, why they are useful, and how to add one to your game, check out the full guide: Describe your game with a Castle project file
Castle project files have the file extension .castleand are written in YAML.

List of .castle keys

This section provides a reference of all possible keys you can add to a Castle project file. The only required key is main.
  • main: Relative path to a the Lua entry point file that Castle should use to load this game. For example, main.lua.
  • title: The title of this game.
  • description: A brief description of this game.
  • owner: The Castle username of the owner of this game. Required in order to add this game to a Castle profile.
  • dimensions: The desired dimensions of your game's screen in LÖVE units. The default value is 800x450. See Game Dimensions and Scaling for much more detailed information.
  • scaling: How your game should scale when changing size to fit screen space. Can be on, step or off. See Game Dimensions and Scaling for much more detailed information.
  • upscaling: Same as scaling above but only configures the behavior when the available space is larger than your game's dimensions.
  • downscaling: Same as scaling above but only configures the behavior when the available space is smaller than your game's dimensions.
  • coverImage: A url or relative path to an image containing some artwork for this game. Castle will use this image when showing a preview of this game on profiles, in search results, and elsewhere.
  • primaryColor: A hex string (without the `#`) for a color that represents this game. For example, C0C0C0. Castle may use this when rendering previews of the game.
  • multiplayer: A dictionary with the following possible keys. If omitted, the default is a dictionary with a single key, enabled: false.
    • enabled: A boolean. If true, indicates to Castle that this game is an online multiplayer game that uses Castle's hosted multiplayer servers.
    • serverMain: Similar to main. A relative path to an alternative entry point Lua file to be used when the game's code is run on a multiplayer server.
  • unlisted: A boolean. If true, Castle will not show this game in Search results, even if you added it to your profile. Default is false.

Deprecated keys

These keys are deprecated, but you might see them in older Castle project files. It is not recommended to add these to your game, because they might stop being supported.
  • name: Alias for title
  • username: Alias for owner.
  • coverImageUrl: Alias for coverImage.

Example Castle Project Files

All of Castle's starter examples contain Castle Project Files. For example, here is the lil platformer project file.