Using transparent PNG for game development?

Spamzilla 41 Reputation points
2023-02-03T17:52:22.6+00:00

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.
Developer technologies | .NET | Other
Developer technologies | C#
{count} votes

2 answers

Sort by: Most helpful
  1. SabrLilW 5 Reputation points
    2023-06-26T08:03:17.84+00:00

    What kind of game are you developing? I believe that one of the most popular options nowadays is turning to providers like Casino Games Aggregator and developing a platform. In that case, you'll be able to provide your players with a wide range of games, and you won't have to develop anything from scratch. It's pretty convenient, and in that case, you can focus on other aspects of running a gaming platform like marketing and customer support, so it's definitely worth thinking about if you're interested in that field

    1 person found this answer helpful.
    0 comments No comments

  2. Castorix31 90,681 Reputation points
    2023-02-04T02:15:38.6066667+00:00

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

    Direct2D_CSharp


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.