Jump to content

Huge performance hit after upgrading from 3.1.0-alpha3.5 to 3.1.0-alpha3.7


thrice
 Share

Recommended Posts

6 hours ago, RaananW said:

There were no major cannon.js changes in 3.1... Nothing really  changed other than the ticker. and the parenting system (which is a general issue, not cannon's).

Disposing - dispose the impostor and then the mesh itself. if it doesn't work, please let me know so I can investigate it.

Te reason for this is - A mesh and an impostor are loosely coupled. you CAN set mesh.physicsImpostor, but it is certainly not a must. It was mainly done since not only meshes can have a physics impostor. you, as a developer, need to take care of your impostors and dispose them manually. It is like that since 2.3 (If I am not mistaken), has nothing to do with 3.1 changes.

 Yo @RaananW How can I tell if I still have 200 resisted bodies... What tool or view did you look at to get the registered bodies count ?

 

Link to comment
Share on other sites

Yo big thanks to @RaananW and @Deltakosh ... My upcoming 3.2 alpha build of the toolkit fixes all the cannon physics issues and metadata cloning issues.

now my Space Game Shooter Demo update is working great with latest 3.2.0 Alpha build of the babylon engine.

The toolkit scene component lifecycle properly destroys scene components and any physics imposters then safely disposes the owner object (Mesh, camera or light).

I purposely create and destroy every Player Ship, Enemy Ship, Asteroids and the two different laserbolts to stress test the scene component life cycle. It is working great for me with excellent Frame rate on my MacPro using a GTX-770 class video card.

All traces of all mesh hierarchy are instantiated via PREFABS and DESTROYED leaving CLEAN scene.meshes list and from what I can tell no leaks or major performance issues. Also using my 'Mesh Instances' system from the toolkit... Even with ALL the asteroids, enemy ships, players ships, multiple laserbolt shots from both the player and enemy ships and the particle systems on both player and enemy ships that can be on the screen at one time never exceeds more that 20 draw calls even all the way thru the third level with many more ships, asteroids and laser bolt shots on the screen.

Also... Supports a new Shinny 'Collision Group Filter' setup that can be used in the editor to provide fine tuned physics collision (which HELP GREATLY with the collision MISSES from before):

Example Physics State Component attached to the Player Ship Game Object ... Note: Player Ship assigned to FILTER GROUP2 and the Collision Mask only allows collision with GROUP3 (Enemy Ship),  GROUP4 (Asteroids) and GROUP6 (Enemy Laserbolts)

5a545080edf34_ScreenShot2018-01-08at7_14_18PM.png.7a46976218637533b5a96b38aa69181e.png

And Example Enemy Ship Physics State Setup: Its assigned to FILTER GROUP3 and only allows collision with GROUP2 (Player Ship) and GROUP5 (Player Laserbolt)

5a5450ae967c1_ScreenShot2018-01-08at7_14_43PM.png.5cbbe2577f72c3a669a26b9eb915a728.png

WORKS PREFECT FROM WHAT I CAN TELL :) 

Yo @RaananW  and @Deltakosh (And really ANYONE who can help)... Can you please try the current Space Shooter Demo :)

Look for those MANY imposter issues you saw before, check the smoothness of the physics movement (everything moves with physics)

And use the 'Profiler' to check for ANY performance issues .. especially with the many GAME OVER restarts and YOU WIN restarts which loads a new level each time BUT in the same same DOM... that index host page NEVER actually reloads... Just reload the same level (could be any level though).

NOTE: STILL WORKING ON BETTER PARTICLE SYSTEM EXPLOSION EFFECTS 

NOTE: MOVEMENT IS WAY BETTER USING A XBOX Controller (or basically a GamePad)

 Anyways... Please Check Out The Demo :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...