Open Paracosm-Daemon opened 1 year ago
There's something going on here. I don't see any immediate issues with the code you posted and I was able to reproduce the problem. I dug into HaxeFlixel's rendering code a bit and I'm not sure if the problem is with HaxeFlixel or OpenFL.
There's something going on here. I don't see any immediate issues with the code you posted and I was able to reproduce the problem. I dug into HaxeFlixel's rendering code a bit and I'm not sure if the problem is with HaxeFlixel or OpenFL.
Yeah, I was thinking if I should've actually put this as an OpenFL issue instead of a HaxeFlixel issue since it seems to root from that instead
Code snippet reproducing the issue:
Making a new Lime project and pasting this code into the PlayState will give the same results as seen below.
I have been attempting to make an arcade machine for a game that I am currently developing, and as of right now, I've come up with the solution of copying an FlxCamera's pixels to an FlxSprite to mask it behind the arcade machine's body. With the code above, what I do is render the camera manually, and then draw the canvas (since renderBlit is disabled) to the sprite. The issue comes with this, as the alpha channel does not seem to be rendering. I cannot seem to find a workaround to this issue, as there seem to be no other properties or functions I can use to draw the canvas with the alpha channel.
Observed behavior:
https://user-images.githubusercontent.com/98495978/202837813-b08ec8f3-7187-4be2-92f5-8a6241f11f76.mp4
Expected behavior:
https://user-images.githubusercontent.com/98495978/202837809-daf29dbb-f73e-46db-b311-58a5ce175092.mp4
For reference, here are the two side-by-side:
The one on the left is the FlxCamera itself, and the one in the center is the FlxSprite that has copied the pixels. This is an issue I cannot seem to bypass, or fix, unless I were to try using renderBlit. I'm also unsure if this is intended behavior or a bug.
For context, here is the issue, but presented on the 'game' I have mentioned:
https://user-images.githubusercontent.com/98495978/202837949-a0c0eec6-dd44-4563-8ade-cbb1deabe193.mp4
The top-left is the camera, and the center is the sprite copying the camera's pixels. You can see that the static fades out on the camera, but not on the sprite. This is a hinderance to the effects that I want to add to this, seeing as it limits the ability to make sprites translucent. I will be grateful for any help on this issue.