Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Xhalth

Pages: [1]
1
Graphics / Have Sprite IntRects point to a parent
« on: March 04, 2017, 09:24:37 am »
Hello, new user here.

I am working on a tilemap with animated tiles, and thought that it might be efficient to have animated tile sprites keep a pointer to a parent TextureRect (or IntRect). This way the child IntRects of tiles with the same ID as the parent will update more efficiently, and iterating through each animating tile wouldn't be necessary. Having a parent IntRect would mean that the sprites would still be position-independent, contrary to keeping a pointer to an entire parent Sprite. I'm currently thinking about animated tiles such as water that usually need to be playing at the same rate. Any ideas on how to go about doing something like this? Is this just a silly idea?


Pages: [1]
anything