Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to Compile: FNF In-Depth - A Tutorial for Friday Night Funkin'

A full tutorial on how to compile FNF.

Before reading this: if you are having any troubles, the read me file on the FNF GitHub explains everything in a simplier way.

Step 1: Downloading


Stuff You Need:
FNF Source Code: https://github.com/ninjamuffin99/Funkin/archive/master.zip
Git: https://gitforwindows.org/
Visual Studio Community: https://visualstudio.microsoft.com/vs/community/
Haxe: https://haxe.org/download/version/4.1.5/


Step 2: Setting Up

Visual Studio Community:
When you download Visual Studio Community, it should also have an installer that also comes with it. 
When it opens press Available   and press install on Visual Studio Community, and wait for it to open the Workloads page. Once open, select Individual Components and search for MSVC v142 and VS 2019 C++ x64/x86 build tools. Select both of those Components, press install and wait for it to finish downloading. 

Command Prompt:
Open command prompt and type the following: 
  • haxelib install lime
  • haxelib install openfl
  • haxelib install fixel
  • haxelib install fixel-ui
  • haxelib install fixel-addons
  • haxelib install newgrounds
  • haxelib install hscript
  • haxelib git polymod https://github.com/larsiusprime/polymod.git
and finally run: haxelib run lime setup

Source Code Editing:
Go to your FNF sourcecode file source (funkin-master/source) and copy a random .hx file and paste it in the source code, rename that file to APIStuff and open it using notepad (or whatever text editor you use) and delete the text in there and replace it with:
package;

class APIStuff

{

    public static var API:String = "";

    public static var EncKey:String = "";

}

After that, go to FreeplayState.hx lines 226 and get rid of the text "        NGio.logEvent('Fresh');"
Finally go to TitleState.hx lines 61 and remove the the text "       NGio.noLogin(APIStuff.API);"


Step 3: Testing

In the main funkin-master file and click on the search bar that has the text (This PC > Funkin-Master), remove it and type in cmd which will open Command Prompt. Type in "lime test windows -release" and it will build the game (this will take a while for the first time). When its finished FNF will open up normally.


Step 4: Compilation

To finally compile the game and create a .exe file, do the same steps you did to open the command prompt to test the source code but this time type "lime build windows -release" to finally compile the source code.
1-10 of 46
1
Pages
Go to page:
  • DJepix avatar
    DJepix Joined 3mo ago
    Offline
    48 points Ranked 69,132nd
    17hr
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\yvals.h(12): fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory
    Bananite
    URL to post:
  • Eikkie avatar
    Eikkie Joined 1mo ago
    Offline
    2d
    F:/File Eikkie/haxe/haxe/lib/polymod/git/polymod/format/XMLMerge.hx:189: characters 10-23 : Warning : This typedef is deprecated in favor of haxe.xml.Access

    F:/File Eikkie/haxe/haxe/lib/polymod/git/polymod/format/XMLMerge.hx:189: characters 30-43 : Warning : This typedef is deprecated in favor of haxe.xml.Access

    source/PlayState.hx:478: characters 3-39 : Warning : `FlxCamera.defaultCameras` is deprecated, use `FlxG.cameras.setDefaultDrawTarget` instead

    Bananite
    URL to post:
  • Deathwish071 avatar
    Deathwish071 Joined 3y ago
    Offline
    196 points Ranked 61,998th
    5d
    PS C:\Users\jaret\Desktop\make fnf modpack\Kade-Engine-master> lime test windows -release

    Error: Could not find haxelib "linc_luajit", does it need to be installed?

    PS C:\Users\jaret\Desktop\make fnf modpack\Kade-Engine-master>

    Bananite
    URL to post:
  • for me it says:
    source/Discord.hx:4: characters 8-30 : Type not found : discord_rpc.DiscordRpc

    source/Discord.hx:13: characters 3-13 : Type not found : DiscordRpc

    source/Discord.hx:23: characters 4-14 : Type not found : DiscordRpc

    source/Discord.hx:28: characters 3-13 : Type not found : DiscordRpc

    source/Discord.hx:33: characters 3-13 : Type not found : DiscordRpc

    source/Discord.hx:38: characters 3-13 : Type not found : DiscordRpc

    source/Discord.hx:74: characters 3-13 : Type not found : DiscordRpc

    C:/HaxeToolkit/haxe/lib/polymod/git/polymod/format/XMLMerge.hx:28: characters 3-4 : Unexpected }

    Why? Please help
    Bananite
    URL to post:
  • SuperPokeBro04 avatar
    SuperPokeBro04 Joined 2mo ago
    Offline
    136 points Ranked 69,237th
    13d
    Error: Cannot copy to "export/release/windows/bin/Kade Engine.exe", is the file in use?
    Bananite
    URL to post:
  • Orupail Wait WHA- avatar
    Orupail Wait WHA- Joined 3mo ago
    Offline
    90 points Ranked 62,705th
    13d
    what do i do lime wont run it

    yes i have installed it
    n o
    URL to post:
  • whenever i test/compile it it says:
    source/TitleState.hx:61: characters 16-28 : Type not found : APIStuff
    source/PlayState.hx:549: characters 17-18 : Expected expression

    any idea what i do?
    Friday Night Funker
    URL to post:
  • SuperPokeBro04 avatar
    SuperPokeBro04 Joined 2mo ago
    Offline
    136 points Ranked 69,237th
    13d
    PS C:\Users\shann_000\Desktop\fnf stuff\Kade-Engine-master> haxelib install fixel

    Error: Failed with error: No such Project : fixel

    PS C:\Users\shann_000\Desktop\fnf stuff\Kade-Engine-master> 
    How do I fix this?
    Bananite
    URL to post:
  • Fixel is not installing on my command prompt, what could i do?

    Bananite
    URL to post:
  • i keep getting errors and i dont know what they mean... i just tried to change some song names and week names

    C:/HaxeToolkit/haxe/lib/polymod/git/polymod/format/XMLMerge.hx:189: characters 10-23 : Warning : This typedef is deprecated in favor of haxe.xml.Access
    C:/HaxeToolkit/haxe/lib/polymod/git/polymod/format/XMLMerge.hx:189: characters 30-43 : Warning : This typedef is deprecated in favor of haxe.xml.Access

    source/PlayState.hx:89: characters 21-30 : Type not found : FlxCamera

    source/StoryMenuState.hx:18: lines 18-440 : Defined in this class

    source/PlayState.hx:7: characters 1-46 : flixel.FlxCamera has no field or subtype setDefaultDrawTarget

    source/StoryMenuState.hx:317: characters 14-27 : Class<PlayState> has no field campaignScore

    source/Character.hx:120: characters 46-57 : Class<PlayState> has no field daPixelZoom

    source/Note.hx:77: characters 46-57 : Class<PlayState> has no field daPixelZoom

    Bananite
    URL to post:

Details

Difficulty Level
Intermediate