sidescroller-framework

Contribute

Because SFramework is developed in CraftStudio, you modify it in CraftStudio as well. This makes it slightly difficult to use with source control like GitHub. This guide will show you all the steps necessary to setup your development environment and make contributions to this repository.

Contents

Setup

Set up your development environment. Make sure you have CraftStudio installed and have a project ready to import to.

Clone the Repo

Fork this repository to your GitHub account, then clone it to your system.

cd path/to/clone/to
git clone https://github.com/<your_username>/sidescroller-framework.git

Alternatively, you can use GitHub Desktop to clone the repository to your system

Import the Build

Once you have cloned the project, you have the files needed to import into CraftStudio. In your local CraftStudio server, go to administration

and in the Import/Export tab, click on the import button

Now navigate to where the repo has been cloned and find the build folder. Here, you will find the latest builds of SFramework to import.

Select the latest one, and import it. You will now be able to find the scripts to import. Select the root folder to import all SFramework scripts, then hit Import

Now, you have all of SFramework ready to make changes.

Commit

Now, you have made your changes to SFramework and you want to commit them to GitHub. Nice! Again, CraftStudio makes it a little bit difficult to work with source control so we’ve gotta get a little creative. Florent Pujol has a fantastic tool that will allow us to convert our CSScripts to Lua files. First, make sure you are in a new branch before continuing on.

Download the Converter

Go to the repository linked above and follow the instructions to download the program.

Convert your Changes

Now that we have the converter, we need to convert our changes into .lua files. First, make sure your CraftStudio server is shut off. This is required for the converter to function. Now, let’s go into the converter and set our paths.

Get the Project Path

You can get the project’s path from the CraftStudio Server Manager by clicking on “Open Projects Folder”

Find your project and copy its path from the file explorer

Set up the Converter

Now that you have your path copied, you can set up the converter. Paste the path to the project folder under CRAFTSTUDIO in the converter. Then hit “Add new” and then “Save modifs” so you can access it in the future.

Now, do the same under LUA. This time, with the path to your local repository’s src folder.

Convert the Files

Now that the converter is set up, we can convert the files. Find the button in the converter to write .lua scripts from the CraftStudio project and click on it.

Now we should have the converted files in our local repository!

Update Additional Things

If you have made any sample asset changes or created any of your own, make sure to export them into CSPACK files and add them appropriately into your local repository’s assets folder.

Commit the Changes

Now all we have to do is commit our changes. Make sure you are in your repository’s directory and commit the changes.

git commit -a "your meaningful commit message"

And now push those changes to your remote branch

git push

Alternatively, you can do all of the above in GitHub Desktop as well in a more user-friendly GUI environment.

Pull Requests

Once you’ve pushed your changes to your remote branch, you can create a Pull Request.

Drafting your Request

When creating a PR, ensure you make descriptive notes of your changes. This way, I know what you did and why and how I can review and ensure that it works correctly. Be detailed where necessary and explain code that may not be obvious as to what it does. Also note any additional changes like new sample assets or changes to existing ones.

Contributing In-server

If there is enough interest, I will set up a dedicated server for people to make changes to SFramework. With this in place, contributions can be made there and commits and pushes can be handled by me. For now, it should be done in a project of your own.