How would I go about generating random platforms without intersection? I think garbage collection and maybe all that checking may be an issue. I’ve got the generating tiles part down, but not the intersection checking.
How would I go about generating random platforms without intersection? I think garbage collection
Share
See a vaguely similar question I asked with regards to needing objects removed. The GC is the bane of my XNA existence. It’s slow. It can create noticeable lag when it strikes. So my own personal advice is to not attempt good garbage collection but to try to avoid the need to garbage collect.
If your platforms are objects try to keep the references alive. If a platform goes off the screen don’t delete it, just reuse it. Reposition it on the other side when a new platform is needed. At the beginning just create a number of platforms that you can use and reuse.