Transparency

This is a discussion on Transparency within the Windows Programming forums, part of the Platform Specific Boards category; not half bad. you don't need directx for a game like that. DirectX would be overkill for most 2d things. ...

  1. #16
    Registered User
    Join Date
    Jul 2002
    Posts
    273
    not half bad. you don't need directx for a game like that. DirectX would be overkill for most 2d things. My guess on your transparency problem is that the color is "offblack" so it's not getting counted as a transparency color. sometimes those slip by because to the naked eye they look close enough. You should go over that area with a black brush in whatever paint program you use.

    Awesome work so far
    always looking, make an offer. get me out of this place.

  2. #17
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Hmm, I thought it was off-black too. I filled the image with white, then re-filled it with black (I even used a custom-defined color, and set r g and b to 0). No dice though... besides, why would the aliens have speckles?

    p.s. I just use the paint that comes with windows.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  3. #18
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Why don't you try using TransparentBlt wouldn't that do the trick for GDI stuff?
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  4. #19
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Gee whiz, actually I never knew there WAS a transparentblt! The only thing I'm concerned with, is that in the documentation, it says
    [This is preliminary documentation and subject to change.]

    Anyways, all of the tutorials I've seen use their own transparency functions... there must be a reason for that, right?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  5. #20
    Registered User
    Join Date
    Jul 2002
    Posts
    273
    uh guys? TransparentBlit is NT only.
    always looking, make an offer. get me out of this place.

  6. #21
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879

    Talking

    Oh, that would explain the error.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  7. #22
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Hey... I was trying it out without the background, and I noticed this: I shoot a bullet, and it goes fine, right? Then I shoot a laser, and it shoots fine... then I cycle back to the bullet, and all of a sudden when I shoot it, it will display the bullet, but under the bullet it will be filled in with garbage, down to how far the laser goes (as in, it will fill in a rectangle the size of a laser, with the bullet at the top and the garbage at the bottom). I examined my code, but couldn't find out where I went wrong...
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  8. #23
    Registered User
    Join Date
    Jul 2002
    Posts
    273
    hard to give an answer to that. Do you have software like bounds checker? usually when something goes wrong after it works right it is a memory overwrite somewhere. If not, upload the project again and I'll bounds check it. At the very least, we can see what the problem you're describing looks like.
    always looking, make an offer. get me out of this place.

  9. #24
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    The code is pretty much the same as before (I didn't really change anything except to check TransparentBlt then change it back). Just go to main.cpp, scroll down to gameMain(), and comment out the indicated line (drawBG()), and you can see it easily.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  10. #25
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    By the way, do you know where I can get a trial version of BoundsChecker? I can't find it anywhere
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  11. #26
    Registered User
    Join Date
    Jul 2002
    Posts
    273
    sorry, I haven't been checking this thread. NuMega put out an old version but I think they are owned by Compuware now. www.compuware.com If they have one you should be able to find it there
    always looking, make an offer. get me out of this place.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 06-17-2008, 05:00 PM
  2. Transparency thing
    By Gordon in forum Windows Programming
    Replies: 2
    Last Post: 04-23-2008, 11:34 AM
  3. Nonclient & client area transparency
    By TheDan in forum Windows Programming
    Replies: 0
    Last Post: 03-27-2007, 03:19 PM
  4. How do you print on a transparency ?
    By Zeeshan in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 02-25-2003, 02:29 PM
  5. GIF Transparency
    By dbaryl in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 04-20-2002, 06:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21