Using transparent PNG for game development?

Spamzilla 41 Reputation points

I'm thinking of developing a game using transparent PNGs but I have a couple issues:

  1. I can only get things to animate while they are moving.
  2. The images cut into each other leaving empty spots.
Microsoft Technologies based on the .NET software framework.
861 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,500 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 68,491 Reputation points

    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...)