-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Godot 4 port fixes #17
base: godot-4-port
Are you sure you want to change the base?
Godot 4 port fixes #17
Conversation
was previous set to "Local" which doesn't support recentering (keeps player head fixed in virtual world)
* pre-instance the CutPieces objects * fixed bugs in the ScenePool leaking cubes on release()
i have the renderer drop down to "Mobile". you only acquire this additional setting when you switch to "Compatibility" rendere, but then this setting gets removed when you switch back to "Mobile", so i think it should be removed.
i'm not sure if the old API needed a call to trigger_haptic_pulse() with intesity=0.0 in order to terminate the rumble, but the current API has a duration argument. repeatedly calling trigger_haptic_pulse() seems to have no gain besides a ~0.25ms cost per call.
if the cut plane was vertical, then the cut pieces were flying up/down instead of left/right
@@ -34,5 +34,4 @@ func acquire() -> BeepCube: | |||
return cube | |||
|
|||
func _on_scene_released(cube: BeepCube) -> void: | |||
cube.scene_released.disconnect(_on_scene_released) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leandrodreamer haha i see you've been making attempts at improving cube cutting performance recently too, and we have some conflicts.
I think the major issue with cubes leaking from the resource pool still exists on main (should probably retest though). I believe the big issue was that the scene_released signal was being disconnected here for no good reason, resulting in object not getting re-added to _free_list
list after released(). This basically results in a pool object only ever getting used twice (i think) before the pool will become exhausted and start dynamically instancing entire new cube each time acquire() is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm i see, i haven't noticed any performance issue on new cubes, even on web, but there may still be some issue if they stay in memory forever
Major fix was that the cube resource pool was leaking cubes after release(). This was causing new cubes to instantiated when the pool became exhausted (big performance hit). This bug was introduced at some point in a refactor and/or godot 4 porting effort