Project Heartbeat

Project Heartbeat

Ei tarpeeksi arvosteluja
Heartbeat-o-nomicon
Tekijältä EIREXE
This is a guide or advanced users, this details the internals of the game and how they work, I hope this information can become useful for modders and advanced players.
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Introduction and liability
This guide contains information about Project Heartbeat internals and some hidden features you might be interested in

Keep in mind everything in this list is completely unsupported, but it's made available in case it is useful to someone, I would suggest that for more advanced features you backup your user folder. These features aren't designed with the same care the rest of the game is made since they are mostly debugging features, don't tell me I didn't warn you.
Hidden features
Some of the game's features are hidden, there may be various reasons behind this, but generally it's because they are debugging features that aren't supposed to be used by the general public and may change at any time.

Controller visualizer (Only on 0.6.0 and higher)


A very simple controller visualization tool is provided, press Control+G to enable it.

Debug menu

The debug menu can be enabled by pressing Control+D, this menu allows you to check the logs with filtering and do various things (achievment related buttons only work on EIRTeam accounts).

You can also enable autoplay, obviously scores achieved with autoplay enabled won't count for leaderboards.

Debug display

Some parts of the game might allow you to see extra data on screen, this may vary from update to update and it's used for debugging on my end, to enable the debug display simply press Control+F.
Project Heartbeat technology stack
Project Heartbeat is built using a custom build of the Godot Engine version 3.2.3, this custom build has included a Steamworks module, based on Gramp's GodotSteam, but with some small changes.

During early access Hearbteat ships with a semi-debug build of the engine, this means it has debugging features but doesn't include debugging symbols and it also doesn't have all optimizations disabled, this is a very good middle ground, it makes it easier to find bugs while having a relatively small performance loss.

Native modules

Some parts of Project Heartbeat are contained inside native modules, the game can be built without these modules on platforms that have no use for them.

Video decoding is done using a GDNative binding to FFmpeg, this will probably be changed in the future to an internal libvpx module (or I will fix godot's libvpx decoder, which currently is in a fairly broken state, hence why we use the ffmpeg binding).

Discord rich presence is also done through a GDNative module written in rust.

Godot package

Project Heartbeat's included assets are contained inside a read-only filesystem inside the "Project Heartbeat.pck" package file.

Godot caches all assets into a more game-friendly format inside an internal cache folder than is found inside the game's PCK, this means that external assets such as images or audio files are loaded in a slightly different way.

Multi-threaded asset loading

On platforms where it's available, PH makes use
Command line arguments
Heartbeat accepts many command line arguments, keep in mind a lot of these aren't available on the retail build of the engine that ships with PH (and even if you did, they wouldn't be very useful, read the first chapter on why this is the case).

Options that don't work in the shipping versions of the game are marked with TOOL

PH-specific options
Command
Description
--demo-mode
Forces the game to run in demo mode, more information below. Only available since 0.6.0

Demo mode

When running the game in demo mode the following features are disabled/changed:

  • User content is entirely disabled, this includes loading of songs folder songs, workshop songs, custom icon packs and the editor.
  • Multiplayer is disabled
  • Instead of loading the traditional version of the main menu a demo version of it is loaded instead.
  • YoutubeDL is disabled entirely.

Keep in mind the demo build differs in more than one place with the normal build, for example it doesn't come with the YoutubeDL binaries and FFmpeg video decoding binaries. It also only ships with a few songs meant only for the demo.

General options

Command
Description
-h, --help, /?
Displays the list of command line options available
--version
Displays the version string of the engine, not of the game.
-v, --verbose
Enables verbose stdout mode
--quiet
Quiet mode, silences stdout messages. Errors are still displayed.

Run options

Command
Description
-e, --editor
TOOL Runs the game in engine editor mode (This is not the same as the chart editor).
-p, --project-manager
TOOL runs the engine project manager.
-q, --quit
Quit after the first iteration.
-l <locale>, --language <locale>
Currently unused, changes the locale for the game.
--path <directory>
Path to a project (<directory> must contain a 'project.godot' file).
-u, --upwards
Scan folders upwards for 'project.godot' file.
--render-thread <mode>
Render thread mode ('unsafe', 'safe', 'separate'). See Thread Model[docs.godotengine.org] for more details. (Unsafe breaks the game hard, do not use it).
--remote-fs <address>
Remote filesystem (<host/IP>[:<port>] address).
--remote-fs-password <password>
Password for remote filesystem.
--audio-driver <driver>
Audio driver to use. Use --help to display list of available drivers for your platform.
--video-driver <driver>
Video driver to use. Use --help to display list of available drivers for your platform. Currently only GLES2 and GLES3 are available, however GLES3 will eventually be abandoned in favor of Vulkan.
--angle-backend
Available only in the ANGLE build of the engine. Lets you select which ANGLE backend to use, currently only d3d11 and vulkan are available. When using the vulkan backend also include --video-driver GLES2, as the vulkan backend doesn't entirely implement GLES3

Display options

Command
Description
-f, --fullscreen
Request fullscreen mode.
-m, --maximized
Request a maximized window.
-w, --windowed
Request windowed mode.
-t, --always-on-top
Request an always-on-top window.
--resolution <W>x<H>
Request window resolution.
--position <X>,<Y>
Request window position.
--low-dpi
Force low-DPI mode (Windows only)
--no-window
Disable window creation (Windows only). Useful together with --script.
--enable-vsync-via-compositor
When vsync is enabled, vsync via the OS' window compositor (Windows only).
--disable-vsync-via-compositor
Disable vsync via the OS' window compositor (Windows only).

Debug options

Note that the following options are only available during early access, this is because they are only available on debug builds of the engine, future builds of the game won't have these options, however if the community wants to we can still ship a debug binary of the engine with the game.

Command
Description
-d, --debug
Debug (local stdout debugger).
-b, --breakpoints
Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).
--profiling
Request windowed mode.
--remote-debug <address>
Remote debug (<host/IP>:<port> address).
--frame-delay <ms>
Simulate high CPU load (delay each frame by <ms> milliseconds).
--disable-render-loop
Disable render loop so rendering only occurs when called explicitly from script.
--disable-crash-handler
Disable crash handler when supported by the platform code.
--fixed-fps <fps>
Force a fixed number of frames per second. This setting disables real-time synchronization.
--print-fps
Print the frames per second to the stdout.

Standalone tools

Command
Description
-s <script>, --script <script>
Run a script. Note that if you are interested in modding the game's scripting system I recommend waiting for an official solution, as this system is likely to break due to internal API changes (particularly when the vulkan renderer comes).
--check-only
Only parse for errors and quit (use with --script).