Is it possible to change the startup behaviour for the bge?

hi! I’d like to know how to modify the behaviour of bpy.ops.view3d.game_start(), basically I want to launch a bpy script before the bge is launched so I can autosave before each load, I also plan to add onto this later.

Because bpy.ops is part of blender’s C code, you can’t change what it does.

Alternatives:

  • Use another button. Create your own custom operator, bind it to the “P” key and create a new button in the UI for it
  • Create a small scene with a “Start game from file” actuator. Always play your game from this file. This means that if you don’t save it, you won’t see the changes. You’ll quickly learn edit -> save -> play.
  • Launch your game from a script that calls path/to/blenderplayer path/to/blend. Similarly, this means that if you don’t save your file, you won’t see the changes.

yeah I pretty much figured that it’d be nothing short of compiling my own version of blender… figured I’d ask anyway.