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.
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
Polyverse is an open-source project that aims to create a professional-grade modding environment for the popular rhythm game Friday Night Funkin' using Java instead of Haxe.
Note
FlixelGDX is still a work in progress, so documentation for it isn't quite ready. Docs for both FlixelGDX and Polyverse will be written once Polyverse is ready to be fully released to the public, and FlixelGDX will be moved to its own separate repository for it to become its own library for anyone to use!
Polyverse is built using its own custom framework based on libGDX, called FlixelGDX: a Java port of the HaxeFlixel framework used in the original FNF, which aims to balance Flixel features developers love by replicating existing ones, improving them, or even adding new ones!
The project is designed to have practically endless modding capabilities, empowering developers to use features for mods which otherwise would be impossible to accomplish in the original game and HaxeFlixel.
For a long time, the FNF community has experienced frustrations with the Haxe language. While it has many benefits, such as its powerful transpiler, simple syntax, and more, there are many problems with it, such as:
Haxe isn't a very large language, and because of its small number of libraries, it makes it difficult to accomplish complex tasks without many hacky workarounds. This causes many issues for everyone:
Not very many extensions are supported for Haxe, and because of this, it not only makes it difficult for contributors and modders changing the source code of the game (due to the official extensions being incredibly slow, especially for large files), but it makes it hard for modders who want to use engines such as Psych and Codename, due to no autocomplete or linter to assist them. This makes debugging incredibly annoying and time-consuming, taking valuable time to work on other things.
Important
While we may come across as very harsh in this section, we do not mean harm by it. This is solely meant for bringing up known (and even unknown) issues with how the modding ecosystem of FNF works to make people more aware.
-
While there are editors to assist developers, many workflow problems are still present, making developer experience not the best it could be (again, some of these problems can't be fixed very easily because of Haxe's limitations!).
-
Because of how incredibly annoying it is to code for the game (and soft coded mods that engines use), it discourages people from wanting to learn how to code for the game, and because it discourages people, there aren't very many programmers, and because there are almost no programmers, it makes it difficult for hobbyists to want to make a mod. This chain reaction makes it harder for everyone.
-
Creating and shipping mods are poorly designed. You're required to manually create files and folders for your mod's contents, then you're expected to manually zip the mod's contents and upload it to mod websites such as GameBanana. Then, for users playing the mod(s), they need to manually unzip the file and then drag them into the
modsfolder. -
In Psych Engine, choosing Lua for the scripting language is a horrible and poor design choice. While Lua is a popular choice for many people, it isn't always the best choice. Haxe is a structured, class-based language, while Lua is a scripting, non object-oriented language. Because Psych chose a polar opposite language that's not similar to Haxe at all, they were required to make many bridges for scripts to run properly, making it hard for both themselves and programmers to write scripts for mods.
-
Scripts are interpreted instead of compiled, causing bugs to appear later instead of before the start. This ends up making debugging more difficult than it needs to be.
-
Because the base game is still hardcoded into the engines, it adds a bunch of annoying bloat in the way. For many mods, they usually avoid the existing menus and default assets because they want to add their own.
-
HScript (the scripting library for running Haxe code at runtime) is very unreliable and unsafe. Because Haxe uses a transpiler, programmers are required to manually rewrite Haxe syntax and runtime systems, which also requires them to interpret scripts instead of compiling them. Although forks have tried to fix these issues, there are still weird quirks that break scripts, such as classes within classes not importing, core Flixel features breaking, etc. Modders shouldn't have to pray and hope that a script runs properly, it should work EXACTLY as how it is written.
-
Psych and Codename both use event hooks. While it's a simple approach, it's not very flexible and doesn't allow for much extendability. Developers are required to replicate logic based on where a script is being ran, causing widespread code and boilerplate (repetitive code) that doesn't need to be there. It's also difficult to manage and doesn't allow modders to extend functionality for more behavior (either at all or not very well).
To solve these many problems, we chose industry-standard libraries, strategic tools and custom-built frameworks to make everything easier. We provide FlixelGDX - a custom replication and improved port of the Flixel library - to make the learning curve for people to adapt to Polyverse much more flat and straightforward.
We will provide professional grade editors, tools and features to improve the workflow and gameplay for mods, as we wish to greatly enhance the user experience and developer experience, making it easier for everyone in the community (and hopefully bring more attention to the game for people outside of the community!).
Java is a popular language in the industry, and it's a mature language with a large ecosystem and lots of support. It's also a statically typed language, which helps catch errors at compile time instead of runtime. This makes it easier for developers to receive feedback and fixes from the community and programmers of the language. It's very flexible and portable, which technically means that (if configured correctly) it can run on any platform, including mobile, desktop, and more.
With Java's powerful features and millions of libraries, it makes it easier for developers to accomplish complex tasks and create mods that are more feature-rich and bug-free.
Groovy is a dynamic language that is very similar to Python, but with a more Java and Haxe-like syntax. It's a great language for scripting and is very easy to learn. It directly compiles to Java bytecode, so it's very easy to integrate into the environment, and it GREATLY improves performance and readability of scripts.
Because it's object oriented, it makes it easier for developers to create and manage scripts, and it's very easy to extend the functionality of the environment.
FlixelGDX is a custom port of the Flixel library to Java and is based on libGDX. It's a great library for creating games and is very easy to learn, especially for people who are familiar with HaxeFlixel.
Since it's similar to Flixel, the learning curve for people who are familiar with Flixel is much lower, making it easier for them to adapt to and can jump right into creating mods without having to learn a new library.
This project has only one (yes, ONE) person working on this ambitious project. We want to make great things for the community, but this can't be done without YOUR help.
If you know how to code, have connections that can help get this environment more attention, or anything else, PLEASE consider contributing to this project. While we are in desperate need of experienced programmers, simply just promoting it and putting it more in large online spaces helps out SO much.
Put the Discord/GitHub link in your bio, post about it, ANYTHING will help out!