Simulation Starter Kit

SimulationStarterKit is a plugin-based graphical editor, engine and SDK for Windows and macOS (Linux version can be provided upon request). For more details visit the itch.io page here or try it out below:

Example – Zero code

Build your scene in the editor and then launch under the standalone executable shipped with the editor. The scene’s logic and resources are embedded within the scene file (i.e. shaders, scripts, textures, models and animations). The same scene file can be loaded and run on Mac, Windows, Linux or the Raspberry Pi making it trivial to share your creations:

./standalone MyGame.msf

Example – Scripting

You can also build scenes programmatically using the accessible LUA scripting language:

require('fireflyscript')
sdk   = fireflyscript.SDK_GetInstance()
scene = sdk:GetScene()
root  = scene:Find('MyScene')
pos   = fireflyscript.Vector3Helper()
xForm = fireflyscript.Transform()
for count = 1,50 do
    pos:Init(math.random(0, 100) -50,math.random(0, 100) -50,math.random(0, 100) -50)
    item = sdk:CreateSceneItem(fireflyscript.SceneItemType_BoxSceneItem, 'TestBox')
    xForm:Position(pos:ToVector3())
    item:SetPropertyValueByName('Transform', xForm)
    root:InsertChildAtIndex(item)
end

Example – Minimal code

You can build simple scenes in the editor with no code and then generate your application skeleton using the in-editor code wizard leaving you to simply load your interactive scene in a single line of code. You can then obtain references to the resources / logic in your loaded app adding new resources and logic through the SDK’s apis:

#include "firefly.h"
using namespace firefly;
SceneItem* scene;

int LoadScene(int argc, char* argv[])
{
    // load MyScene.msf scene created in the editor
    scene = SDK::GetInstance().Load(GetFireflyDir() + "MyScene.msf");
    return 0;
}

int DrawScene()
{
    SDK::GetInstance().Update(*scene);
    return 0;
}

int DestroyScene()
{
    scene->Release();    
    return 0;
}

Example – C++

You can build scenes programmatically using C++:

#include "firefly.h"
using namespace firefly;
SceneItem* scene;

int LoadScene(int argc, char* argv[])
{
    SDK::SceneSettings settings;
    settings.NormalPerVertex = true;
    SDK::GetInstance().SetSceneSettings(settings);

    // Scene root
    scene = static_cast<BranchSceneItem*>(SDK::GetInstance().CreateSceneItem(SceneItemType_Group));

    // Camera
    auto scamera = static_cast<EditorCamera*>(SDK::GetInstance().CreateSceneItem(SceneItemType_EditorCamera, "Editor Camera"));
    scamera->SetPosition(Vector3(0.f, 5.f, 20.f));
    scamera->SetLookAt(Vector3(0.f, 5.f, 0.f));
    scamera->SetPickingEnabled(true);
    scamera->SetSpeed(10.f);
    scene->InsertChildAtIndex(*scamera);
    scamera->SetActive(true);

    // Main scene
    auto mainScene = static_cast<BranchSceneItem*>(SDK::GetInstance().CreateSceneItem(SceneItemType_Group, "MainScene"));
    scamera->InsertChildAtIndex(*mainScene);

    // Light
    auto light = static_cast<Light*>(SDK::GetInstance().CreateSceneItem(SceneItemType_Light));
    light->SetPosition(Vector3(0.f, 10.f, 10.f));
    light->SetLightType(Light::Positional);
    mainScene->InsertChildAtIndex(*light);

    // Model
    auto modelScene = SDK::GetInstance().Load(GetFireflyDir() + "model.obj");
    mainScene->InsertChildAtIndex(*modelScene);
    return 0;
}

int DrawScene()
{
    SDK::GetInstance().Update(*scene);
    return 0;
}

int DestroyScene()
{
    scene->Release();   
    return 0;
}

Video log

Engine development and features are showcased in the videos below: