Tips for Performance in VR (UPBGE) and maybe non VR too

I’ve been using UPBGE for VR related projects, and found some stuff that makes performance decrease and made a video with all the things I’ve fount to this moment. Maybe it also can work in non VR games and I hope some of you find it useful.

Here’s the video:

7 Likes

Thanks, this is helpful! By the way, how would you export a VR project to a standalone game? Is there a python command to start a VR session without pressing the button in the toolbar?

Hi, at the moment VR games can only be played inside UPBGE, and it needs to use Viewport Renderer, I’m not sure if UPBGE Developers can fix this but for now you cannot export it to a standalone.
There is a way to start VR Session, and I’ve been using it inside the Templates I work on.

bpy.ops.wm.xr_session_toggle()

That’s the one you need to toggle on/off the VR Session. But this doesn’t seems to work once you start the game, it will crash the game. I use it as an auto start once I open the blend file, so I don’t have to start VR session every time.

Yeah, I tried that command in python too and it crashed. I’ll do some more digging and see if that bug can be fixed.

this awsome

There have been some crashes done fixed in maser by Muxed reality,

and Youle says we can attach a app handler via a plug in to start vr before the ge fires up for standalone games.

bpy.app.handlers.game_pre.append( my_function )