Yeah; I was using gameloop.py as an example, but I couldn’t figure how to run it. I never would’ve guessed to just call(?) the class itself: I was doing “<module name>.<test class name>.main”, which did nothing.
I knew it was gonna be something silly like that. Thanks~!
It actually imports the module and obtains the class in memory, then runs .main(),
It’s a barebones implementation at the moment, so it’s not quite perfect and some things might not work as expected.
Have I simply cut too much in my first phase of testing? I’ve also tried directly copying GameLoop from gameloop.py, cutting only contextmanager and ReplicableRegisteredSignal (the names weren’t registered, because I removed the SignalListener extension), and the error was still there.
What am I doing incorrectly? Where is PyObjectPlus(), in all of this? I’ll attach a blend for you to check out yourself.
I’m trying to be as clear as I can Alfonso, please read my previous posts!
The gameloop class runs the game engine, and so it doesn’t rely on Logic Bricks (well it does, but only because the engine has certain places where this is the case).
In the custom build of Blender, when using the Game Engine render engine mode, there is an input field called “Custom gameloop”. Writing this entry with “main.GameLoop” will run the gameloop with the engine.
This has been a rough learning process, but I’ve finally gotten the barebones functionality up and running. I’ve got a simple spinning object that prints a message to the console that couldn’t do either if the GameLoop script didn’t run. I’ve attached my demo, in case I’ve set myself up for failure in a way I don’t see.
Sorry this took so long to grasp! With the basics down, experiments should be a lot smoother from here on out~
Here’s where I am right now, with my testing. So far, I’m doing very well! My kink right now is that I can’t figure out how to pause background-object animations outside of the game loop. Is it possible to pause an object’s animation(s) without deactivating actuators?
In a pinch, I could simply have objects not set to be affected by the rollback mechanics can simply have an always-actuator that will pause animation on the first frame of rollbacks, and then resumes on the next frame of normal action, but there’s a lot of nasty overhead with that method.