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 / Sprites collision is not where i want.. :)

Author
Message
TRAUMA
13
Years of Service
User Offline
Joined: 16th Jun 2011
Location: Russia, Penza.
Posted: 17th Jun 2011 00:36 Edited at: 17th Jun 2011 12:49
Hi everyone!
I have a problem .. I do not know how best to explain ..
So: when two sprites, they collide not close and along by the invisible border.
How to make the invisible color (rgb 0,0,0) was not taken over part of the sprite?
In other words, how to make two sprites collide close?



EDIT: Sorry that my post is not placed in correct theme (DBPro), I do not know how to move it now.

Excuse me for my English comrades.
In my spare time I drink vodka, play the balalaika and hide from the polar bears.
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 17th Jun 2011 14:22 Edited at: 17th Jun 2011 14:23
Try changing the



My only though about doing this is if you will still have control of it after. Also, welcome to the Forums.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
TRAUMA
13
Years of Service
User Offline
Joined: 16th Jun 2011
Location: Russia, Penza.
Posted: 17th Jun 2011 17:59
Thank you for the greeting, 2Beastmode4u!
Maybe I have something wrong done, but it does not work.. : (
I changed "sprite" to "paste sprite":

By the way i do not understand why this black sprite is not transparent?
In the old "Dark Basik 1" everything works ..

Excuse me for my English comrades.
In my spare time I drink vodka, play the balalaika and hide from the polar bears.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Jun 2011 18:01 Edited at: 17th Jun 2011 18:03
Hello!

RGB(0,0,0) isn't invisible it's black... Darkbasic just treats true black as transparent by default.

Sprite collision is not pixel perfect. The boxes that hold the images will always show as a collision when they touch/overlap even in the areas that are suppose to be transparent.

At the bottom of this screen click in the box titled "Thread Subject Search" and type in "Pixel perfect collision" to find messages about it (most of them have code to achieve it via memblocks).

TRAUMA
13
Years of Service
User Offline
Joined: 16th Jun 2011
Location: Russia, Penza.
Posted: 17th Jun 2011 18:13
Hello again! )
Thank you very much for clarification.
Now try to find what you wrote, Grog Grueslaer.
Sorry if my question was stupid.

Excuse me for my English comrades.
In my spare time I drink vodka, play the balalaika and hide from the polar bears.

Login to post a reply

Server time is: 2024-11-22 18:57:18
Your offset time is: 2024-11-22 18:57:18