Skip to content

GrapeshotGames/AtlasMapViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(Experimental) Atlas Map Viewer

Alt text Used as an example to read ship and bed positions from Redis overlayed on top of a world and territory or colonies map. It consists of two pieces, a go web service that retrieves and serves the ship and bed positions and a simple React / Leaflet.js app.

The slippy map tiles for the world are generated by ServerGridEditor and should be placed in the "www/tiles" directory.

Go Dependencies:

  • go 1.12 using modules

Setup

In general you need to generate a slippy style map (See ServerGridEditor or other tools) and clear out and replace all files in www/tiles/* with your map files. Make sure to match the server grid size in config.js and setup the following config options in sections below. Note: Untested with non square grids currently but we definitely want this to work if it doesn't already

Web Service

Command Line

The web service requires the same ServerGrid.json and ServerGrid.ServerOnly.json as the Atlas game servers. You can either copy those two files into the same directory as AtlasWebViewer.exe or use the command line -atlas path_to_game_server_config_directory.

Config

The default config.json should work out of the box.

{
    //Can be left blank but usually just ip of hosting machine in simple case 
    "Host": "",
	
    //Port to host the web service
    "Port": 8880,
	
    //Optional link to territory server
    "TerritoryURL": "http://localhost:8881/territoryTiles/",
	
    //Relative path to the static web files
    "StaticDir": "./www",

    //Disable sending commands to the game server
    "DisableCommands": true,
	
    //Frequency entities such as ships and beds are polled from Redis.
    // A negative value disables the feature.
    "EntityFetchRateInSeconds": 300,
	
    //Frequency island information is polled from Redis
    // A negative value disables the feature.
    "ColonyFetchRateInSeconds": 900,
}

Note: The config.json stays relative to binary path.

Web App

The client file "www/config.js" holds some cluster specific information like the grid size.

const config = {
    // Enable requesting of territory tiles.  To work, the AtlasTerritoryMap services needs to be running.
    EnableTerritory: false,

    // Enable requesting of colony information.
    EnableColonies: true,

    //Number of columns in the grid
    ServersX: 15,
	
    // Number of rows in the grid
    ServersY: 15,
	
    //Command completion suggestion
    Suggestions: [
        "spawnshipfast name",
        "spawnbed name",
        "destroyall",
    ]
}

Linking AtlasTerritoryMap (Older method)

Alt text

Point your config.json's TerritoryURL url to a valid base path that is hosting the territory overlay tile images. This is usually the location of your AtlasTerritoryMap binary itself (can be straight ip) or a location that it outputs to. Do note that you must have it enabled on AtlasTerritoryMap's config file "EnableTileGeneration": true,

About

AtlasMapViewer to have a live web view for your own Atlas server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published