Tag Info

New answers tagged

0

In doubt, when you can not obtain a version of the tileset where the "pink" areas are indeed transparent, you can simply replace all pink pixels of the image with transparent ones, with a method like replaceColor in this example: import java.awt.Color; import java.awt.GridLayout; import java.awt.image.BufferedImage; import java.io.File; import ...


0

You could use the transparent png instead. These sprites with a pink color were used a lot in old games, usually using images with a palette (indexed colors). Commonly the pink color is Red = 255, Blue = 255, Green = 0, and it is defined as the first color in the palette (index 0), meaning it should be transparent pixels. Defining the color as pink helped to ...


0

Create an arrays for each direction of running index. So, if there is one direction the player can move, all the player can do is either run or not run. You have a single array. Say the that your animation requires 3 poses: both feet down, left leg up, right leg up. You place them in an array as indexes 0,1,2 respectively. Then your run_annimation array ...



Top 50 recent answers are included