Skip to content

Latest commit

 

History

History
96 lines (85 loc) · 4.61 KB

README.md

File metadata and controls

96 lines (85 loc) · 4.61 KB

PydayNightFunkin

This is a rewrite of (accidentally half of HaxeFlixel and) Friday Night Funkin' in Python and some Cython.

Why? "Beep boop funny", camelCase looks ugly and as a proof to no-one that the PlayState.hx monolith is the worst, that would be why.
Not a lot is done, but you can at least click through some menus and partake in a few non-recorded vowel-screaming contests.

Used libraries

How to run?

I'm honored you want to try this out, because there's really nothing revolutionary in here. Anyways:

0. Prerequisites

  • You will need OpenGL 4.5 support on your system, cause the Direct State Access mechanism it introduced was just too sweet to not use.
  • You will need Python.
    • I recommend getting it from its official website. I have seen the windows store version cause weird access restriction problems when installing packages, though this likely was just a case of a system possessed by some sort of spirit.
    • 3.11 is definitely recommended due to its speed advantages, but anything starting from 3.8 should work.
  • Ensure that Python can build C extensions; that is: you have a C compiler set up.
    • I am sorry to disappoint if you thought Python meant not having to deal with that. PNF gets some of its speed and capabilities from custom C extensions.
    • If on Windows, you will need Visual Studio; the required packages and versions are difficult to pinpoint and unlikely to remain stable over longer time periods. This wiki entry seems to have somewhat up-to-date information on what you'll need.

Now, run the commands below.
NOTE: If python3 fails, try python or py instead, the name may differ depending on your OS and Python variants.

1A. Clone the repo | Option A (Requires git)

Create and/or choose a directory where the project fits well. (Code/python, Documents/experiments, Games/pnf, test, the possibilities are endless.)
Then, open a terminal in it and clone the repository:

git clone https://github.com/Square789/PydayNightFunkin.git
cd PydayNightFunkin

1B. Clone the repo | Option B

Download the source via the Code > Download ZIP button on top of the page and extract that somewhere it fits well, then open a terminal inside the directory containing README.md (among other files).

2. Set up and activate a virtual environment

This step is optional, but heavily recommended. If you skip it, your global Python installation will be cluttered with a bunch of libraries and PNF might break should these ever change by the requirements of other projects.
You will need to activate this venv every time you want to run PNF. If on Linux, pyenv alongside the pyenv-virtualenv plugin is my choice to automate this, on Windows it's usually IDEs such as Visual Studio Code that will automatically run the activation command when opening the project.

python3 -m venv pnfvenv
pnfvenv/Scripts/activate

NOTE: The activation command of a venv depends on your OS and shell. See this page for a few ways of doing it.

3. Get the build dependencies and build the C extensions

python3 -m pip install -r requirements_build.txt
python3 setup.py build_ext -i

NOTE: This step may fail in many unpredictable and nasty ways. If that happens, please send me a friend request on discord at Square789#0486 (not too sure whether that actually works), or open an issue.
I'll try my best to help with anything.

4. Get the runtime dependencies

python3 -m pip install -r requirements.txt

5. Run

python3 run.py

NOTE: PydayNightFunkin can be run with a few flags. By default, debug mode is active, the debug pane will be shown and an error check is made after each OpenGL call. This can be deactivated, squeezing out more performance. See python3 run.py --help for all available options!
(PS: --less-debug --less-debug is equivalent to -ll)