Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Maximum number of dynamic objects (marble craze)

Author
Message
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 24th May 2021 17:11
I am getting a maximum of 1050 dynamic objects before crash. Below is a marble-run type simulation, you can change the number or marbles with the numPerRow and numRows variables. Right now this is for show, but if you put 1 per row and 1051 rows it will crash. These results are consistent with what I have in may main project where I'm trying to make a whole pile of small spheres like a kids ball room.

If anyone else has different results please let me know.

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 24th May 2021 18:36 Edited at: 24th May 2021 18:40
same here for all body types (not just dynamic), classic & studio.

no idea what i'm looking at HERE but looks like some kind of limit for aabb checks? (i just searched "max"):
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th May 2021 20:33
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 25th May 2021 00:21
Interesting the InstanceObject() squeezes out a bit more but not much -> 1100 dynamic balls will roll. Also interesting that CloneObject() appears to have the same results as InstanceObject().

Anyone know difference between InstanceObject() and CloneObject() ?

In the meantime I am going to design to limit the number of objects onscreen. Now adding some particle smoke coming out of the ground to have the balls "disappear" into when they overflow, too bad as letting the area fill up with balls just for fun would have been cool.


Thanks Blink and VN!


Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 25th May 2021 00:53 Edited at: 25th May 2021 00:56
perhaps of note:

i was able to create more than ~1,100 physics objects (i inserted a Sync() after each object creation) without issue. once i hit the do/loop (or left the creation loop?) is when it silently crashed.

point: not sure what the issue is but not 100% convinced its strictly to do with bullet objects.

and, with the task manager open, i was hitting ~250MB.

i didnt have much time to do more testing but perhaps the above might help.
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]

Login to post a reply

Server time is: 2024-03-28 22:09:36
Your offset time is: 2024-03-28 22:09:36