Page 1 of 1

Posted: Tue Feb 11, 2003 3:16 pm
by BackupUser
Restored from previous forum. Originally posted by Madman.

Hello there :)

I was searching the function list and im missing a command to copy an rectangel part of an image to a new image ?
I would need this to build a tile-engine with PB ?
How is that command named in PB ?
Or are there any other ways to achieve this with PB ?
Please help me on the right path :)

Posted: Tue Feb 11, 2003 4:24 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.

check out GrabSprite(), ClipSprite(), UseBuffer(), CreateSprite() and DisplaySprite() with these commands you should be able to do what you need using several different methods.

Posted: Tue Feb 11, 2003 4:40 pm
by BackupUser
Restored from previous forum. Originally posted by benny.

Hey Madman,

what about

GrabImage(#Image1, #Image2, x, y, Width, Height) ???

Greetz, benny!

Posted: Tue Feb 11, 2003 5:24 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.

Hi Madman,
welcome to the pure comunity. If you want a copyrect command to display any tile object out of a big image (tile collection), you could use a very easy way for this. Just try follwing:

Code: Select all

    ClipSprite(...)
    DisplaySprite(...)
For games or general tileengines i would prefer sprites, also use SpriteLib instead ImageLib :wink:


greetz
MrVainSCL! aka Thorsten

PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...

Posted: Tue Feb 11, 2003 6:03 pm
by BackupUser
Restored from previous forum. Originally posted by Madman.

Hmm that Sprite suggestion is some idea but i expect it being too slow to do the job. Especially when i consider my players build some levels themselves with a tile-editor i get some serious probs there :)

Can someone give me some more info on the GrabImage Command ?
The manual line "Create a new #Image2 with the selected area on the source #Image1" doesnt please me :/
Do i get a handle back ? or does this command create an entire new file and writes it to god-knows-where ?

Im not yet sure which language to choose, BlitzBasic or PureBasic.
PureBasics Advantages are the Database and gadgets abilities but it sure lacks some important commands. :/

Is there any 3rd party solution ?

Posted: Tue Feb 11, 2003 6:43 pm
by BackupUser
Restored from previous forum. Originally posted by benny.

@Madman,

check the "Image.pb"-Example file!

benny!

Posted: Tue Feb 11, 2003 6:55 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.

Hi Madman,
as long as games exist, ppl used sprites due fact they are fast.

greetz
MrVainSCL! aka Thorsten

PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...

Posted: Wed Feb 12, 2003 7:10 am
by BackupUser
Restored from previous forum. Originally posted by Madman.

ok then.
I will try both.
I wonder if 500 sprites will be as fast as a single gfx.

Thanx all :)

Posted: Wed Feb 12, 2003 12:24 pm
by BackupUser
Restored from previous forum. Originally posted by Kale.

Madman, you'll be surprised how fast it is! :)

--Kale

Getting used to PureBasic and falling in Love! :)