Alternatives to Pre-Rotating Sprites
BlitzPlus Forums/BlitzPlus Programming/Alternatives to Pre-Rotating Sprites
| ||
Hi! I'm currently attempting to make a very basic top-down (running in 2D only) space shooter. Based on the fact that the rotateimage command is too slow for real-time use, I'm pre-rotating each sprite by 1 degree from 0 to 359 degrees. The problem is, that each of my ships has quite a few animations frames, and there's more than one ship type, so the number of images that get stored in memory are quite significant. Are there any alternatives to what I'm doing? |
| ||
Yes. Cut it down to about 16 or 32 max. No one's going to notice the benefits of 360 different angles unless it's a huge sprite. |
| ||
You could use 2D in 3D libs. (i.e. Sprite Control) There are a few in the code archives that could help you out. EDIT: Sorry, I forgot this was a BlitzPlus thread. Nevermind. |
| ||
depend on how are you're ships are differents maybe you can cut the pictures in parts and rotate each part independently and reassemble the ship on the fly when you need to draw it. so if you have for exemple 2 type of wings for all the ships you can have the 2 different wings models rotated and use them in many ships models just an idea but may be useable. |
| ||
What Gabriel says - I'd even go further and say 8 directions is fine for really small sprites. |
| ||
Try this link for the excellent "Extended Blitz 2D v. 1.60" : http://www.blitzbasic.com/Community/posts.php?topic=23561 |