Timeline for How to combat exponential growth in sprite messaging?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 27, 2016 at 12:56 | comment | added | Celarix | The virtual method calls are not (typically) the problem, but my profiler indicated that my intersection-depth method calls were through the roof - up to 2 million calls per frame with ~120 sprites onscreen. If every sprite overlapped, a similar number of virtual calls would take place. | |
May 27, 2016 at 4:25 | comment | added | craftworkgames | How did you determine the virtual method calls are the problem? Have you profiled the code? | |
May 27, 2016 at 1:27 | history | edited | Celarix | CC BY-SA 3.0 |
Added code
|
May 26, 2016 at 11:46 | comment | added | Celarix | Ideally, each collision pair between two sprites would only be handled once, but I don't know how to do that without making a list of every sprite checked this frame, and lists are expensive when you make them once per sprite per frame. | |
May 26, 2016 at 11:45 | answer | added | Babis | timeline score: 1 | |
May 26, 2016 at 11:44 | comment | added | Philipp | Why do you need sprites to send messages to the other sprites it collided with when those other sprites will also detect the collision on their own? | |
May 26, 2016 at 11:29 | history | asked | Celarix | CC BY-SA 3.0 |