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.

2D All the way! / rotate sprite

Author
Message
hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 12th Apr 2007 00:27
is it possible to rotate a sprite with DBC? i used this code before:



but it doesn't work... help n e one?

Why do they turn against me? Especially when i need them the most?
aluseus GOD
18
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 12th Apr 2007 01:58
rotate sprite?

I will Learn to rule 2d. Someday...
hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 12th Apr 2007 02:34
that doesn't work in DBC
i have tried

Why do they turn against me? Especially when i need them the most?
hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 22nd Apr 2007 07:44
n e 1?

Why do they turn against me? Especially when i need them the most?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 22nd Apr 2007 07:59
you can fake sprites with 3d plains in classic, this way you gain all the 3d commands as well as the 3d cards ability to push the 3d objects around.

hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 22nd Apr 2007 17:43
i c
... but won't this make my program lag a little more?

Why do they turn against me? Especially when i need them the most?
tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 22nd Apr 2007 22:21
It would only be 2 Polys so no not really.

hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 24th Apr 2007 02:22
o
lol...

Why do they turn against me? Especially when i need them the most?
hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 24th Apr 2007 04:15
another question... (srry bout the double post) but... how would i go about doing this? the fake 2d

Why do they turn against me? Especially when i need them the most?
aluseus GOD
18
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 25th Apr 2007 03:37
I've never used 3d, but I think you create a plain and then texture it. Also, darkbasic actually does 3d faster.

I will Learn to rule 2d. Someday...
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Apr 2007 04:08
here is an old example of using 3d for sprites and buttons.


zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 26th Apr 2007 01:57 Edited at: 26th Apr 2007 01:59
I have to look through my DBC stuff. I was working on rotating sprites via memblocks. I can't remember now if I ever got it to work right and whether the speed was acceptable. I got DBpro right around the time I was working on it, so that made my project a mute point. I'm not sure if I tested any of the built in collision commands either, as I was using it with 2D tilemaps, that had collision grids in place. I have my Old DBC on a portable HD, so I'll have to hook it up tonight. If not I could try re-coding the basic principle I was using.

I'm not sure if it's worth it though performance wise. I'm sure someone else especially indi would have recommended it. I was coding this becuase I didn't understand plains at the time. I would imagine that 3D acceleration would mop the floor against my algorithm.
hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 27th Apr 2007 00:18
i like the code indi... and thanx for that... i could really use it for my games and making menus

Why do they turn against me? Especially when i need them the most?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th Apr 2007 02:05
your welcome mate.

LBFN
18
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 30th Apr 2007 01:16
@ hpfan273
An alternative to your original question is to simply draw the 2D images at the angles that you want (90 degree increments are easily done with MS Paint) and save them as different images. You could then code it so that the sprite image is changed to give the effect of rotation.

LB

Login to post a reply

Server time is: 2025-05-14 16:47:43
Your offset time is: 2025-05-14 16:47:43