Hot answers tagged sprites
Tiles and icons (even in UIs like window systems) are often in a size like 16x16 or 24x24 to make it easier to modify the tiles. Most times the tile size is a multiple of 8 because of the folowing reasons. It is relatively easy to shrink a tile with the size 32x32 to 16x16 by simply putting 4 pixels together (e.g. create the median/average of the 4 ...
Sprite Sheets with a Uniform Grid The easiest form of sprite sheets, are sheets that use a uniform grid to lay out the individual sprites of your object. Your sheet is essentially a grid with a certain number of rows and columns of cells. Each cell contains a single sprite. Using a uniform grid, means that all cells have the exact same dimensions. ...
System.currentTimeMillis() should be changed to System.nanoTime() / 1000000; currentTimeMillis has an issue in it that sometimes comes back with a weird number and in games causes twitching in animations and graphics
When you rotate the transform object, rotate the velocity vector by the same amount.
If you need good image quality you can use Format: Truecolor or ARGB 32 with an high Max Size and avoid compression: You can try playing with Filter Mode and Aniso Level too in the advanced settings:
I don't think you need XNA any more. Just double click on Content.mgcb to open the content editor. Right click on Content -> Add -> New item -> Spritefont description, give it a name, e.g. "testfont" Load your spritefont in game: var font = Content.Load<SpriteFont>("testfont"); Use it! spriteBatch.DrawString(font, "hello", new Vector2(10, 10), ...
I'm not familiar with flash/as3. This said, I fail to see what instance would be the parent to the child you're adding with addChild in a static method. Here is the description from the documentation Adds a child DisplayObject instance to this DisplayObjectContainer instance. The child is added to the front (top) of all other children in this ...
Using an atlas: You can pack the left and right versions into a single texture for each sprite, and only swap UV's based on the player's direction. Although you may put only left/right images into the textures, will your modders? A few descriptors to think about: bool AutoFlip; //Swap UV's based on L/R? bool ReverseTextures; //Reverse standard ...
Only top voted, non community-wiki answers of a minimum length are eligible