Microsoft Technologies based on the .NET software framework.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm thinking of developing a game using transparent PNGs but I have a couple issues:
Could you include any relevant source code/screenshots in your question?
Here is a file with everything. Maybe it will help?
@Spamzilla , Welcome to Microsoft Q&A, what is your current app type? I downloaded the zip file from your link, but windows detected virus. could you upload it again via Onedrive or Github?
You can just remove exe and dll files, but anyhow Images are missing.
I'm using C#, VS 2019, .NET framework 1.7.2... There shouldn't be any missing graphics now:
@Spamzilla, thanks for the feedback, When I try to run your project, I meet the following error:
Could you check it then send the correct program without any virus?
There is no virus. If you think there is one then why don't you check the source code?
You already got an answer : use Direct2D
Games must use GPU, then Direct2D/DirectX mandatory
Can you elaborate? That doesn't really tell me anything!
Now I can run your code; then let us know what the issue is. I cannot see any of those two issues that you mentioned in the question.
Sign in to comment
Sort by: Most helpful
For games, use Direct2D (or D3D) for Hardware acceleration
For 2D, use ID2D1SpriteBatch which allows to use Sprite sheets, the transparentcy being automatically managed by Direct2D
A test for simple animations with 2 Sprites sheets (bird and butterfly) in C# with P/Invoke (Win2D can also be used), with WinUI 3 (same code as with Winforms)
(animations are smoother than on the GIF...)
Does this work with Visual C#?
As I said, I tested with C# with P/Invoke for Direct2D, with VS 2022 (I posted a version of Direct2D.cs in a WinUI 3 sample in C# : https://github.com/castorix/WinUI3_SwapChainPanel_Layered
But you can also use Win2D (even simpler if you never developed games in C++/Direct2D)
Sign in to comment