How I made this!

Topics:

> Why I made this.

> How to load/save .json files.

> How beat saber songs are saved/loaded.

Why I made this:

I have always had an interest in rhythm games.
This interest started a long time ago with a game on the internet called: Super Crazy Guitar Maniac Deluxe.
This was a simple 2D rhythm game where you had to press the correct button to not fail the song and the get the highest score possible.
Now rhythm games have come quite far, Beat Saber is a perfect example of this.
When I bought a vr, Beat Saber was the first game I started playing.
The most fun I had in the game was trying new songs that other people made and trying to get A higher score than all the other people who have completed that song.

Super Crazy Guitar Maniac Deluxe 4

HOW TO LOAD/SAVE .JSON FILES:

Json Save And Load Example

This is a basic example of how to save and load .json files.
With these files you can save all kinds of data for example: player stats, levels unlocked or upgrades bought.
This is also what Beat Saber uses to save/load maps for songs (More on this later).

!Note this is not the safest way to save data because it can easily be access and changed as it is really easy to understand.
So only use this method if you don’t mind the files being manipulated to skip or progress faster by changing the files.

How beat saber songs are saved/loaded:

The Files:
Beat saber uses two .json files to get info about the song.
There is a info.json file. This file is used to get info about: how the song is called, what artist, how many beats per minute and the difficulty levels there are.
The second files used are the difficulty files, these have names like: Easy.json, Hard.json and Expert.json.
This file contains the info about when and where to spawn a note and when the lights and the environment needs to be changed.

How to load the files into your game:
Its actually quite easy to load a .json file into your game.
All you need to do is create a class or multiple classes that match the data in the .json file.
This can later be used to save store the loaded data.
For Example:

Beat Saber Info File Example
Info File Beat Saber Unity class

Code to save/load:


string dataAsJson = File.ReadAllText(“FilePath”);
Info infoclass = JsonUtility.FromJson(dataAsJson);