Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 622 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 5 of 6 1 2 3 4 5 6
Re: Lots of entities = low frame rate [Re: Olzii] #45091
08/26/05 04:40
08/26/05 04:40
Joined: Oct 2004
Posts: 1,068
J
Jamie_Lynn Offline
Senior Developer
Jamie_Lynn  Offline
Senior Developer
J

Joined: Oct 2004
Posts: 1,068
Thanks Olzii,
I was using a script too ... but I have been creating and removing entities. But some of these entities are the same and your post made me realize I could just move those entities - its probably more efficient. Worth testing anyway.

Re: Lots of entities = low frame rate [Re: Jamie_Lynn] #45092
08/26/05 05:44
08/26/05 05:44
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline
Member
Olzii  Offline
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia

Ent_create is slow function. Creating many entities using this function is very slow.

I have prepared 100 trees at startup and after just changing it's position. It is faster.


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: Lots of entities = low frame rate [Re: Olzii] #45093
08/26/05 10:40
08/26/05 10:40
Joined: Oct 2004
Posts: 1,068
J
Jamie_Lynn Offline
Senior Developer
Jamie_Lynn  Offline
Senior Developer
J

Joined: Oct 2004
Posts: 1,068
Well my scenario is a little different.
I am only dealing with 20-40 entities at a time (when creating or removing).

With the code I am running currently... I have approx 650 entities in the level at a time, only about 70 are visible (using camera clipping range and fog etc) and I have about 50 functions running.

I have what I consider a mid-range card - but on this site it is probably considered a low-end card... and I am getting 70 fps. So i am pretty happy with things. I would like to see if I can optimise it up to 80 fps ... but it is getting increasingly hard to gain any ground as the system is performing so well.

Edit: I couldn't resist adding this ... when performance testing it is important to understand the "knee of the curve". Otherwise you can not understand why you have gotton "dramatic improvements" when changing a variable.



In the above diagram, it is important to note that the unit of "work" is the same for each delta drawn on the curve.

Last edited by Jamie_Lynn; 08/27/05 00:24.
Re: Lots of entities = low frame rate [Re: Jamie_Lynn] #45094
08/27/05 00:28
08/27/05 00:28
Joined: Oct 2004
Posts: 1,068
J
Jamie_Lynn Offline
Senior Developer
Jamie_Lynn  Offline
Senior Developer
J

Joined: Oct 2004
Posts: 1,068
Uli - I am bumping this just so you take a look at the diagram. I think it is important in understanding why you can get dramatic results when changing a single variable when performance testing.

Re: Lots of entities = low frame rate [Re: Jamie_Lynn] #45095
08/27/05 01:20
08/27/05 01:20
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline
Member
Olzii  Offline
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
In my scene, I have over 400 wmb buildings with their LOD and about 3000 trees, plus 3000 small objects. Without these trees and small objects my fps is good.

Now i am deleting all my trees, small objects and doing above my method.


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: Lots of entities = low frame rate [Re: Olzii] #45096
08/27/05 10:26
08/27/05 10:26
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Even if you have 1000 entities, you could still get 70 fps, but, when all are visible at once (as in my experiment), then the frame rate drops like crazy! When they aren't visible, however, that's what's giving you the high frame rate. Try getting the whole level in the view and you'll see this very thing happen.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Lots of entities = low frame rate [Re: ulillillia] #45097
08/27/05 14:15
08/27/05 14:15
Joined: Jun 2005
Posts: 656
G
Grafton Offline
User
Grafton  Offline
User
G

Joined: Jun 2005
Posts: 656
Olzii your method sounds very interesting. The advantage of having less entities for the engine to cycle through sounds good. But with this method, isnt almost the same amount of engine time taken up cycling through all the possible locations anyway, checking if they are visible to the camera? Could you further explain your method or post some code?

What I am doing is combining lots of tree entities (as Ulillillia already advised) into one model. However this limits your ability to change LOD and creates collision issues, so I am looking for alternatives.

Related to this subject, I just finished running a experiment using 800 trees to find the fastest "double sided" polygon rendering method. The first was traditional trees using double polygons with normals facing opposite directions, and the second used trees with single polygons using the wiki material (cullmode = none).

To my suprise, the frame rate was significantly higher with the traditional trees than the materialed trees, even though they had over 30% more polygons per tree!


Not two, not one.
Re: Lots of entities = low frame rate [Re: Grafton] #45098
08/29/05 01:35
08/29/05 01:35
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline
Member
Olzii  Offline
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
Hi Josiah,

Now i am replacing all my small objects like trees, lights ... and doing scripts for them. I have a big real city. My city has many small objects. Trees 3000, lights 2500, advertisements 1000, so on. I placed all these object on my ground, and FPS was really bad 0-1FPS. Now it is increasing, after changing my trees it goes 10FPS. I decided to change it all.

My algorithm is very simple, if you want i can share it to contributions.


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: Lots of entities = low frame rate [Re: Olzii] #45099
08/29/05 03:16
08/29/05 03:16
Joined: Jun 2005
Posts: 656
G
Grafton Offline
User
Grafton  Offline
User
G

Joined: Jun 2005
Posts: 656
That would be great if you decide to share, please do. I think everyone could
benefit from it and appreciate it also. Otherwise perhaps you could elaborate on
it a little more?


Not two, not one.
Re: Lots of entities = low frame rate [Re: Grafton] #45100
08/29/05 04:47
08/29/05 04:47
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline
Member
Olzii  Offline
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Page 5 of 6 1 2 3 4 5 6

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1