The Daily Click ::. Forums ::. Klik Coding Help ::. number of objects
 

Post Reply  Post Oekaki 
 

Posted By Message

Rick Shaw



Registered
  30/04/2008
Points
  158
29th July, 2008 at 21:31:28 -

I was just wondering if anyone has any practical experience with how many objects can / should be on-screen or loaded at any time. I'm working on a fairly complex project with at least six layers right now, running ~110 objects and I haven't started the serious enemies & AI yet.

I've noticed that in some irresponsibly-coded scenarios, the debug counter tends to max out around 500 objects & then strange effects start to appear.

I'm also running a ridiculously fast dual-core, so I've never seen slow-down. Is speed testing something I'll have to do on my friends' computers after building the whole thing?

So what are your records for objects on screen / memory usage / number of rules, and what strange behavior starts to develop in large projects?

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
29th July, 2008 at 21:35:08 -

its probably maxing out at 500 objects because you have "max objects" set to 500 on your frame properties. maximum available is 20,000 though its probably not a good idea.

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
29th July, 2008 at 21:37:53 -

I thought the MMF2 limit was 10k, but anything past 1000 is going to be slow (computer depending).

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
29th July, 2008 at 21:40:08 -

nope its 20k. anything higher than 20k it sets the object limit to 20k. but yeah anything over 1000 is pretty slow, depending on the # of events/loops/collisions/etc related to the actives.

 
n/a

Rick Shaw



Registered
  30/04/2008
Points
  158
29th July, 2008 at 21:44:29 -

Well, for what I'm working on, I won't need to push the absolute limit of 20k or even 10k.
I estimate reaching at least 300 objects with the whole engine in place, and I'm wondering if that's already dangerous territory. From the sounds of it, I probably have plenty of breathing room.

 
n/a

Marko

I like you You like you

Registered
  08/05/2008
Points
  2804

Has Donated, Thank You!Game of the Week WinnerVIP Member360 OwnerDos Rules!Happy FellahCrazy EvilI am an April FoolGingerbread House
29th July, 2008 at 22:52:57 -

Should be fine - i've had near 600 before now with no worries

 
Image

Subliminal Dreams. . ., daily gaming news and the home of Mooneyman Studios!
www.mooneyman-studios.webs.com

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
30th July, 2008 at 14:25:21 -

You can always generate systems that lower objects like particles when fps is too low. Or you can make fastloop map system that loads only viewable map (or little bit bigger), so you can do 9000x9000 maps with only about 100 objects at a time.

 
I have proven new mathematic formula to be true...

2D > 3D

Image


Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
30th July, 2008 at 14:36:42 -

Also the more code you have attached to these countless objects the slower it will get. On my project before I optimised the face offa it even just 300 objects ran slow, because they had physics, alpha, AI or whatever attached to them too.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Rick Shaw



Registered
  30/04/2008
Points
  158
30th July, 2008 at 15:37:39 -


Originally Posted by Dr. James
Also the more code you have attached to these countless objects the slower it will get. On my project before I optimised the face offa it even just 300 objects ran slow, because they had physics, alpha, AI or whatever attached to them too.



Yes, I'm also trying to keep the complexity & number of the rules down. Do you have any estimates about how much code you had before & after optimization?

When I code, I try to include extra constraints so that an action isn't triggering every frame if it doesn't have to; I also only add fastloops if completely necessary. I'm guessing this helps. Any tips on how to streamline the code?

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
30th July, 2008 at 21:27:06 -

That's what I'm doing, but with some particles and other disposable objects in a qualifier group that removes and deactivates certain effects if the FPS drops too low. Also destroying objects when out of the windows view, "freezing" enemy physics if they're not in view. That kind of stuff. I've also set my game to adjust the rotation quality depending on the frame rate, it only goes to low quality mode if the game is performing less than 5 frames off the FPS rate.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Mr_Tom



Registered
  01/12/2007
Points
  389
1st August, 2008 at 10:51:14 -

On the game I'm working on right now (Final Styricum Shower), it currently has around 600 on screen and with a fair bit of programming linked to objects with AI programming and all that. Doesn't seem to be a problem yet.

 
n/a

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
1st August, 2008 at 14:44:05 -

I'd say under 500 and you'll usually be fine, as a rule of thumb. I had a bug where my game made 20k objects though and with responsible programming it only went to half fps (I was freaked out by that I must admit).

 
Image
http://bfollington.tumblr.com

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
1st August, 2008 at 19:13:14 -

If you're using the Hardware Accelerated build of MMF2, which a lot of people idiotically think isn't much faster then the normal MMF2, and your videocard doesn't suck, then you can pull the full 10k, moving, resizing, rotating, animating, etc, and still pull a solid 60fps.

 
http://www.facebook.com/truediamondgame

Rick Shaw



Registered
  30/04/2008
Points
  158
1st August, 2008 at 23:13:11 -


Originally Posted by BrandonC
If you're using the Hardware Accelerated build of MMF2, which a lot of people idiotically think isn't much faster then the normal MMF2, and your videocard doesn't suck, then you can pull the full 10k, moving, resizing, rotating, animating, etc, and still pull a solid 60fps.



that is an excellent point, and something i neglected entirely. thanks for mentioning it. I hadn't given any consideration to the hardware acceleration before this.

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
2nd August, 2008 at 00:16:15 -

Don't use that as it stands. It's still quite buggy and doesn't support quick backdrop gradients with ink effects, might even be all quick backdrop objects. And don't make any object larger than 1024*1024 (I think, might be bigger) or else it won't display.
But if you're adamant then be sure to disable DirectX rendering of the frame editor. It's the cause of many crashes for me.

And Brandon, WTF, chillout! No need to call people idiots.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com
   

Post Reply



 



Advertisement

Worth A Click