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.

Author
Message
EvilCowSan
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 6th Oct 2002 11:52
I have been having lots of problems w/ sprites. I'll run into a glitch and i'll find a way around it, but now they are stacking up and it's getting hard to work around.
The first glitch is that sprites deform unless you use an image that is in a power of 2 so i'm stuck w/ 128*128 images instead of something like 70*70.
That's not a big problem, but the next glitch makes it a very big problem.
Glitch 2, sprite collision does collision in a box(ie it does collision w/ the transparent pixels that are supposed to be negated from the sprite so that only the wanted pixels are calculated for collision).
What this results in is a 70*70 image w/ a 128*128 collision box around it.
Does anyone have an idea on how to get around either of these problems or know a fix for these glitches? Thanx!
Also i'm using a determined transparent color instead of the default black, i doubt that's the prob, but i thought i'd put out all the info ;p
waffle
21
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 6th Oct 2002 20:53
suggestions...
1 - open your image with MSPaint
a. Make a backup copy
b. Select the image and cut
c. Go to image attributes and adjust size to 128x128
You want a larger size image to preserve detail
d. Past the image into the new picture size
e. Go to image attributes and "Shrink and grow" until
the image fills the new image size (takes trial and
error to get right.
2 . make your sprite 64x64
3 . Teture sprite from image above
EvilCowSan
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 6th Oct 2002 23:52
so there's no real way to solve the problem? just make changes so it's less noticeable

"Trumpy!"
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 7th Oct 2002 00:49
Load the image as 128*128 stretched to fill the 128*128 box, then scale the sprite by 70/128 (approx. 54.7%) to get a 70*70 sprite! I think this works, I only just thought it up, so it may not work in the slightest. Scaling sprites should affect their collision boxes though.
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 7th Oct 2002 03:36
Patch 2 will fix the "power of 2" issue, until then resize your sprites. Patch 2 will be out this month.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
EvilCowSan
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 7th Oct 2002 03:58
thanx for the info rich, do you know if the transparent pixels being detected for collision thing is a glitch or am i miss using a command? Thanx! =)

"Trumpy!"
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 8th Oct 2002 01:03
It's neither a glitch nor a "lack of command" issue, it's just detecting the collision based on the sprite size, not the actual content of it, like it's always done. For irregular shaped sprites you can try using the offset command to move the point of collision or breaking the sprite up into smaller parts.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
EvilCowSan
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 8th Oct 2002 01:23
Weird, i could swear i used sprite collision that negated the transparent color back in the DB1.x days. I must be going crazy ;p

"Trumpy!"
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 8th Oct 2002 02:37
Yeah, that example in the help files in db1 used two Arabian looking buildings, and they collided where there were pixels, not where there was transparency. Hmm...

Login to post a reply

Server time is: 2024-05-07 10:55:44
Your offset time is: 2024-05-07 10:55:44