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 Discussion / Transparent sprites ---- not colliding!

Author
Message
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 17th Apr 2007 06:14
I am making a top down stabber.(no guns) (just knife) For collision, I have 3 boxes, one on the right one on the left and on at the back of the charactor. The collision was working perfectly, when I have a visible placeholder image for the collision box. But when I made the boxes transparent, collision with the boxes stopped! What gives?

Read Ender's Game. And all its sequels.
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 17th Apr 2007 10:05
Not sure if I remember correctly, but I think there was a difference in DBC on using SPRITE HIT and SPRITE COLLISION.

Sprite Collision was suppose to not give a result if transparent portions of sprites were overlapping, where as Sprite Hit reports a collision for the bounding rectangle of each sprite.

(!)-Note- Not sure if it actually worked right.
But If you were using the Sprite Collision command, and now it's not working... Try replacing it with Sprite Hit.

In DBC what code are you using to make the boxes trasparent? Are you doing via your paint program, or via Sprite Alpha commands? Again I can't remember exactly what's available in DBC.

Hope this helps.
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 18th Apr 2007 01:13 Edited at: 18th Apr 2007 01:22
No collision was detected for sprite hit or sprite collision. Good news is that DBC has a Hide Sprite command! It works perfectly.

Thanks zensassem! I remember way back when, I used to do a lot more DB, I used to always see your posts. You answered a lot of my questions too. I read your 2d Tutorials. You're obviously still very active on this board! Didnt you used to have a siggy with that guy from your avatar swishing a cloak around?

Read Ender's Game. And all its sequels.
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 18th Apr 2007 21:20
Ooska, glad it worked out. I was thinking along those lines at the end of my post, hence the question about how you were making your collision squares transparent. Unfortunately, I don't have DBC installed right now, and I couldn't remember the difference in command set compared with DBP.

Out of curiosity and for future reference, what method (before using HIDE SPRITE) were you using to have you sprites transparent?

P.S.
Thanks for the nice comments. Yes, I had the animation in my sig. I'll have to check to see if I still have it @ photbucket. I hadn't been active for a while. I took another long break, and spent about a year working with linux C++ & OpenGL. I'm going to try and complete some ideas I have, rather than spending as much time as I did reading posts. I just have to manage myself better.

Login to post a reply

Server time is: 2025-05-29 05:56:55
Your offset time is: 2025-05-29 05:56:55