Plotting large Images as backgrounds

BlitzMax Forums/BlitzMax Beginners Area/Plotting large Images as backgrounds

WildW(Posted 2006) [#1]
Are there limits for how large an image you can realistically use on Blitzmax? I'm converting an existing game I wrote in BlitzPlus over to Max (primarily to create a Mac version) and my only problem so far is in my background drawing function...

I have a large background image (2560x1920), which depending on display resolution may be scaled up even larger. My game then just plots the whole image at some coordinates (which frequently lie offscreen) so that the player can scroll around it. Blitzplus copes with this without any problems and with no real hit to framerate.

Needless to say, Blitzmax is not happy about being asked to do this. The image appears "sometimes" and is horribly corrupted. I haven't been able to find any functions in Max to plot just a section of the image. Defining the viewport hasn't helped either.

There are various other ways I could go about this - splitting the image up into smaller ones until I find a size where this approach works. Since it's only an outer-space background I could take a different approach altogether. I'm just interested to see if it can be done with the single large image (i.e. I'm lazy)


Jesse(Posted 2006) [#2]
maybe the problem is in your source code. Can you post it?


assari(Posted 2006) [#3]
Try this http://www.blitzmax.com/codearcs/codearcs.php?code=1440


Yan(Posted 2006) [#4]
A 2560x1920 image will be scaled up to 4096x2048. There are still plenty of cards about that can't handle textures of that size.


Defoc8(Posted 2006) [#5]
Thats assuming bmax doesnt break the image up...


(tu) ENAY(Posted 2006) [#6]
Just segment your image into tile chunks of 256x256 sized images, piece them together by rendering them seperately and then hey presto, bobs your uncle!


degac(Posted 2006) [#7]
Quick question: when I use LoadAnimImage() Blitzmax creates single little images, right? So I can use *safely* even an image of 320x480pixel or I have the texture limit problem for the 'container' image?
And the orginal image (or pixmap) can be *destroyed* safely to save memory?