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 / Moving Sprites

Author
Message
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Oct 2008 17:49
Hi,ive searched the forums but i dont really know what search terms to use for this question.

I want to be able to move sprites without using the move sprite command, however i cant use for example inc x because the sprite could be at angle and i need it to move in the direction it is facing. I cant use MOVE SPRITE because for the camera i am going to use it needs to use the actual position values and move sprite used with sprite x and sprite y simply wont work. Is There any other way of doing this?

many thanks
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 24th Oct 2008 18:36
Is your wish this?

Attachments

Login to view attachments
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Oct 2008 19:08
well...erm no...i'll prepare a small program to show you what i mean.

thanks anyway
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Oct 2008 19:15
Here. This shows you what i want to do. But i do not wish to use the move sprite command

Attachments

Login to view attachments
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Oct 2008 20:30
Ah Thankyou WindowsKiller! Thats Exactly What I wanted
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 31st Oct 2008 18:50
I have couple more questions to ask, and i thought it would make sense to add them on this thread,

Is There Any Formula to make a sprite rotate to face another sprite, if you need an example as to what i mean i will provide one.

And is it possible to have a non-square sprite, for pixel perfect collision instead of at the boundries of the sprite?

Thanks
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 1st Nov 2008 18:56 Edited at: 1st Nov 2008 19:12
Thankyou very much again windowskiller

EDIT:
Oh, Dosnt Work With Scaled or rotated sprites
I need it to work with both lol
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 1st Nov 2008 20:37
meh, dosnt have to be exact, i just dont want to make it look like it is colliding with a box, also is there any way of determining WHERE the collision occurs?
Ed222
16
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 6th Nov 2008 23:39
Quote: "also is there any way of determining WHERE the collision occurs? "

when the collision occurs just use sprite x(spritenumber) and sprite y(spritenumber) to get the position of it.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 7th Nov 2008 20:48
What i mean is,

Say The Collision Occured on the right side of the sprite, is there anyway for the program to know this?

Login to post a reply

Server time is: 2024-09-27 22:22:57
Your offset time is: 2024-09-27 22:22:57