V. Tiles
A typical, but unfinished, tileset Games created with ™REDPILL are usually based on maps, i.e. maps consisting of tiles. Tiles are square picture elements, which are combined in so-called "tilesets". In ™REDPILL a tileset may be an image that measures 320x256 pixels. (as of 07.06.2020). Since a tileset is an image that contains square tiles and we are building a game with a tile size of 16x16 pixels, we have 20x16 tiles available. We calculate: 320 pixels in width divided by 16 pixels (the width of a tile) gives 20 tiles horizontally. In height we have 256 pixels, which we divide by the 16 pixels height of a tile and get 16 tiles as result. If we now multiply the 20 horizontal tiles by the 16 vertical tiles, we get as a result the great value of 320 small tiles with which we can bring our game to life!
Another, very popular, tile size is 32x32. With this size we would only have 80 tiles for our levels, though.
Only one tileset per map may be used in ™REDPILL. You can create a copper gradient as background, but often your own tileset has to form the background. How this works, that some tiles are in the background, others let the player collide and more tiles can cover the player, is part of another chapter.
.
Assets and organization
For ™REDPILL to find your tileset, it must be located in the project directory. If you have forgotten where your project directory is: Please read the chapter A new project.
load tilesets
To load a tileset we simply click on the button "Tiles". Here we click on "Load Image" and can then, very conveniently, select our image file with the tileset. As already mentioned, the tileset must be located in the project directory.
For those who can't find a tile set on the fly, I have linked a tile set on this page, top right under "ASSETS". I use this one for this tutorial as well.
After the program seems to be frozen for a short time, the picture already appears in its full glory. Often. Sometimes.
Before we now click on "OK", we have to adjust something. The tileset consists, as already mentioned, of tiles which have a size of 16x16 pixels. ™REDPILL assumes 32x32 pixels in its default settings. We can adjust this by clicking on the button "32x32 Tiles". ™REDPILL then switches to 8x8 tiles...
...and after another click on 16x16. That was it in this menu for now. A click on "OK" brings you back to the main menu.
Translated with www.DeepL.com/Translator (free version)