Page 1 of 1

TileBlock and TileImage

Posted: Mon Jul 26, 2004 10:29 pm
by Krylar
Hiya,

I know this isn't going to be super speedy or anything, but I've been going through stuff that I did in Blitz and working on making PB versions of them. This was in the process of doing a little starfield parallaxing thingy.

I'm finding a lot of things that PB has that Blitz doesnt, as well as finding things that Blitz has that PB doesn't.

Two functions that I used in Blitz are TileBlock and TileImage. They both take a sprite and cover the background with it, with TileBlock doing it destructively and TileImage using transparency. I don't know if PB has something that does this or not, but I couldn't find it so I coded up a quick one using PB procedures.

I've only set this up for use with a starfield and I haven't fully debugged it. Looks just fine with the starfield, but when I loaded up a different tileset the spacing acted a bit funny, so I'll dig into that later and figure it out.

Anyway, if you've any use for this, wanna make it better, faster, etc., feel free.

Code and assets: Click Here.

-Krylar

Posted: Tue Jul 27, 2004 9:42 am
by Num3
Hope this helps :wink:

TileBlock = DisplaySprite
TileImage = DisplayTransparentSprite

Posted: Tue Jul 27, 2004 12:15 pm
by Kale
Nice code! I like the simple way of scrolling the tiles using a modulo, I never thought of that. :)

Posted: Tue Jul 27, 2004 2:26 pm
by Krylar
TileBlock = DisplaySprite
TileImage = DisplayTransparentSprite
DisplaySprite and DisplayTransparentSprite seem to only display one at a time. There's an argument to have them display all over the background?

-Krylar

Posted: Tue Jul 27, 2004 3:44 pm
by Derlidio
You're right. PB doesn't support a statement to tile an image over a portion of the screen. At least, I didn't found it also. But as you have experienced in the sample code you wrote, it is fast enough to do it by other means :wink:

Regards...

Posted: Sun Aug 29, 2004 12:08 pm
by texxsound
I just skipped through the code but why didn't you use a Repeat-Until loop with FlipBuffers() and SetFramerate(100)? Wouldn't it be less lavishly ... :?:

Just a thought...
nevermind

Posted: Thu Sep 02, 2004 5:15 pm
by Krylar
texxsound wrote:I just skipped through the code but why didn't you use a Repeat-Until loop with FlipBuffers() and SetFramerate(100)? Wouldn't it be less lavishly ... :?:

Just a thought...
nevermind
Pretty much what I'm doing ;)

Posted: Fri Sep 03, 2004 6:23 am
by texxsound
Krylar wrote:
texxsound wrote:I just skipped through the code but why didn't you use a Repeat-Until loop with FlipBuffers() and SetFramerate(100)? Wouldn't it be less lavishly ... :?:

Just a thought...
nevermind
Pretty much what I'm doing ;)
so i just outed myself as a noob again.. lol