Hi everybody,
I'm developing a plataform game such as mario. For this, I've been using pBox2d and all the fisics are almost done, so I began to create all the sprites/animations. But at the moment, my real problem is how to properly treat images to use then as sprites/background.
First I tryed to use background fuction to load my background, but the image that've created for it was bigger than the screen, so I failed. After this I used loadImage before I draw any sprites, but it make my game start "laging" and too slow.
Then I thought if I could "cut" the background image, set as background and when my character moves I cut it again and set as Background? But I didn't find any library to do that :/.
Can someone help or tell how properly do that?
Thank everyboy and sorry about my english.
I'm developing a plataform game such as mario. For this, I've been using pBox2d and all the fisics are almost done, so I began to create all the sprites/animations. But at the moment, my real problem is how to properly treat images to use then as sprites/background.
First I tryed to use background fuction to load my background, but the image that've created for it was bigger than the screen, so I failed. After this I used loadImage before I draw any sprites, but it make my game start "laging" and too slow.
Then I thought if I could "cut" the background image, set as background and when my character moves I cut it again and set as Background? But I didn't find any library to do that :/.
Can someone help or tell how properly do that?
Thank everyboy and sorry about my english.
1