Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant), 5,825 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 6 1 2 3 4 5 6
Re: Lots of entities = low frame rate [Re: Matt_Aufderheide] #45061
05/10/05 00:46
05/10/05 00:46
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Quote:

Now through lots of optimizations i have managed to get my game running very smoothly. For one thing i made my tree model a group of trees, and placed far fewer.. but this is still annoying.. if an entity isn't visible, and has no action, is passable, and has dynamic off, it shouldn't take any CPU cycles at all should it?


The engine still has to iterate over every entity in order to check whether you have made changes to its state (e.g. changed the passable or polygon flags, set its xyz coordinates etc). Trace also has to check all entities in case you did not specify IGNORE_PASSABLE. I don't know though which function takes up most of the time and causes these slow-downs.

Re: Lots of entities = low frame rate [Re: Marco_Grubert] #45062
05/10/05 03:42
05/10/05 03:42
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Doesn't the entity.static flag stop an entity from having it's movement calculated etc.? If not, would it be possible to have a feature in the future which completely shuts the engine off to an entity except for rendering? Thanks!


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: Lots of entities = low frame rate [Re: William] #45063
05/10/05 14:11
05/10/05 14:11
Joined: Mar 2002
Posts: 1,835
Minneapolis, Minnesota, USA
Nardulus Offline
Serious User
Nardulus  Offline
Serious User

Joined: Mar 2002
Posts: 1,835
Minneapolis, Minnesota, USA
You still have to check the entities flags each frame regardless of what they are. This is a time consuming task if you have 500 entities.

Quote:



If not, would it be possible to have a feature in the future which completely shuts the engine off to an entity except for rendering.







Remove Object would be a good way.

The draw list / tree assigns what needs to be rendered / how and where, the render does not keep that data from frame to frame...

Ken

Re: Lots of entities = low frame rate [Re: Nardulus] #45064
05/14/05 15:31
05/14/05 15:31
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
i think what he means is, there could be a flag that turns the model off for good.. so the engine wouldnt have to check it again, so its not an entity anymore but a like a piece of static geometry

Re: Lots of entities = low frame rate [Re: Matt_Aufderheide] #45065
05/15/05 06:57
05/15/05 06:57
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Yep, that's what I meant. If the engine doesn't keep the values of every entities flags, actions ect. then I'm unsure if what I was thinking would be possible? Sorry if I'm wrong, I don't know much about the inner workings of graphic engines.



Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: Lots of entities = low frame rate [Re: William] #45066
05/16/05 08:16
05/16/05 08:16
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
The influence of entities on the frame rate should be not too hard to understand:

If an entity is not invisible, it can increase the rendering time. If it is not passable, it can increase the collision detection and physics execution time for other moving entites. And if it has an action, it will increase the overall script execution time. You can see all this effects in the [F11] panel. Even an entity that is not rendered because it's hidden behind the camera or a wall, can have a small impact on the rendering time because it's bounding box is clipped against the frustrum.



Re: Lots of entities = low frame rate [Re: jcl] #45067
05/18/05 05:31
05/18/05 05:31
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
JCL, although this sounds quite sensible... It can not excuse the framerate produced by many entities in A6 compared to other engines. Yes, once again someone comparing engines, even at the risk of becoming very unpopular in this place here! Let's have an example. The background-level for my current game project's main menu has got a lot of grass/vegetation models. These have the alpha-test material (->wiki) applied and all of them have actions running.
When opening up the control panel via [F11], it shows me:
Script exec time: ~1ms
Entity render time: ~25ms
Ref (I believe this one shows the calc time for the alpha-test): ~0.3ms

This is the scene, by the way (please ignore the water shader, as switching it off made a difference of about only 2-3 frames):

Here you can see that most of the calculation time is consumed by the entities themselves, not by the alpha-test material or the scripts. Nevertheless I tried to explore this further on. I rewrote my scripts, so that the models don't have any action at all now, the alpha-test material is still in but does nothing but alpha-testing (e.g. no dynamic deformation or sth. similar). So what I finally got is a level with nearly all actions removed, featuring about 500 entities with alpha test and small skins (64x64 and 128x128).
Except for the script exec time that changed to ~0.2ms, nothing happended and all those measures brought a plus of one single frame. There must be something wrong there! I'm using a Geforce 4 Ti 4200, which even does the job for, say, Farcry (if you reduce some details), where many many vegetation models are in the view. And I strongly believe this has to be an A6-issue as even making all the grass models use the same texture (mtlSkin1 instead of entSkin1 in the alpha-test effect) brought nothing but one more single frame.
Correct me if I'm seriously missing something here, but this sounds very strange to me.

Last edited by The Matrix; 05/18/05 05:36.

Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Lots of entities = low frame rate [Re: Thomas_Nitschke] #45068
05/18/05 07:45
05/18/05 07:45
Joined: May 2004
Posts: 164
Germany
D
DARKLORD Offline
Member
DARKLORD  Offline
Member
D

Joined: May 2004
Posts: 164
Germany
I dont think that there is an problem with the entitys. i use more then 5000 at the same time without problems!!!

Re: Lots of entities = low frame rate [Re: DARKLORD] #45069
05/18/05 08:30
05/18/05 08:30
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Quote:

Even an entity that is not rendered because it's hidden behind the camera or a wall, can have a small impact on the rendering time because it's bounding box is clipped against the frustrum.



ahh this makes sense.. i didnt think about it.. thnx. So basically if you have a lot of ents, you should make them invisible if they are not on the screen?

Re: Lots of entities = low frame rate [Re: DARKLORD] #45070
05/18/05 08:46
05/18/05 08:46
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Quote:

I dont think that there is an problem with the entitys. i use more then 5000 at the same time without problems!!!




I was actually talking about models. With sprites, the whole thing should run at "normal" framerates. However, I'd like someone of Conitec to at least have a look at my little testing above because it really makes me curious what's wrong here. Please do me a favour, jcl, and try to state on it


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Page 2 of 6 1 2 3 4 5 6

Moderated by  HeelX, Spirit 

Gamestudio download | 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