Placing tiles in a room is simple enough: you create a Tile Layer and assign a Tile Set asset to it:. At the top of the room you will see several tools, similar to the ones found in the Image Editor, that you can use to design your world:. This loads the given image into a new Tile Layer, and also creates a new Tile Set that can be reused.
I had to adjust some properties in the importer such as tile size, starting position and it then generated a Tile Layer with the given image, and also created a new Tile Set asset with all unique tiles:.
Any Tile Sets that have different types of terrain like grass and dirt etc. If you open the Auto Tiling menu from the Tile Set Editor, you will see that it allows for two kinds of Auto Tile Sets: one with 47 tiles, and another with 16 tiles:.
You can click on the plus button next to either of them to add a new Auto Tile Set. The 16 Tile Set allows you to place two kinds of terrains, as indicated by the light and dark areas in the template shown above. These could be grass and dirt, grass or water, etc. The tiles are used when the corners of two different tile blocks meet. You can also make a Tile Set where the grey parts are transparent, such as land tiles for a platformer game:.
This is the lesser used Auto Tile Set, particularly because it is more complicated and requires a larger amount of tiles. If used correctly, it allows for narrower tiles and supports more tile combinations. Here is an example of a Tile Set that can be used with the 47 Set:. Such a Tile Set can be used to create intricate levels that use less tile space, as seen below:.
The Brush Builder allows you to create groups of tiles that can be placed throughout a room, such as any repeating sections of your levels. All the tools from the Room Editor are available here, including Auto Tiling. You can use these custom brushes in a room, just like you would use regular tiles. Note that you can click and hold the left mouse button then drag on the tile set to select multiple tiles to paint into the brush canvas.
The following image shows our previously mentioned landscape features as an example of five custom brushes made from a single tile set:. On the right you can see five features that we've made highlighted red in the image. Notice how we've left a gap of one tile between each feature - this is because any touching group of tiles will be treated as a single brush in the room editor , so we leave a gap of one tile to show that each set is a distinct brush we want to create.
While creating your brushes, you paint with the left mouse button and delete with the right mouse button. Note that you can also use the zoom tools within the editor windows to change the zoom levels of either window.
At the top right you can see the currently selected tool, and you can also set the size of the brush that you want to paint with. The default size is 1, which is a single tile, but if you set it to higher values then you can paint and erase with a larger brush composed of the selected tile repeated, as shown in the image below:.
The editor also has a number of other tools other than paint and erase. You have the flip , mirror and rotate tools which can be used to change how any tile or selection of tiles is drawn. These tools will flip, mirror or rotate the currently selected tile or tiles for painting into the brush canvas, but if you have used the Selection tool beforehand to select a tiles from the brush canvas, they will act on the selection instead.
For faster editing you can use the flood-fill tool which will fill any space surrounded by tiles, and you also have the line and rectangle tools, which operate by clicking , dragging and releasing. The final tool available to you from this editor is the Autotile tool. We'll discuss autotiles a bit more further on in this tutorial, but suffice to say that using this will make the tiles being drawn to the brush canvas join up, as long as the autotile editor has been set up correctly.
Below the tools, you can find two different sections for selecting any autotile or animated tiles that have been created using the current tile set image. A single sprite that is used for a tile set can have many, many, single cell images in it, and these can be combined in the Animation or Autotile editor to create custom brushes which will show up in these sections and can be used in conjunction with regular static tiles to create brushes.
Once you have set up all the brushes you require, you can then use them to paint tiles onto any tile layer within the room editor. Tiles are generally considered to be static cells within the game room, however with GameMaker Studio 2 it is possible to animate them, just as you would a sprite.
Why not just use sprites, you ask? Well, sprites have a certain processing overhead due to them being associated with a bounding box and the way in which they are rendered, but tiles have a much lower processing overhead and so are faster to render. This does come at a price however, in that with tile set animations you are limited to creating animations that must be a power of two in length - ie: of 2, 4, 8, 16, etc However, even with these limitations, animated tiles are a powerful feature that can be used to add life and colour to otherwise static environments and backgrounds.
To create a tile animation you must first have a tile set that has the required tiles all within the one sprite image but not as sprite frames, so a single large sprite frame with all the animation images within it , and then in the tile set editor you click on the Tile Animation button to bring up the Animation Editor :.
The example image above is a single image with all animation frames contained within it, but it should be noted that the image could also contain other non-animation tiles too, since you can use a single massive tile set and then "cherry pick" the parts of it that you want to create the animation from.
For example, you could have a large landscape tile set with trees, earth and water, and within the tile set have multiple tiles to be animated to make the water ripple.
To create a tile animation you first have to add an animation to the animation library by clicking the Add Animation button , which will add an empty animation strip to the library and request that you select a number of frames to be used:. You will then be presented with a view of each empty animation frame, with the initial frame highlighted for you:. If you then go back to the tile set image on the left of the editor you can click on any tile to add it into the animation and the frame will advance to the next one.
Clicking successive tiles will fill up the animation, which you can then preview by clicking on the "play" button beside the frames:.
Once you have done that your animation will become part of the animation library and when you enter the room editor you can select it and place it within the room. Note that if you select any of the tiles from an animation to place in a room, that tile will animate from the tile onwards, so you can "desynchronise" an animation by placing separate frames within the room and they will all animate.
The only caveat to this is that the animation speed will always be the same, since it is defined for the whole tile set and not individual animations within the library. The Auto Tile feature is an incredibly powerful tool that can be used to make level building much easier, whether it is for a top-down or side-on view project. Add any additional objects to represent something abstract.
Save the map as a tmx file. Import the tmx file and interpret it for your game. In a nutshell, 8-bit graphics refers to maximum colors that can be displayed, whereas 16 bit means 65, colors and 34 bit means 16,, colors.
Yep, 2D is quicker to make, because the learning is simpler, the code smaller, and the art less if you pick a simple 2D animation format. Creating a TileSet When the game runs, the TileMap combines the individual tiles into a single object.
So to get dirt tiles, all you need is to cover the floor in bits of slime and heat them up. You can do that by building storage compactors, limiting them to a few kg of slime, and deconstructing them after your Duplicants have filled them. After creating or loading a Palette, drag and drop Textures or Sprites from the Assets folder directly onto the Tile Palette window.
You will be prompted for the save location for the new Tile Assets. Select the save location, and the new Tile Assets are generated in the selected folder.
0コメント