Skip to content

justapotato213/Jump-of-Fate

Repository files navigation

Jump of Fate

A unity platforming game, featuring ugprades and differing levels. Made by Edison Ying and Tony Lin.

Installation Instructions

Playing

Releases

  1. Download the corresponding version for your computer.
  2. Unzip the file, and run the executable (JOFv1.0.0 or My Project.exe, depending on OS).

Building

If you would like to build it on your computer, follow these steps:

  1. Download and install both Unity Hub and Unity (version: 2021.3.21f1).
  2. Register for a unity license.
  3. Clone this repository using git clone https://github.com/justapotato213/Jump-of-Fate.git inside a git terminal, or clone using an alternative method of your choice.
  4. Open the project in Unity.
  5. Build the project using unity for your desired platform, and run the executable unity builds.

Editing

Game

  1. Follow steps 1-4 in Building.
  2. Download Visual Studio, making sure to install the unity workload within the installer.
  3. With the unity project open, click on edit -> preferences.
  4. Click on external tools, and make sure Visual Studio is selected.
  5. Under the section labeled "Generate .csproj files for", make sure all checkmarks are ticked.
  6. Click the "Regenerate project files".
  7. Within Visual Studio, click on open and locate the .sln file within your project.
  8. Open the .sln file, and begin editing!
  9. The overall scene can be edited within unity.

Level Generator

  1. Follow steps 1-4 in playing.
  2. Open LevelGenerator/imageGenerator.py.
  3. Edit the code in the file using an IDE of your choice.
  4. Add slices in the form of .jpg images inside Input_Images folder.
  5. Once you run the Python script, generated levels will be saved in the Levels folder.

Notes

Game

  • The level generation is handled by the WorldGen.cs file.
    • This functions by looking at a level image, and looking pixel by pixel at its RGB codes.
    • It then places the corresponding prefabs and tiles, as determined in unity.
      • This can be edited by opening the Tile Map game object, and changing the settings within "Color Tile Mapping" and "Color Prefab Mapping"
    • When a level gets deleted, every child of Tile Map gets deleted, and therefore cannot be used to store information between levels.
  • Player movement is within the PlayerController.cs file.
  • Save data is saved under the PersistentDataPath of unity, inside sav.dat.
    • This is simply stored as a JSON format.
  • There are two scenes, MainMenu and SampleScene, where the MainMenu is the beginning menu, and SampleScene is the main game itself.

Level Generator

  • imageGenerator.py is the Python file used to generate the levels
    • Note: In order to run this file, you will need to have the PILLOW library installed in Python.
    • It works by randomly combining the slices (images) horizontally and adds the start and the end to each level.
    • Once these images are saved in Levels, you can transfer them into Assets/Resources/Level and they will be playable.

Documentation

  • The main user manual is found in this Doc which contains all the information needed to play the game