|
|
updating positions of many entites slows down fps
#408617
10/04/12 17:05
10/04/12 17:05
|
Joined: Aug 2011
Posts: 133 Germany, Supergeheimes Hinter-...
gameplan
OP
Member
|
OP
Member
Joined: Aug 2011
Posts: 133
Germany, Supergeheimes Hinter-...
|
Hi,
i have some trouble with a very fps dropping code. Usually, there are round about 100 entites at the same time in front of the players view. There are severel "masterentities" and they move around. All other entites have to stay in the same relative position and angle to theire masterentites. I get this working by saving all relative vectors for positioning the entites in one array. At each frame, the relative position of every entity gets updateted with the position vectors from the array, depending on the new position and angle of the masterentites.
So this slows down fps. I have noticed that there isthe posibility to merge entity meshes (like it is shown in another diskussion here), but is there any other possibility to get all entites moved without doing all this vector and array stuff on each frame for each entity?
Thanks
Version: A8 free OS: Windows 10
|
|
|
Re: updating positions of many entites slows down fps
[Re: gameplan]
#408624
10/04/12 20:13
10/04/12 20:13
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
You can put together several entities into a wmb entity. This will do the same as manually updaing the entities. However, I doubt that this is really the reason for the slowdown. Updating 100 entities and some vector calculations are not much of a task. Have you examined the debug panel?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|
|
|