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 / Problem with sprite collision

Author
Message
Kwiki Mart
21
Years of Service
User Offline
Joined: 9th Dec 2003
Location: PA
Posted: 7th Jan 2004 23:30
I am sorry for the double post(2D) but no one really checks that. I am using DBC.

In this game I am still having a problem with the collision. The collision works fine but if I am bumping in to the wall and then turn around I end up going backwards through the wall. My code is a simple if sprite collision(#,#)=1 and image=# then X=X-# to push it back. Any thoughts on how to shrink my code and stop me from backing through the wall?



The only thing I can think thtats going on is the back of the tank is longer then the barrle so when I turn it overlaps the sandbags.
Again I am sorry for the double post.
Thanks

On target, On time!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 8th Jan 2004 04:47 Edited at: 8th Jan 2004 04:47
Try using an oldx# = x# etc method.

ie:



Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Kwiki Mart
21
Years of Service
User Offline
Joined: 9th Dec 2003
Location: PA
Posted: 9th Jan 2004 00:23
Thanks Ill try that.

On target, On time!

Login to post a reply

Server time is: 2025-05-22 06:41:43
Your offset time is: 2025-05-22 06:41:43