In my game, bullets have in different sizes. I want to use a sprite for the bullet but don't want to make a sprite for each possible size because it will vary (or be random).
I'm hoping there is a way to scale/enlarge/shrink a sprite so I can just make one sprite and use it lots of places.



That would be the sspr function, you can use it to select a portion of your sprite map and then stretch it to any size you'd like.
sspr(sx, sy, sw, sh, dx, dy, [dw, dh, [flip_x, [flip_y]]])
Stretch rectangle from sprite sheet (sx, sy, sw, sh) // given in pixels |



Gotcha, thanks. I found that manual description kind of confusing, just me I guess.



Nah, you are not the only one. I find the manual confusing at times.
...and now to piggy back on this topic:
Is there a way to rotate a sprite 90 degrees?



Shame, hopefully it will show up in the future.
It could help making simple animation (ball spinning) using only a single sprite.



I've been using and abusing the flip flags all over in my games. Combining that with pal() and I've managed to reduce my sprite sheet down to only a handful rather than dozens. That pal() method is a gem...saves a lot of sprite drawing work too.
For a spinning ball, you could do it with 2 sprites, I think. One sprite with the ball up, then one with the ball at 25* tilt...then just flip as you go around in your loop. The more sprites you have the more fluid but even then you could do it with only a few sprites.


morningtest: this is (was) a common practice when you have a palette you can change. It was common use on the NES for example to have a tile that will look differently depending on the palette applied, or do some basic animation for sprites.
One great "abuse" of palette was the work from Mark Ferrari on most of the Lucas Art Scumm game: http://www.effectgames.com/demos/canvascycle/
[Please log in to post a comment]