Vertical bitmap scroller - realtime

BlitzPlus Forums/BlitzPlus Programming/Vertical bitmap scroller - realtime

Hansie(Posted 2003) [#1]
@all,

On the amiga I usually made a vertical scroller by showing a bitmap image "outside" the window barrier at the bottom, and then scrolled the entire screen upwards. This was easy because you could setup a bitmap larger than what was visible.

But how bout' BlitzPlus? how do you best write a vertical smoothe scroller (vertical) ... can you print bitmap images "out-of-sight" without messing up memory and cause crashes?


Kevin_(Posted 2003) [#2]
Create a window and then a canvas that is larger than the window. Then just move the Canvas by using SetGagdetShape to move it around. Same technique as the Amiga really.

Hope that helps

Regards


Hansie(Posted 2003) [#3]
@prof

it helps then again no

I do not use Windows, but fullscreen in BlitzPlus


Kevin_(Posted 2003) [#4]
Viewport x, y, width, height


Hansie(Posted 2003) [#5]
@Prof

thought so :-D


Bremer(Posted 2003) [#6]
When you say scroller, do you mean text or images, and if images are they tiled ?


Hansie(Posted 2003) [#7]
Bitmap text @Zawran


Bremer(Posted 2003) [#8]
You shouldn't have to scroll the entire screen, blitz should be able to draw lines with the text fast enough and then you can just make a system of lines moving up and as the top line moves outside the screen area; move it down to the bottom and give it a new line of text to draw. I have used something like that a number of times and it seems fast enough.

Otherwise if you want to scroll the entire screen then make a buffer that is as big as the screen plus one row extra on the bottom. Draw the current line into that row that is out of sight and each frame use copyrect/block to scroll the entire buffer and once you have scrolled enough draw a new line on the bottom.

I hope the above made sence ;-)


wedoe(Posted 2003) [#9]
His du ser på www.blitzbasic.no så finner du et par
bitmap-scrollere der, med source. Det er lenge siden
jeg lagde dem men prinsippet er det samme.

Jeg bruker types og gir hver type en bitmap og en teller
for horisontal og vertikal posisjon. Så lar jeg bokstavene
dukke opp utenfor skjermen på høyre side og flytter dem
ved å telle ned posisjonen og når de er ute av skjermen på
motsatt side kan de bare deletes.
Akkurat på samme måte som med sprites på Amiga og C64 men
siden PC'er har software-sprites er det helt fritt hva slags
størrelse de har eller hvor mange det er av dem.


Hansie(Posted 2003) [#10]
@Wedeo

Takk, jeg skal checke dine samples ... :-D