Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / how do u crop sprites???

Author
Message
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 18th Jul 2003 00:35
how do u crop sprites???
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Jul 2003 00:48 Edited at: 18th Jul 2003 00:49
As in chopping bits off ?

The only way I can think of is to create a bitmap of the required size, paste the image (of the sprite) onto that, and then grab the required bits of the image and use that for the sprite.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 18th Jul 2003 15:30
yeah, i need to erase the white screen around my guy

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Jul 2003 16:07
Aside from trying to make sure you dont have a white screen around your guy to start with, the only real way is the way I suggested.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 18th Jul 2003 20:12
how do u get the white screen out though?

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Jul 2003 20:42
Get the object so it isn't included...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jul 2003 20:51
Either draw your image in a paint proggy that understands and handles alpha settings, or if your image is 32 bit, use the function below to fix the alpha after you've loaded it.

Just use it like this:



That will make white transparent.
shwuckie
23
Years of Service
User Offline
Joined: 9th May 2003
Location: Australia
Posted: 18th Jul 2003 20:56
correct me if im wrong, but i believe ya mean that ya dont have any see-thru bits on ya sprites and its appearing as a block?? to fix this do one of either of these two things:

1. use black as your background for all sprites because that is the default transparent colour

2. use the command SET IMAGE COLORKEY red,green,blue
where red green and blue would be used to pick the colour you want as transparent (ie 255,255,255 would be white)

hope thats what ya meant!

optic blast! megablast! have a blast!!
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 18th Jul 2003 23:34
no.... i have a picture of a person that i did in paint. But.. there is of course, the white screen around him, how do i clip the white screen off to put ONLY the character???

iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 18th Jul 2003 23:35
srry for lack of specificity

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Jul 2003 23:43
You can either try and set the colourkey to this white colour, or do it the way I suggested.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 19th Jul 2003 01:44
i am SO sorry, but the reason i keep asking stuff is i have never done sprites b4. I have never done anything close. Srry for lack of xperience, but make the replies simple. THANKS A LOT

iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 20th Jul 2003 07:14
youre function didnt work IanM

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Jul 2003 13:11
Then your image wasn't 32 bit. I've used this function again and again when I was fine tuning my pixel-perfect sprite collision routines.

Post a link to your image - or email it to me - and we'll work out how to get it loaded properly.
jrowe
23
Years of Service
User Offline
Joined: 12th Oct 2002
Location: Here
Posted: 20th Jul 2003 20:54
Load it in paint and bucketfill all the areas you want invisble completely black.

For Fathers and Sons who enjoy wholy spirits.

http://www.tinnedhead.tk
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 20th Jul 2003 21:58
Which is what I suggested earlier...


Its better than a poke in the eye...
jrowe
23
Years of Service
User Offline
Joined: 12th Oct 2002
Location: Here
Posted: 20th Jul 2003 23:21
Sorry MrTAToad, didn't read the whole thread!

For Fathers and Sons who enjoy wholy spirits.

http://www.tinnedhead.tk
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 21st Jul 2003 05:52
how could i then get the BLACK out?

Mattman
23
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 21st Jul 2003 05:58
Use paint to change to white, so it takes it out

---Mattman
DID YOU KNOW THAT ???
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 22nd Jul 2003 01:30
what?

explain VERY CLEARLY plz

HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 22nd Jul 2003 02:11
Hey iammesol, the easiest way to do it is make the background of the sprite BLACK. That's all I do. And then if you need to use any black in the actual sprite just use a very dark gray colour. simple enough

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 25th Jul 2003 07:07
and it will just become transparent?

HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 25th Jul 2003 07:10
Correct. Wow it took you a while to respond to that...



SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 25th Jul 2003 07:40
you have to set the sprite so it appears transparent after you change the white to black as said above.
SET SPRITE spritenumber,0,1
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 25th Jul 2003 08:41
you do? i never had to do that...

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 25th Jul 2003 11:15
As far as i remember the black pixels is transparant by default


Not up yet --> http://thecyborg.t35.com/
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 25th Jul 2003 22:48
yup, that's true they are. nice logo cyborg

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
iammesol
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 26th Jul 2003 07:49
lol THANK U GUYS!!!!

HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 26th Jul 2003 09:03
am i to assume that it works now? if so congrats...good luck...

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 26th Jul 2003 12:22
to get the white to be transparent you would need to insert "set image colorkey 255,255,255" before you load the image, then the white is treated as transparent.

or you could keep using black as the transparent colour.

Either way works

Login to post a reply

Server time is: 2026-07-23 02:38:02
Your offset time is: 2026-07-23 02:38:02