First We make the graphics smaller.
A typical platform tile
64x48 in pixels
My tile
20x20 in pixels
All I did was made a tile of my choice the size of my choice. Once I got that bit done I just named in the BlockA0 – BlockB6, so I wouldn’t have to modify the LoadTile function in the Level.cs class. After that I did the following.
Editing the Code
Changed the Backbuffer widths and heights in the Platform.cs class.
//change the backbuffers so the map doesn't become to long to draw and out of proportion private const int BackBufferWidth = 600; private const int BackBufferHeight = 300;
Finally I changed the Tile Width and Height to the pixels of the graphics in the Tile.cs class.
public const int Width = 20; public const int Height = 20;
If you compile the following above you should get your tiles to be the same size as the following picture below.
I haven’t finished making all graphics 20x20 as you can see the player is still the same size, but the rest are, and that is how you change the width, and height of the tiles using the Platform starter kit without messing up your game.

Add Reply




MultiQuote
| 


