Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Allocating particles at the start of the game to prevent lags on creation
#1
In my game player is creating softbodies in runtime. Now, when it happens game lags a little. I assume its happens because at the moment of softbody creation obi solver does not have needed amount of particles and it creates new ones. Can I somehow tell obi solver to create some amount of particles at the start of the game? Im already using object pool for softbodies but even though Im instantiating some amount of softbodies at the start and releasing them but solver does not create particles for them probably because Im creating and releasing softbodies too fast. My current solution is to instantiate softbodies at the start and after 1-2 frames release those softbodies. This way solver is creating needed particles and game does not lag on creation of new softbodies
Reply


Messages In This Thread
Allocating particles at the start of the game to prevent lags on creation - by bozdo - 28-05-2024, 02:00 PM