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
.castle and are written in YAML.
This section provides a reference of all possible keys you can add to a Castle project file. The only required key is
main: Relative path to a the Lua entry point file that Castle should use to load this game. For example,
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.
draft: A boolean. If
true, Castle will display "Work in Progress" on your Game's card and won't feature the game on the Castle home screen. Default is
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
step. See Game Dimensions and Scaling for much more detailed information.
upscaling: Same as
scalingabove but only configures the behavior when the available space is larger than your game's dimensions.
downscaling: Same as
scalingabove 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 pair,
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
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
username: Alias for
coverImageUrl: Alias for
All of Castle's starter examples contain Castle Project Files. For example, here is the lil platformer project file.