reckfellENGINE

Command line: import, run and check C#

Select a project, pass arguments and verify completion.

On this page

Use the installed Reckfell Engine 1.0.0 executable. A C# project also needs its matching SDK, restored dependencies and a successful .csproj build. The command line does not replace C# compilation.

PowerShell paths with spaces

Replace these two paths with your absolute paths. $engineExe names a file; $projectDir names the directory containing project.reckfell:

PowerShell
$engineExe = 'C:\Tools\Reckfell\Reckfell Engine.console.exe'
$projectDir = 'C:\Projects\My Game'
& $engineExe --version
& $engineExe --help

The & operator runs the file held in a string variable. Do not concatenate a command string or use Invoke-Expression. The checked build returns 1.0.0 for --version; --help lists options and restrictions for that particular build.

Import and run

PowerShell
& $engineExe --headless --path $projectDir --editor --import
if ($LASTEXITCODE -ne 0) { throw 'Resource import failed' }
& $engineExe --path $projectDir

--path selects the project independently of the terminal working directory. --editor --import waits for resource import and exits. To open the visible editor, use --editor without --import or --headless. The final command above runs the project's configured main level.

For a specific level, pass --scene 'asset://Levels/Main.rscene'; the file must exist in the selected project. Do not treat a .cs file passed to --script as a replacement for running an ordinary Entity: the C# examples below run inside a level.

Game arguments

Everything after -- is a user argument. The engine stops interpreting that tail as engine options. For example, --headless after the separator does not enable headless mode.

PowerShell
& $engineExe --headless --path $projectDir -- --smoke-test

Save CliSmokeTest.cs, attach it to an Entity in the main level, and rebuild the C# project:

C#
using Reckfell;
using System;

public partial class CliSmokeTest : Entity
{
    public override void _Ready()
    {
        if (Array.IndexOf(OS.GetCmdlineUserArgs(), "--smoke-test") < 0) return;
        ReckfellApi.Print("SMOKE_READY");
        GetTree().Quit();
    }
}

Expected result: the console prints SMOKE_READY and the process exits with code 0. Without --smoke-test, this script does not terminate the game. It establishes level loading and _Ready execution, rather than graphics, physics or whole-game correctness.

OS.GetCmdlineUserArgs() returns the tail after the separator; OS.GetCmdlineArgs() returns engine arguments without that tail. Pass a value containing spaces as one argument, such as '--name=My Game'.

Bound a run and collect a log

OptionPurpose
--headlessRuns without a window using the headless display and Dummy audio. Does not validate visual or audible output.
--quit-after 3Exits after three processing iterations; not three seconds or a successful-test assertion.
--max-fps 60Sets the live FPS cap. Does not guarantee reaching 60 FPS.
--log-file 'C:\Logs\run.log'Selects an explicit log path; the parent directory must be writable.

For automation, check the process code and your own scenario-completion marker. Code 0 after --quit-after alone does not establish that the test logic ran. Return a nonzero code on failure with GetTree().Quit(code); see exit requests.

Diagnose startup failures

  • The wrong project opens: check --path and the directory's project.reckfell file.
  • A path with spaces splits: use a variable or a single quoted argument.
  • A C# type fails to load: fix compilation and SDK mismatch first, then import resources.
  • An option is ignored: put it before -- and check this build's --help. Editor options need not exist in an export template.

Real process checks cover version, help, import from another working directory, a project path with spaces, user arguments, FPS, log output, explicit level selection, the exact smoke script and three processing frames before --quit-after 3. Export, the graphical editor, other switches and execution specifically through PowerShell were not tested: the checks pass separate process arguments.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.