LogoLogo
  • Introduction
  • sdks
    • Feature Comparison
    • Unity
    • Godot
    • Defold
    • LÖVE
    • Unreal
  • Quick Start
    • Unity
    • Godot
    • Defold
    • LÖVE
    • Unreal
  • Server Side
    • Entities
    • Chunks
    • Dimensions
    • Events
    • Logging
    • Lua Environment
    • Git Primer
    • Physics
  • HTTP API
    • Authentication
    • Player API
  • Api Reference
    • Entity API
      • Create
      • Message
    • Client API
      • Message
    • Dimension API
      • Create
      • Delete
      • List
    • Events API
      • on_player_join
      • on_player_leave
    • Table API
      • Append
      • Remove
      • Join
    • Util API
      • Time
      • TimeMillis
    • HTTP Request API
      • Get
      • Post
      • Put
      • Delete
    • Physics API
      • NewBody
      • NewBoxShape
      • NewSphereShape
Powered by GitBook
On this page
  • Accessing your Game Repository
  • Cloning
  • Updating your Game Repository
  • Tracking changes
  • Deploying your Game Repository
  • Deploying
  • Running
  • Collaborating on your Game Repository
  1. Server Side

Git Primer

PreviousLua EnvironmentNextPhysics

Last updated 2 months ago

We use a git repository to store and run your server-side code. So your backend code will be stored separately from the engine/client-side project.

You can , , and to your game like a regular git repository. If you are unfamiliar with git, use this page to learn. Or use the web editor in the to alter your server code directly.

Accessing your Game Repository

Your game git repository will be created with a demo project, when you create a Planetary Processing game. To access this repo and start editing it, navigate to your on the Planetary Processing website and find your repo link. It will something like this:

https://git.planetaryprocessing.io/git/aBcDE/my-planetary-processing-game.git

Cloning

  1. Using your computer's searchbar, search for 'terminal', or a similar app.

  2. Open a terminal.

  3. Use the command cd followed by the path to the directory where you want to store your backend code. Eg.

cd ‘C:\\Users\\JohnSmith\\’
  1. Clone the git repository to that directory, by replacing the repo link below with your own.

git clone https://git.planetaryprocessing.io/git/aBcDE/my-planetary-processing-game.git

This will download the Lua files currently in your repo to your computer and give you version control over them.

  1. Enter login credentials.

These will be the same email and password you use to login to the Planetary Processing website. For security, some terminals will not show the password at all, as you type it. If so, simply type the password as normal, then press enter.

Updating your Game Repository

Tracking changes

  1. Open your terminal.

  2. Make sure you are in your repo’s local directory, using the cd command to navigate to it.

  3. Use the git commands below to see the changed files and the changes themselves.

git status
git diff

Deploying your Game Repository

  1. Open your terminal.

  2. Make sure you are in your repo’s local directory, using the cd command to navigate to it.

  3. Use the git commands below to stage the files for upload, label the changes with a message of what was updated, and push the files to the online repo.

git add .
git commit -m "Configure game entities and logic for Planetary Processing"
git push

Your backend code will now be stored in your online repo, but will not be running live yet.

Deploying

  1. From the actions menu in the top right, select "Deploy Latest Version" - this will roll out your updated server-side code.

Running

  1. Click "Start Game" to begin running the server-side code from your git repository.

Collaborating on your Game Repository

Premium Only

Make sure your local backend code stays up to date with your remote game repository, by regularly checking for changes by your team.

  1. Open your terminal.

  2. Make sure you are in your repo’s local directory, using the cd command to navigate to it.

  3. Use the git commands below to get the changes and synchronise your local game repository.

git fetch
git pull

You can edit the behaviour of by changing their Lua file within the entity directory.

You can also change how many and what entities are spawned in the file.

Start with something simple, like an . Or if you have your game engine setup, try altering entity/player.lua to receive a from your client, telling it how to move or act.

The remote game repository cannot be viewed directly on development platforms like Github. Use either the git command line, your preferred IDE, or the web editor in the to keep track of edits.

After configuring your game and logic, push your changes to the game repository.

Go back to your game dashboard in our .

entities
init.lua
panel
entities
web panel
panel
game’s dashboard
clone
edit
push
creating
entity
message