Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

Advertisement

Hello, visitor! These forums are run off of the revenue generated from these ads. If you'd like to support us, please whitelist us or consider donating:

#1 2018-06-03 00:28:42

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

[RELEASE] Minimap Viewer

Minimap Viewer

Get minimaps of your world programatically via a simple URL.

What does it do?
It gives you an image of your world.

Are the images realtime?
No. The image of your world is generated when the URL is called by the saved data in BigDB ( i.e. it generates a minimap of you world as of how it looks when you last saved it ).
Afterwords, the images are cached for one hour so it should load faster after the initial loading.

Do you only save the images of the world?
Internally, I use World to serialize the worlds to a JSON file before saving.
The world data is saved to my harddrive, so if you have ever used my service at one point you can theoretically recover it.

How do I use it?
Simply link an image over to https://api.sirjosh3917.com/world/minimap/<worldid> and let the API do the rest.

Is it case sensitive?
Yes.

What if it errors?
Use the ?format=<type> query to receive errors in JSON if you so wish it to be. Example of an error.

How accurate is the minimap?
Pretty accurate, though it could be better. It (should) handle transparency and the like just fine, though I haven't tested this in depth.
It'd be great if I could have some worlds with lots of transparency so I can compare the original minimap with the generated one and see how well it does.

How do I know it won't die immediately like the last one you made?
I'm hosting this one on a VPS so it won't kill my internet and it'll be faster for all of you.

Does it respect worlds with MinimapEnabled set to false?
Yeah.

Does it respect visible false?
Yeah.

Example of it working?
v | See below | v

PW01
PWL17t1R6bbUI
PW5m6ANVwRcEI

Last edited by ninjasupeatsninja (2018-06-12 11:16:59)


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

#2 2018-06-03 01:14:28

hummerz5
Forum Admin
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,797

Re: [RELEASE] Minimap Viewer

Cool!

ninjasupeatsninja wrote:

Does it respect worlds with MinimapEnabled set to false?

does it respect worlds with /visible false?

Offline

Wooted by: (4)

#3 2018-06-03 05:54:51

icepegasus
Member
Joined: 2015-08-21
Posts: 49

Re: [RELEASE] Minimap Viewer

hummerz5 wrote:

does it respect worlds with /visible false?

I don't think that's an issue. People with visible false don't want other players joining their world. They don't care about minimap (that's how I see it)


user.php?id=icepegasus

Offline

Wooted by:

#4 2018-06-03 06:51:18

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

Let's settle it with a poll.

Straw poll/

It ends on June 9th 12:00 AM UTC time.

If anybody knows of any good strawpoll alternatives, let me know.

The API will, for now, be built to respect both 'MinimapEnabled' and 'Visible' until the poll results come in.


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

#5 2018-06-03 09:07:28

LukeM
Dev Team
From: England
Joined: 2016-06-03
Posts: 2,435
Website

Re: [RELEASE] Minimap Viewer

I guess visible false could sometimes be used to keep worlds a secret until they are released, so might be best not to show the minimap if it's not visible.

Offline

Wooted by: (3)

#6 2018-06-03 13:00:55

capasha
Member
Joined: 2015-02-21
Posts: 3,595

Re: [RELEASE] Minimap Viewer

Looks good. Maybe you should try to make something similar in JavaScript.
LukeM know how to code in JavaScript maybe he can help you with databases?

Offline

#7 2018-06-03 13:47:23

LukeM
Dev Team
From: England
Joined: 2016-06-03
Posts: 2,435
Website

Re: [RELEASE] Minimap Viewer

capasha wrote:

LukeM know how to code in JavaScript maybe he can help you with databases

No idea how I've managed to completely avoid such a huge part of online programming but I've never actually used a database XD

Edit: Also what do you mean by make it using javascript? Make something you can run client side to generate the minimap? (This is a serverside program so it shouldn't matter what language it is written in, you can make a request from pretty much any language)

Last edited by LukeM (2018-06-03 13:49:56)

Offline

Wooted by:

#8 2018-06-03 14:07:21

capasha
Member
Joined: 2015-02-21
Posts: 3,595

Re: [RELEASE] Minimap Viewer

LukeM wrote:
capasha wrote:

LukeM know how to code in JavaScript maybe he can help you with databases

No idea how I've managed to completely avoid such a huge part of online programming but I've never actually used a database XD

Edit: Also what do you mean by make it using javascript? Make something you can run client side to generate the minimap? (This is a serverside program so it shouldn't matter what language it is written in, you can make a request from pretty much any language)

Hasn't you made bot's before in JavaScript? Shouldn't be that hard to use database objects that way too if you are good at JavaScript.
Atilla have had so many issues to run as example mono programs. So I guess it would happen the same for ninja.

Offline

#9 2018-06-03 14:08:51

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

capasha wrote:

Looks good. Maybe you should try to make something similar in JavaScript.

Already have. You can use jsparse to feed it some "init" data, or just load from the BigDB, deserialize that, and make a minimap as well.
Not sure how that went unnoticed https://wiki.everybodyedits.com/images/c/c0/069_LOL

capasha wrote:

LukeM know how to code in JavaScript maybe he can help you with databases?

All I need to do is parse the BigDB, and atilla's World library does that just fine. It'd just need to be "ported" to javascript.

Last edited by ninjasupeatsninja (2018-06-03 14:09:07)


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

Wooted by:

#10 2018-06-03 16:15:13

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

Open sourced the inner MinimapViewer API.

This is what the official API will use internally to get and fetch minimaps.
I rewrote the first MinimapViewer and open sourced it in case anybody wants to make their own custom alternatives.
Please review the source code and suggest improvements
The code in the github repo will go into effect on June 9th. Expect that by June 10th UTC time, the official API will use these improvements


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

Wooted by: (2)

#11 2018-06-12 11:14:32

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

The MinimapViewer API is now running the updated version of the code.

New link shorteners: minimap.sirjosh3917.com and mm.sirjosh3917.com
If you like the MinimapViewer API, please woot the suggestion topic for it

The official API is running off of this code right here
There are a few new features:

Feature Note:
You can append a ?format=x to the end of a /metadata or /worlddata request to get it in a different format. Supports json, xml, csv, defaults to a custom (awful) format, plaintext.

Old links to /world/PW01 as images will still work, though it's recommended to update them.

Last edited by ninjasupeatsninja (2018-06-12 11:52:51)


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

#12 2018-06-12 18:09:30

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

MinimapViewer Updated & Fixed

New (left) v.s. Old (right)
explorer_2018-06-12_13-04-33.png

Minimaps now handle transparency and background colors properly.
See the commit for more details.

The API will be back up in under 20 minutes


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

#13 2018-06-12 20:07:37

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

New Update

More detailed error messages
See the Settings.CS file for detailed information on what errors look like

{"Error": "The world does not exist in the BigDB (or the world was unable to be loaded). Please check that you spelled the World ID correctly."}
{"Error": "World disrespects the guidelines:\r\nThe world's MinimapEnabled setting (False) doesn't match the desired MinimapEnabled (True)"}

Update will be applied in under 20 minutes, please wait for the API to restart.


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

#14 2018-08-28 05:19:35

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

Expected Downtime

There will be downtime for an unspecified period of time, perhaps a long one.
I will be moving from NancyFX to ASP.NET Kestrel ( asynchronous request performance ) and on .NET Core ( new DotNetCore binaries from PlayerIO ), and this will require a major rewrite to do things properly.


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

#15 2018-09-03 06:56:56

ninjasupeatsninja
Member
From: USA
Joined: 2015-04-05
Posts: 1,939
Website

Re: [RELEASE] Minimap Viewer

Laziness

To be entirely honest, I don't feel like re-coding the MinimapViewer API despite it badly needing one.
However, it has beem moved to ASP NET with Kestrel using fancy asynchronous stuff (true async, not the bullcrud nancy does) and it's mostly a hackjob of how it's up and running (caching was removed, a few other things), but at least it's up and running.


Support the MinimapViewer API for images for worlds on the forums. Example:
PW01
firefox_2018-06-28_22-29-06.png

Offline

ninjasupeatsninja1535954216722970

Board footer

Powered by FluxBB

[ Started around 1540222011.8189 - Generated in 0.051 seconds, 12 queries executed - Memory usage: 1.43 MiB (Peak: 1.64 MiB) ]