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.

Newcomers DBPro Corner / Sprite Offset

Author
Message
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 12th Nov 2003 20:32 Edited at: 12th Nov 2003 20:33
Hey all, I,m trying to make a top down shooter and am having a bit of trouble with my sprite. I think the SPRITE command draw my character from the bottom left and I was wondering if there was a command to change it so the sprite co-ordinats actually mean where the center of the sprite is. It was a bit hard explaining this so if you don't understand just say. Thanks.

"I SEE" said the blind man
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 12th Nov 2003 20:48
You've almost answered your own question with the title of your thread Have a look at the offset sprite command (might be "sprite offset") - this will do exactly what you want.

Cheers,

Rich

"It's easy to be mean when death equals a high score screen."
"You can take your Quake and go away, I'd rather play Bubble Bobble any day."
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 12th Nov 2003 20:56 Edited at: 12th Nov 2003 21:05
Thanks. So if I put

Would it draw my sprite from the center.

"fireball"
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 12th Nov 2003 23:49
anyone

"fireball"
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 13th Nov 2003 01:06
That should do it. The easy way to test it is to rotate the sprite and see what happens. BTW, sprites start from the upper left and the offsets go right and down.
--
TAZ
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 14th Nov 2003 00:05
THANKS

"fireball"

Login to post a reply

Server time is: 2024-11-25 16:56:50
Your offset time is: 2024-11-25 16:56:50