Manually Make a New Castle Game from Scratch
This tutorial describes how to manually make a Castle game from scratch. If you're new to Castle, you'll probably find it easier to start by following these instructions
. This tutorial exists mostly as an educational reference, explaining what's going on in the details of the new project creation process.
The absolute minimum that you need in Castle is just a text file with Lua code in it. You typically also will want a .castle file for metadata as well, but it's not strictly necessary just to play around.
To construct a minimal example, put a new text file somewhere that Castle can load it. This would often be in a new directory on your local filesystem but its possible to post it at a URL on the web or anywhere else. You can name this file anything, but let's call it main.lua which is the standard thing to do by convention.
Put this Lua code in your text file
love.graphics.print("Hello World", 400, 300)
(Optional) Dot Castle Files
If you want a metadata file, you can make one. Call it something like mygame.castle. You can make "mygame" whatever you want, but make sure you give it the .castleextension.
Put this in your .castlefile:
title: My Game
description: A description of my game