A map generator tool for the Serint project.
- SerintServer - Server for the Serint project
- SerintClient - Client for the Serint project
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.
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.
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
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.
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.
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.
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.
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
}
interface Tile {
x: number; //x coordinate of the Tile
y: number; //y coordinate of the Tile
type: TileType; //type of the Tile
}
type TileType = "GRAVEL" | "GRASS" | "BRICK" | "STONE";
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
}
interface Action {
x: number; //x coordinate of the Tile
y: number; //y coordinate of the Tile
type: ActionType; //type of the Action
}
type ActionType = "ITEM" | "SPAWN";
interface Cosmetic {
x: number; //x coordinate of the Tile
y: number; //y coordinate of the Tile
type: number; //integer type of the Cosmetic
}
MIT © VirtBad