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 4 of 6 1 2 3 4 5 6
Re: Lots of entities = low frame rate [Re: ulillillia] #45081
08/23/05 14:46
08/23/05 14:46
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Ulillila

YOU ARE KING!!!!!!!!!!!!!!!!!!!! I would give you 10 stars if I could..

Two questions:

1. Can my.dynamic = off be applied to sprites? It just says non-moving "entities" in the manual! This begs the question then-- if yes, does it also apply to non-rotated sprites, which rotate automatically.


2. My.dynamic can be used when the object is static. Is this only for transformations like rotation and translation and scale? Or does it also apply to things moving by mesh deformation, specifically a terrain-based water mesh.

3. What about non-moving entities (eg scriptless, not being moved by a script) which are just cycling through their animation?

Your findings are really useful!

Last edited by Bonanza_Jellybean; 08/23/05 15:03.
Re: Lots of entities = low frame rate [Re: JetpackMonkey] #45082
08/23/05 15:08
08/23/05 15:08
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
Quote:

Ulillila

YOU ARE KING!!!!!!!!!!!!!!!!!!!! I would give you 10 stars if I could..




It was just an experiment that I wanted to rerun due to more knowledge I had and that my last run didn't really have much to go on.

Quote:

Two questions:

1. Can my.dynamic = off be applied to sprites? It just says non-moving "entities" in the manual! This begs the question then-- if yes, does it also apply to non-rotated sprites, which rotate automatically.




It likely can, but since sprites are two polygons, it'd have practically no noticeable effect thus not all that worth it.


Quote:

2. My.dynamic can be used when the object is static. Is this only for transformations like rotation and translation and scale? Or does it also apply to things moving by mesh deformation, specifically a terrain-based water mesh.

Your findings are really useful!




That I'm not too sure on. Mesh deformation I've never done (and don't know how either). Dynamic means "changing". If you make it not dynamic (or not changing), you couldn't change anything. If you have a one-time case of, for example, making something transparent, add a wait(1) instruction before turning the my.dynamic flag off. I don't know, however, if the my.dynamic can be turned back on again (such as through a function) to make a small change. For things like water, because it changes constantly, you'll need the my.dynamic set to on or the animation simply won't work.


"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] #45083
08/23/05 15:20
08/23/05 15:20
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Hey

Thnx U--

Hmm I just did a test on a water mesh HMP, and you know what? Even with my.dynamic=off, it still animates/deforms properly. Whether or not this improved my speed, I can't say.

This is excellent. BTW i've got a jillion sprites in my game, fortunately I scripted them all way in advance. I noticed a significant improvement when I inserted that my.dynamic=off in there.

Last edited by Bonanza_Jellybean; 08/23/05 15:33.
Re: Lots of entities = low frame rate [Re: JetpackMonkey] #45084
08/23/05 15:49
08/23/05 15:49
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
A "jillion" sprites? That's not good, however many a "jillion" is. I strongly suggest that you rethink your level and replace sprites with models if you can, unless, of course, you've got a good reason for having that many.... To test if the speed was changed, all you have to do is delete the "my.dymanic = off" line, test run the engine, and note the fps. Then add the line back in and test again. Normally, there would be a detectable change if this was the case.


"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] #45085
08/23/05 22:46
08/23/05 22:46
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Yeah, I'd do that, but I'm too lazy. I'll just take the benefit of the doubt.

And yeah, I'm all about these sprites gotta keep em.

But really-- a mess of MDL's is faster than a lot of sprites?

Re: Lots of entities = low frame rate [Re: JetpackMonkey] #45086
08/24/05 10:34
08/24/05 10:34
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
A mess of single MDLs duplicated in WED (having a lot of objects) has about the same impact as a mess of sprites in the same way. The exception is when the mess of MDLs is in one single MDL file where you can get 15 times the speed or more.


"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] #45087
08/24/05 16:53
08/24/05 16:53
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Right.. it's still so counter-intuitive, that a bunch of MDL's could match or rival the same number of sprites-- but your proof is there.

So when you say it's even faster to have several models existing in one massive MDL file-- you mean just that, right? E.G. you don't mean a map entity with several MDL's inside, but rather one massive MDL with a lot of models within?

Here's a good question: Imagine you've laid out several MDL files on a terrain in WED. You now want to somehow retain the position and rotation of these items in WED, but bring the whole group into MED so as to create this one whopper MDL (to increase the FPS). Would that be possible? Or must one go and manually reposition everything in MED and try their best to duplicate the layout?

Re: Lots of entities = low frame rate [Re: JetpackMonkey] #45088
08/25/05 07:47
08/25/05 07:47
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
If the models have actions on them, use separate models. If they're static (not moving), then combine them into one.

What I mean by several models existing in one massive MDL file is to have all the points, vertices, etc. in a single MDL file and that it is all visible in MED. This is best when you have objects of the same thing or using the same texture. The only disadvantage to this is that the textures cannot go above 1024 pixels on a side and that the models cannot go above 32,768 (or maybe 65,535) faces/vertices. Other than that, the advantages are tremendous. And using a map entity with several MDL's inside doesn't work either - my platforms in my game, for example, are of a map entity and, with only 80-some objects (which can be reduced to 50-something), I notice a lag in the frame rate when all visible. If I remove it, there's an increase on the frame rate, about 6 fps, so even if you had a map entity with 1024 objects in it, even if very simple, then it could have a huge impact on the frame rate. If you've seen the screenshots from my experiment, when I mass-combined 2048 objects into one single MDL file, the frame rate is higher, a lot higher. You can download the models I used in the experiment and see for yourself. It's double-zipped as zipping up the first ZIP file compressed it a strong 50%. It's the one ending in "all.mdl" with some stuff before that. See how that one is designed? That's combining all into one.


"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] #45089
08/25/05 12:21
08/25/05 12:21
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Excellent, thanks.

I was happily surprised to see that multiple objects, exported from Max using the MDL exporter, automatically compiles the textures together into one big skin within MED.

I realized that it would be easier to build one very large MDL with everything laid out and positioned correctly by

1. exporting my terrain entity from MED as a 3DS mesh
2. laying out the models using the terrain as a guide, kind of winging it
3. delete the mesh terrain
4. export the positioned meshes all together as one MDL file.

However, I am concerned about the skin size issue. But if it's worth a significant improvement in FPS, then maybe a compromise is worthwhile.

By the way-- am I interpreting your experiment's results correctly? Q: Would a terrain run faster than the same terrain but converted to an MDL mesh?

Re: Lots of entities = low frame rate [Re: ulillillia] #45090
08/26/05 03:06
08/26/05 03:06
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline
Member
Olzii  Offline
Member

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

I wrote good script for lots of entities. It will reduce entity count and will increase frame rate.

Before in my level i have placed a lot of similar entities like trees /3600trees/.

Now i am creating only 100 trees. These trees are DYNAMIC trees. In my script maximum 100 trees will be visible. if one tree is going invisible to camera, i will place it to another tree location.

Perhaps, my idea will help a lot of people from placing so many trees.


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Page 4 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