Mottafier
Member
Hello! I'm currently working on a local multiplayer game that utilizes dynamic splitscreen. When the players are close together, you both share one view, but when you move far apart enough, the view splits into two and they each follow a player.
The view on the left follows player one, and it really takes up the whole screen, it just gets covered by player two's view. The player two view (right) is a surface that gets drawn OVER the player one view, and uses blend mode subtract to take out the area where player one's view should be.
The image above shows just the surface that holds player two's view. The issue is, that anything transparent thats on screen when this surface is made seems to stay transparent, even with a solid color beneath it! The large green square here is transparent just to illustrate the issue better. The issue this creates is that when the second view gets drawn, anything transparent makes the surface partially transparent, and so anything in player one's view (left) bleeds through this surface. If you look close enough, you can see a "ghost" of player two to the right of the player in player Two's view in the first picture. I figured out this is due to the transparent surface showing player one's view beneath it. And for four brutal days I've been trying everything to fix it but nothing has worked.
This was a little tough to explain, so if I need to be more clear please let me know! Also I could post code, but I don't think it's necessary in this situation, however that can change if you'd like to see it.
Ideally, if there were a way for me to set the surface's alpha to 1 and THEN subtract the triangle where view one should be, that would work, but currently the best I can do is draw_enable_alphablend(false) and then draw player two's surface, which makes the whole surface opaque, which then covers up player one's view beneath it.
Thanks in advance, I hope this isn't unsolvable!
The view on the left follows player one, and it really takes up the whole screen, it just gets covered by player two's view. The player two view (right) is a surface that gets drawn OVER the player one view, and uses blend mode subtract to take out the area where player one's view should be.
The image above shows just the surface that holds player two's view. The issue is, that anything transparent thats on screen when this surface is made seems to stay transparent, even with a solid color beneath it! The large green square here is transparent just to illustrate the issue better. The issue this creates is that when the second view gets drawn, anything transparent makes the surface partially transparent, and so anything in player one's view (left) bleeds through this surface. If you look close enough, you can see a "ghost" of player two to the right of the player in player Two's view in the first picture. I figured out this is due to the transparent surface showing player one's view beneath it. And for four brutal days I've been trying everything to fix it but nothing has worked.
This was a little tough to explain, so if I need to be more clear please let me know! Also I could post code, but I don't think it's necessary in this situation, however that can change if you'd like to see it.
Ideally, if there were a way for me to set the surface's alpha to 1 and THEN subtract the triangle where view one should be, that would work, but currently the best I can do is draw_enable_alphablend(false) and then draw player two's surface, which makes the whole surface opaque, which then covers up player one's view beneath it.
Thanks in advance, I hope this isn't unsolvable!