![]() |
|
Peculiar problem with draw_mode_trans and rectfill |
Jonatan Hedborg
Member #4,886
July 2004
![]() |
I made a little prototype of a lighting system i plan to use in a rogue ike-esque game (only not ASCII-graphics). It works just as i want, except that when i remade it so that it draws black rectfill's over tiles (using varying alpha, to let the background show through) i got this odd grid - the borders of the rectfill's seems to be drawn without alpha-checking. Any ideas? (i could probably just circumvent this, but i don't want to use OpenLayer for this, and as it's going to be turn-based, i don't think there should be any major performance issues...) Thanks Oh, and i realize the code is a mess, but it's just a simple prototype...
|
CGamesPlay
Member #2,559
July 2002
![]() |
I can't open RAR files, and you can attach more than one file to a post. Please attach an image and zip of the source. -- Ryan Patterson - <http://cgamesplay.com/> |
Ceagon Xylas
Member #5,495
February 2005
![]() |
Only from looks, it seems rectfill is a single pixel off (maybe -1,-1) from the tile that was drawn. I'll try and see if I can prove it in the source. [edit]
|
Jonatan Hedborg
Member #4,886
July 2004
![]() |
i have attached a zip with the source and the tiny image needed. {"name":"591706","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/4\/243767902ac8f5559cb164a270c03268.jpg","w":823,"h":641,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/4\/243767902ac8f5559cb164a270c03268"} Xylas: That does not seem to work. But whats odder is that it worked before, when i did not use blending (only used rectfills with varying shades of grey)
|
Ceagon Xylas
Member #5,495
February 2005
![]() |
Are you certain? Here's what happened when I did it. Perhaps you misread my post or I miscommunicated. Quote: But whats odder is that it worked before, when i did not use blending (only used rectfills with varying shades of gray) Well, the reason you'd be getting the lines is the overlap of a semitransparent block with a semitransparent block. Like: |
Jonatan Hedborg
Member #4,886
July 2004
![]() |
Ah! Maybe you are right. It's just a fugly tile And now it's pretty obvious why it happens... Gah.
|
|