Skip to content

virtbad/SerintMaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netlify Status

A map generator tool for the Serint project.

Related

Functions

Download and Upload

There is a download and upload function. When you're finished with your map you can simply use the download button to download the map. The structure of the map can you find here. The same way you can upload a map json to edit it further. Before uploading a map you should make sure the json file matches the expected map pattern. If it doesn't match you won't be able to upload the map.

Sizing

It is possible to adjust the size of the map. The map doesn't have to be squared but it will be always rectangular since you can only set the height and width of the map. The hight and width values represent how many tiles high resp. how many tiles wide the map is. Be aware that the map will be resetted when changing the height or width. If you want to change the size of an existing map there is an unrecommended approach to achieve this. First, download the map. Then edit the height resp. the width in an editor and reupload the map. This method is not recommended because it can destroy your map.

Modes

The paint mode can be changed at the bottom of the page. Different modes create different things e.g. light sources, tiles or action fields

Tile

The tile mode draws map tiles which will be replaced with game textures

When selected, you'll be able to select between different TileTypes to create a diversified map.

Light

The light mode creates light sources which will be used to add lightning to the game

When selected, you'll be able to change the color of the light using rgb. To change the strength of the light source you'll be able to edit the intensity which determinates how many tiles the radius of the light reaches.

Action

The action mode changes a normal tile to an action tile

When selected, you'll be able to select between different ActionTypes to give them a functionality - for example you can mark which tiles should be player spawnpoints.

Cosmetic

The cosmetic mode allows the game to render cosmetic elements at this tile

When selected, you'll be able to enter an integer cosmetic type to allow the game to render additional cosmetic textures on this texture - for example a cobweb.

Types

Map

interface Map {
  height: number; //height of the map [in tiles]
  width: number; //width of the map [in tiles]
  name: string; //name of the map
  tiles: Array<Tile>; //tiles of the map
  lights: Array<LightSource>; //light sources of the map
  actions: Array<Action>; //action fields of the map
  cosmetics: Array<Cosmetic>; //cosmetic fields of the map
}

Tile

interface Tile {
  x: number; //x coordinate of the Tile
  y: number; //y coordinate of the Tile
  type: TileType; //type of the Tile
}

TileType

type TileType = "GRAVEL" | "GRASS" | "BRICK" | "STONE";

LightSource

interface LightSource {
  x: number; //x coordinate of the Tile
  y: number; //y coordinate of the Tile
  intensity: number; //intensity of the light [radius in tiles]
  color: { r: number; g: number; b: number }; //color of the light
}

Action

interface Action {
  x: number; //x coordinate of the Tile
  y: number; //y coordinate of the Tile
  type: ActionType; //type of the Action
}

ActionType

type ActionType = "ITEM" | "SPAWN";

Cosmetic

interface Cosmetic {
  x: number; //x coordinate of the Tile
  y: number; //y coordinate of the Tile
  type: number; //integer type of the Cosmetic
}

License

MIT © VirtBad