[This post has been removed. Apologies for any inconvenience caused.]

At the moment I only know how to load vertex and fragment shaders onto an object, if you know how to load geometry shaders please do let me know so I can include that functionality.

You can use the main loop control functionality to execute scripts without a python controller

Is it just a plug in? Does it work for linux?(I’m downloading the tar.gz archive). How to install it exactly?

I was wondering if this is any better than the blender game engine in terms of framerate.

It is an extension to the BGE - the same engine is running the code. Think of it more like a toolkit.

As someone said above, it’s more of a toolkit, there’s no installation procedure, you can run it just by opening Loader.blend in Blender.

There’s an additional tool called Launcher that allows the game to be launched without compiling anything into the blenderplayer, using this will on Linux will require you to place a copy of Blender inside as mentioned in the readme and you will need to recompile the Launcher executable from the C++ found inside the tools directory. I hope to provide binaries for Mac and Linux (as well as make scripts) soon but right now there aren’t any. Don’t worry about that too much though, the Launcher is more of a deployment tool than anything you need for development.

Thanks for the heads up, how do I achieve this?

In the scene tab of the properties panel, create a custom property called “main” and set the value to the name of your text block / external script that runs the logic loop. The body of the file is expected to continuously call bge.logic.NextFrame(), i.e

from bge import logic
from time import monotonic

elapsed = 0.0
accumulator = 0.0
last_time = monotonic()
tick_rate = 1 / logic.getLogicTickRate()


def main():
    while True:
        current_time = monotonic()
        delta_time = min(current_time - last_time, MAX_TIMESTEP)
        accumulator += delta_time
        while accumulator > tick_rate:
            accumulator -= tick_rate
            if logic.getExitKey() in logic.keyboard.active_events:
            tick_rate = 1 / logic.getLogicTickRate()

        last_time = current_time


That’s actually real nice, I’ll include that in the next patch.

Updated the code to include some omitted variable assignments.

Unfortunately it seems to generate problems with the object loading, objects loaded through the main loop are reported to not be in an inactive layer and thus cannot be loaded. I’ve had an awful lot of other problems like this, it’s the reason behind the loops running in the interface scene and such like to instance objects in those scenes locally, otherwise something about the execution context messes up the load process. It’s something I’d really like to fix in the game engine proper one day.

You need to be sure to access the scenes by name, rather than by getCurrentScene() as that won’t be defined for the “current” scene you have in mind.

@agoose77: That is fantastic. I had no idea such functionality existed.

@Asper Arctos: Holy cow. I’m still reading through the docs, but the FAQ pretty much covered my primary concern, lol.
So far I like the concept of a Python definition file for each asset. Pretty handy for supporting mods.

Now if we just had a switch for building/running the standalone player headless…

It was committed when Sjoerd De Vries was implementing HIVE support in the BGE. It’s not ideal, but it works :slight_smile:

NB, here’s a more robust mainloop class

[This post has been removed. Apologies for any inconvenience caused.]