View Single Post
Old 22 May 2011, 22:52   #8
Damiga
Registered User
 
Join Date: Mar 2011
Location: Stockholm / Sweden
Posts: 12
Quote:
Originally Posted by Coagulus View Post
1000 pixels should be more than enough for a smooth horizontal scroll. I used to have a screen twice as wide (as a 320 screen, it was about 720-ish I think) and scroll across 1 pixel at a time blitting 2 tiles per frame (one offscreen to the left and one to the right to give a perfect copy when I looped the screen). This worked fine and quick.
I was only using 1000 pixel wide screen when trying screen offset.
When I used screen copy the screen was just 2 tiles extra in width, 2*16 pixels, the tiles I'm using are 16 pixels wide. Giving a total screen width of 352 pixels.

But when using only screen offset, the map cannot exceed the screen width of 1000 pixels if I want to avoid using the slow(?) screen copy.

The screen copy method works if I lower the height of the portion of the screen that I scroll. For example, if i would only like the ground in the game to scroll, say 60 pixels on the lower part of the screen, then I manage to get smooth scrolling with screen copy.
But a platform game with only flat ground is not so exciting.
Damiga is offline  
 
Page generated in 0.04280 seconds with 11 queries