Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 26 additions & 21 deletions COMPILING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
# How to Compile FNF:JE
# How to Compile the Polyverse Environment

> [!TIP]
> If you want some helpful info about the Gradle tasks (or the framework FNF:JE uses), consider taking a look at [LIBGDX.md](PROJECT.md)!
> If you want some helpful info about the Gradle tasks (or the frameworks Polyverse uses), consider taking a look at [PROJECT.md](PROJECT.md)!

There are two main ways you can download and compile the game's code: with GitHub Desktop or the terminal.

In this guide, we'll use the GitHub Desktop method, since it the most user-friendly experience, which provides you a nice UI and does all the hard stuff for you!

# Prerequisites (for all methods)
- A [GitHub](https://github.com) account to download the game's GitHub repository.
# Prerequisites (<u>*REQUIRED*</u>)
- A [GitHub](https://github.com) account to download the game's GitHub repository (only if you're using GitHub Desktop!).
- A [Java Development Kit (JDK)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) to compile the game's code.
- An integrated development environment.
- We recommend either one of the options listed below:
- [IntelliJ IDEA](https://www.jetbrains.com/idea/download/)
- [Eclipse](https://www.eclipse.org/downloads/)
- [VS Code](https://code.visualstudio.com/)
- Some basic knowledge of programming (especially Gradle) and how to navigate an IDE.
- The [IntelliJ IDEA](https://www.jetbrains.com/idea/download/) IDE.
- Some basic knowledge of programming (especially with using Gradle) and how to navigate an IDE.

> [!TIP]
> Although every IDE listed is great for Java, we STRONGLY recommend IntelliJ IDEA, due to how beginner-friendly and integrated it is with FNF:JE!
> Although Eclipse is great for Java as well, we STRONGLY recommend IntelliJ IDEA, due to how beginner-friendly and integrated it is with Polyverse!

# Step-by-Step Guide

1. Visit the official [GitHub Desktop website](https://desktop.github.com/download/) and download the app.
1. Download the JDK and run the installer accordingly. You generally don't need to change any settings

2. Visit the official [GitHub Desktop website](https://desktop.github.com/download/) and download the app. Make sure to run the installer and
sign in with your GitHub account!

> [!TIP]
> If you're on Linux, don't worry! You can install a community made version by running the following commands in the terminal:
Expand All @@ -35,19 +30,29 @@ In this guide, we'll use the GitHub Desktop method, since it the most user-frien
> sudo apt update && sudo apt install github-desktop
> ```

2. When GitHub Desktop is done installing, sign in with your GitHub account when prompted to do so.
3. When GitHub Desktop is done installing, sign in with your GitHub account when prompted to do so.

4. Go back to your browser and (on the official home page for Polyverse's repository), click the green `<> Code` button and select `Open with GitHub Desktop`.
You should see a prompt asking if you want to clone the game's code.

> [!NOTE]
> If you're on Linux, cloning through the GitHub website and desktop app won't work. Although most Linux distros already have Git installed,
> you can check if you have it by running the command `git --version`. If you get an error saying the command doesn't exist, then you will have to install it onto your system.
> You can install Polyverse through Git with the following command (make sure you're running it in the folder you want it to be located in!):

3. Go back to your browser and (on the official home page for FNF:JE's repository), click the green `<> Code` button and select `Open with GitHub Desktop`. You should see a prompt asking if you want to clone the game's code.
```shell
git clone https://github.com/stringdotjar/Polyverse-Funkin.git optional/path/to/clone/into/
```

4. Click the blue `Clone` button and wait for the game's code to download.
5. Click the blue `Clone` button and wait for the game's code to download.

> [!TIP]
> We recommend putting the game's code in a place where you'll easily remember where it's at, such as your `Documents\GitHub` folder if you're on Windows!

5. Launch your IDE and open the game's folder when prompted to do so.
6. Open IntelliJ IDEA and open the game's folder when prompted to do so.

> [!IMPORTANT]
> When you open the game's folder, your IDE will most likely start running Gradle tasks. Don't worry, this is normal and expected!

6. When the tasks are finished, you can now run the game's code! You can do so by running the applicable task depending on the platform.
7. When the tasks are finished, you can now run the game's code! You can do so by running the applicable task depending on the platform.
- For example, you can run the desktop version by executing the task `lwjgl3:run`.
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Friday Night Funkin': Java Edition License
# Polyverse Funkin' License

The original game (created by Cameron Taylor and the Funkin' Crew) uses a license called the *Apache License*, which is a permissive, free software license that allows users to freely use, modify, and distribute the software for any purpose, including commercially.

Because Friday Night Funkin': Java Edition (FNF:JE) is based off of the base game, we also adapt the same license they have to maintain consistency.
Because Polyverse Funkin' is an environment made for the base game, we also adapt the same license they have to maintain consistency.

## License

Expand Down
8 changes: 4 additions & 4 deletions PROJECT.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## This is a [libGDX](https://libgdx.com/) project generated with [gdx-liftoff](https://github.com/libgdx/gdx-liftoff).

# Platforms
# Project Modules

FNF:JE is designed to run on multiple different platforms. Below are the different modules that hold the code for each one.
Polyverse has many different submodules to organize the environment.

- `funkin`: The core part of the game's code. This is where all the game logic is implemented.
- `flixelgdx`: Custom framework that bridges [HaxeFlixel](https://haxeflixel.com/) and is based on libGDX. This is where the HaxeFlixel-like API is implemented.
- `flixelgdx`: Custom framework that bridges [HaxeFlixel](https://haxeflixel.com/) to Java and is based on libGDX. This is where the HaxeFlixel-like API is implemented.
- `polyverse`: Custom library for adding modding capabilities to the game.
- `lwjgl3`: Primary desktop platform using [LWJGL3](https://www.lwjgl.org/). This is what launches the desktop versions of the game!
- `android`: Android mobile platform. <u>This requires the Android SDK, which can be downloaded and configured simply by running the universal [setup file](setup/android_setup.sh)!</u>
Expand Down Expand Up @@ -34,7 +34,7 @@ The Gradle wrapper was included, so you can run Gradle tasks using `gradlew.bat`
- `clean`: removes `build` folders, which store compiled classes and built archives.
- `eclipse`: generates Eclipse project data.
- `idea`: generates IntelliJ project data.
- `funkin:exportModSDK`: Exports the game's API and its dependencies as `.jar` files to the assets folder.
- `funkin:exportModSDK`: exports the game's API and its dependencies as `.jar` files to the assets folder.
- `lwjgl3:jar`: builds the game's runnable jar, which can be found at `lwjgl3/build/libs`.
- `lwjgl3:run`: starts the desktop version of the game.
- `test`: runs unit tests (if any).
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Friday Night Funkin': Java Edition
# Polyverse Funkin'

Welcome to the official GitHub repository for the Java edition of Friday Night Funkin'!
Welcome to the official GitHub repository for the Java modding environment of Friday Night Funkin'!

> [!NOTE]
> This is a fan-made project and is not affiliated with the original developers. You can play the original game [here](https://ninja-muffin24.itch.io/funkin).

## <u>Please note that this unofficial version of the game is NOT completed! This has a long way to go, but with YOUR help, we can make this project come alive! <3</u>

# About the Project
Friday Night Funkin': Java Edition is an open-source project that aims to recreate the popular rhythm game [Friday Night Funkin'](https://github.com/FunkinCrew/Funkin) using Java.
Polyverse Funkin' is an open-source project that aims to create the popular rhythm game [Friday Night Funkin'](https://github.com/FunkinCrew/Funkin) using Java.
It is built using its own custom framework based on libGDX, called FlixelGDX: a Java port of the HaxeFlixel framework used in the original game.

The project is designed to have practically endless modding capabilities, empowering developers to use features for mods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import me.stringdotjar.funkin.FunkinGame;
import me.stringdotjar.funkin.InitScreen;
import me.stringdotjar.funkin.InitState;
import me.stringdotjar.funkin.util.FunkinConstants;

/** Launches the Android application. */
Expand All @@ -17,7 +17,7 @@ protected void onCreate(Bundle savedInstanceState) {
FunkinConstants.WINDOW_TITLE,
FunkinConstants.WINDOW_WIDTH,
FunkinConstants.WINDOW_HEIGHT,
new InitScreen()
new InitState()
);
AndroidApplicationConfiguration configuration = new AndroidApplicationConfiguration();
configuration.useImmersiveMode = true; // Recommended, but not required.
Expand Down
2 changes: 1 addition & 1 deletion assets/another_test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AnotherTestClass extends Script {

sprite.setPosition(randomPosX, randomPosY)

Flixel.screen.add(sprite)
Flixel.state.add(sprite)
}
}

Expand Down
15 changes: 15 additions & 0 deletions assets/oml.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import me.stringdotjar.flixelgdx.Flixel
import me.stringdotjar.polyverse.script.type.AnotherType

class Sob extends AnotherType {

Sob() {
super('Sob')
}

@Override
void onWindowFocused() {
super.onWindowFocused()
Flixel.info("i hate [insert particular ethnicity here]")
}
}
28 changes: 18 additions & 10 deletions assets/test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.badlogic.gdx.Gdx
import com.badlogic.gdx.Input
import com.badlogic.gdx.graphics.Color
import me.stringdotjar.flixelgdx.Flixel
import me.stringdotjar.flixelgdx.graphics.screen.FlixelScreen
import me.stringdotjar.flixelgdx.graphics.FlixelState
import me.stringdotjar.flixelgdx.backend.FlixelPaths
import me.stringdotjar.flixelgdx.graphics.sprite.FlixelSprite
import me.stringdotjar.polyverse.script.type.SystemScript
Expand All @@ -24,7 +24,7 @@ class TestScript extends SystemScript {
super.onRender(delta)

if (Gdx.input.isKeyJustPressed(Input.Keys.Q)) {
Flixel.setScreen(new TestScreen())
Flixel.switchState(new TestState())
}
}

Expand All @@ -33,26 +33,34 @@ class TestScript extends SystemScript {
super.onDispose()
Flixel.info("TestClass", "Script has been disposed!")
}

@Override
void onWindowFocused() {
super.onWindowFocused()
Flixel.info("i like em young")
}
}

class TestScreen extends FlixelScreen {
class TestState extends FlixelState {

private FlixelSprite test

@Override
void show() {
super.show()

test = new FlixelSprite().loadGraphic(FlixelPaths.sharedImageAsset('NOTE_hold_assets'))
add(test)
void create() {
super.create()

bgColor = new Color(0, 1, 0, 1)

Flixel.playMusic('songs/darnell/Inst.ogg')

// test.changeX(-30)

test = new FlixelSprite().loadGraphic(FlixelPaths.sharedImageAsset('NOTE_hold_assets'))
add(test)
}

@Override
void render(float delta) {
super.render(delta)
void update(float delta) {
super.update(delta)
}
}
Loading