Stratkit¶
An engine to build strategy games based on Unity. P10 is the showcase game using this same framework.
Quick JSON Schema References:
Table of Contents (Click to expand)
About the project¶
This is a Unity-based project supporting Bytro’s vision to “Connect and Challenge Players. Anytime. Anywhere.” by providing a robust 2D/3D game framework that promises to: - increase long running maintainability of similar Bytro style games, - allow small teams to create template projects quicker to reduce business risk of new projects, - enable future co-development of projects with multiple studios
The new Bytro Framework is easily extendable, maintainable, and does not require substantial developer support for new titles.
1. Set up¶
A) Install Unity¶
Install the appropriate version of Unity, you can find the version here.
B) Obtain the Package Token¶
B.1. Create/Use a personal token to access packages (Click to expand)
- As a developer - Create a `Personal Token` (`Github` → `Your User` → `Settings` → `Developer Settings` → `Personal access tokens` → `Tokens (classic)`) - Select at least the permission `read:packages` (also add `repo` if you plan to use this same token to work on the project) - Authorise it to access the Stillfront group - Save the token value - As a non-technical person (if you don't have access to Stillfront) - Ask a technical person in your studio who can hand out a token to access. - In NewMoon use [WHS - Pleasant package key](https://pleasant.goodgamestudios.com/WebClient/Main?itemId=448954b9-4771-468c-ad1e-6b320a2c4a62). _If you don't have access to this key or you don't belong to NewMoon, simply ask for it to any NewMoon member._ - Keep in mind this token can expire, new ones will be generated in the same location.B.2. Add a configuration file to give Unity the credentials to download the dependency packages (Click to expand)
- Create a file called `.upmconfig.toml` in the following location: | Platform | Location | | --- | --- | | MacOS & Linux | `~/.upmconfig.toml` | | Windows | `%USERPROFILE%\.upmconfig.toml` (for example, `C:\Users\myusername\.upmconfig.toml`) | - Fill in the contents as follows:C) Obtain the Cloning Token¶
If you already created your own token on step B.1 and gave it repo
permissions, you can use this token to clone and skip this step.
If followed B.2 because you're "a non-technical person (if you don't have access to Stillfront)" or you didn't give your token repo
access, create one for cloning the repository here (Click to expand)
- Create a
Personal Token
(Github
→Your User
→Settings
→Developer Settings
→Personal access tokens
→Tokens (classic)
) - Select at least the permission
repo
(this is usually the first one) - Give it an expiration date for safety (no longer than 1 year)
2. Cloning the repository¶
- Make sure
git-lfs
is installed on your system by excutinggit lfs --version
in your Terminal - If not, follow the instructions here to install: https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage
- Clone the repository:
- Open
Terminal
- Use the CLONING_TOKEN we specified in C) Obtain cloning token for this command and execute it:
git lfs clone https://<YOUR_CLONING_TOKEN>@github.com/bytro/stratkit.git stratkit
3. Running the game¶
- Open the project in Unity
- Check which scene is set as default on the
Build Settings
- Open that scene
- Press play
Working on the project¶
This project usually hosts only the packages that are used in the other games. One specific package (com.stratkit.tools.engine-workflow
) is specifically created so that working on your packages or testing changes is easier from the game project.
Creating a new package¶
- Create a new package either manually or using the integrated scaffolding tool (
com.stratkit.module-scaffolding
). Ensure there's a version, release notes and that the scope of the package is correct (the tool does all of that automatically).
Modifying an existing package¶
- Make the changes that you require on the one or many packages to modify, increase their versions and release notes.
Publishing a new package version¶
- Simply create a PR with your changes and the version (and release notes) updated. Once merged into
main
the package changes will be automatically detected and published.