scrolling background image

hi,

im doing a mario bros.-like game, i have a wide background image (1200 x 300) but only portion (600 x 300) is being display on the screen. the other portion will just scroll when the main character (e.g. mario) moves left and right.

so what i did is to draw the background image with the coordinate's dynamic, it is increment and decrement, depends on the character where he moves.

but my problem is with this kind of approach as basic game developer. it is very slow when play it on TV via STB. but if i remove the background image, the game is fast. it seems the loading of background image has an effect on the performance.

how could i address this? is there any solution or other approach on how could i scroll the background image with out affecting the performance?

thanks in advance.

[832 byte] By [mgawsona] at [2007-10-2 4:34:41]
# 1

Sounds like you should consider using MPEG Iframes, but that won't work if you want a smooth scrolling. With mpeg I frames you could do something like scrolling half a screen size at the time.

On some stb's you might be able to do what you want with the displayImage(HBackgroundImage image,

HScreenRectangle r) method in HStillImageBackgroundConfiguration to position and clip the IFrame in which case everything should be done in hardware instead. You will loose resolution though, and I don't think there is any specific behavior you can count on.

Best regards

Thorbj鴕n Vynne

thunderbeara at 2007-7-16 0:07:04 > top of Java-index,Java Mobility Forums,Consumer and Commerce...