-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
Follow these instructions to set up the game on your own computer. The game should run on any OS, but I am on Mac, so the Windows instructions might not be perfect. (The game should also work fine on Linux, but I'm not going to provide Linux-specific instructions most of the time; if you're savvy enough to use Linux, you probably don't need as much help from me.)
Table of Contents
Before you can run this game on your computer, there's some software you will need. Windows users: Unless your computer is literally 10+ years old, use the "64-bit installer" links, not the 32-bit links.
-
GitHub Desktop (once you have installed it, be sure to login to your GitHub account)
- (If you're experienced with Git, you can use the command-line or another Git client; however, all instructions in this guide will be tailored to GitHub Desktop.)
- Node.js (stick with "LTS"; don't select "Current")
- Tiled map editor (they'll try to get you to donate when you click Download, but you can hit "No thanks, just take me to the downloads" to get it for free)
If you plan to work on game art, you might want some art software installed. If you have Photoshop, great; if not, GIMP is a free alternative.
Now, you need to clone the game repository to your computer. If you are using GitHub, simply go to the main page for this repository and click the green "Clone or download" button, then click "Open in Desktop". Alternatively, you can open GitHub Desktop manually and follow the instructions they provide for cloning a repository.
Now, you will need to open the game's main folder in a terminal/command prompt. If you are using GitHub Desktop, they make this easy; simply click the Repository menu and select "Open in Command Prompt" (Windows) or "Open in Terminal" (Mac). From the command prompt/terminal that opens, you will need to run this command to install the rest of the game's dependencies: npm install
. Note that you may need to rerun this install command in the future if the project's dependencies change.
In order to keep things simple, I'm going to set out some terminology and shorthand that I will use throughout the rest of the wiki:
- When I talk about "the game's main folder" (or "the game's root folder" or similar), I am referring to the
ktbgame/
folder, which is where all the game files live. If you are using GitHub Desktop, this will likely be in your Documents folder underGitHub/
. The folder path will probably be something like this:- Windows:
C:\Users\YOURNAME\Documents\GitHub\ktbgame
- Mac:
/Users/YOURNAME/Documents/GitHub/ktbgame
- Windows:
- It's very tedious to always put "terminal/command prompt", so henceforth, I will just use one or the other (they are basically synonymous).
- When I write
like this
, I am typically referring either a command (i.e. to run in a terminal), a file path (e.g.assets/images/player.png
), or some other bit of code or technical stuff.- If I am talking about the path to a folder, I usually leave a trailing slash (
/
) to make it clear that I'm talking about a folder rather than a file (e.g.assets/images/
)
- If I am talking about the path to a folder, I usually leave a trailing slash (
- Henceforth, instead of writing out instructions such as "click the File menu and select 'Save As'" or "click the Edit menu and select 'Copy'", I will use this shorthand: "go to File>Save As" or "go to Edit>Copy".
- I use the abbreviation "N.B." a lot; this just means "hey, this bit is important". (If you're curious, it stands for "nota bene".)
We are using the Tiled map editor to design all our levels. They have documentation over here which you can read, but you will also need more info which is specific to this game. Tiled is designed to work with a ton of games written with tons of different languages and systems. As a result, Tiled doesn't know the specifics of how our game works, so there are many features included in Tiled that will not actually do anything in our game, because I haven't added support for them.
When you open Tiled for the first time, go to View>Object Types Editor. This editor defines the custom object types that we use in the game. You will need to configure it to use our object types config file. Inside the pop-up, go to File>Choose Object Types File.... The config file can be found in the game's main folder, under tiled/objecttypes.xml
.
Next, you will first need to go to Edit>Preferences (Windows) or Tiled>Preferences (Mac). Go to the General tab, and then tick all the checkboxes for "Embed tilesets", "Detach templates", and "Resolve object types and properties" under Export Options. These options are necessary for the game to be able to read the map once you export it.
Next, go to View>Views and Toolbars, and enable Templates. This will open the Templates panel, which you will need to place somewhere in your workspace. You can move it wherever you like, but I recommend putting it in the left column below the Properties panel. In the Templates panel, click the folder icon in the bottom-left corner, navigate to the game repository's main folder, then go to tiled/templates/
and open that folder. The Templates panel will now show all of our project's template on the left, and a preview pane on the right. The preview pane isn't all that useful, so I recommend hiding it by clicking the vertical divider in the middle and dragging it all the way to the right.
Here is how I've chosen to layout my workspace (you can see the Templates panel added in the bottom-left):
Git is an extremely popular tool to manage code/assets/etc used by virtually every modern software project. It's basically like Dropbox or Google Drive or whatever, but with more structure – every time any file is changed, you have to "commit" it and give a description of your changes. The master copy of the game lives on GitHub (a popular Git provider which we're using), and everyone has their own working copy on their computer. You can freely mess with your local copy of the game, and not have to worry about breaking it for everyone else until you're ready to commit your changes.
GitHub fortunately has a lot of tools and guides to make Git a lot easier to use. I recommend first following their Hello World guide to learn the very basics of Git and how to use GitHub's website, and then do their tutorial for GitHub Desktop, which is an app that runs on your computer (which you'll need in order to run the game on your computer).
Now that you have everything installed, check out the Playtesting page or the other "Art and game design" pages listed in the sidebar to begin working on the game.