Skip to content

Tile composition generator using java 11 for 16x16 based tiles

License

Notifications You must be signed in to change notification settings

fernandoesra/RandomTiledImage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RandomTiledImage

Tile composition generator using java 11 for 16x16 based tiles

Resume

Tool to generate images of any size based on random compositions of tiles of different sizes, all based on 16 pixel x 16 pixel tiles.

Requirements

  • Java-11
  • Images in the supported dimensions that must be placed in the Tiles folder next to the program

How to use

  • Place all the tiles that you want to use for generation (separately, not a tileset) inside the Tiles folder

  • Run the run.jar file
  • Enjoy the result

Example result without modifying input parameters (The generated image will be 1920 x 1080 pixels)

Input parameters

You can modify the behavior of the tool with 4 different input parameters. These parameters can be combined in different ways.

The 4 values that can be modified are:

  • Preview (true/false): Upon completion of the tool the system image manager will open and we will see the generated image.
  • Width (int): The width in pixels of the generated image can be modified with this parameter.
  • Height (int): The height in pixels of the generated image can be modified with this parameter.
  • Name (text): By default the generated name will be given by the code using a timestamp. If we want a custom name we can pass it as a parameter.

Possible uses of input parameters:

INPUTS EXAMPLE
preview java -jar run.jar true
preview name java -jar run.jar true testImage
preview width height java -jar run.jar true 800 600
preview width height name java -jar run.jar true 3840 2160 4kTestImage

Rules:

  • There must always be at least one 16x16 tile for the program to work correctly
  • It is recommended that all image formats be in the same format (.png recommended)
  • There is no limit to the number of variations a tile can have. There can be, for example, a single 16x16 tile and two hundred 32x32 tiles

Images generated with the example tileset:

This tileset is only to show the tiles used, the tiles must be included separately in the Tiles folder.

Examples

160 x 160

1920 x 1080 (HD)

3840 x 2160 (4K)

Image generated using only one 16x16 tile and another 32x32 tile

Image generated using two 16x16 tiles and one 16x48 tile

Image generated using a 16x16 tile, another 32x16 tile and another 16x32 tile

About

Tile composition generator using java 11 for 16x16 based tiles

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages