I'm editing a script (releasing soon!) and I want to tile some pictures together. The same picture could be repeated like, from 64 times to more than 200. It should be a 32x32 picture, but I wonder if would be bad to create one rect for every picture, because maybe it could cause performance problems or something like that.
By creating a bitmap/rect I mean (and would probably do) something like this:
#the x and y would be passed on a for loop
bitmap = RPG::Cache.picture("picture")
rect = Rect.new(x, y, bitmap.width, bitmap.height
self.contents.blt(0, 0, bitmap, rect)
So, should I do it like this? Or is there any way to clone a picture or something like that? I haven't got time to look at the stock scripts to see if they have something like this but I plan on doing that tomorrow.
I'm editing a script (releasing soon!) and I want to tile some pictures together. The same picture could be repeated like, from 64 times to more than 200. It should be a 32x32 picture, but I wonder if would be bad to create one rect for every picture, because maybe it could cause performance problems or something like that.
By creating a bitmap/rect I mean (and would probably do) something like this:
So, should I do it like this? Or is there any way to clone a picture or something like that? I haven't got time to look at the stock scripts to see if they have something like this but I plan on doing that tomorrow.
Thanks in advance for your attention!
Edited by HeathLockeShare this post
Link to post
Share on other sites