Archived Game server web API

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Edit: marking as archived as a GSOC 2017 project completed initial implementation.

This has come now and then, most recently in a GitHub issue.

I'm pretty sure we have had some prior discussion on IRC on here in the forum but don't have time to hunt any clues down. DefinitlyEvil from the GitHub issue is interested in working on something like that so I'm making this thread for discussion, hopefully design, and maybe even implementation :)

In short the suggestion is probably best explained by an example: the ability for an external utility like a DynMap analogue to request visual data from the game server to display a map on a website.

How would we enhance the server to be able to serve data like that? Can we hook up some REST API and let the server listen on an additional port if the option is enabled? If we did then how would the server look into the engine/world to serve data?

What can we do with this topic beyond something like a mapping service. A chat bridge between the game and an IRC channel or Slack room? Expose admin utilities for use outside the game? We actually have a brief GSOC-valid issue on GitHub about that topic.

Discuss! And design, I hope :)
 
Last edited:

chessandgo

Member
Contributor
Hunter
Perhaps have other "player enitity" API hooks or sockets of some sorts. The ability to create basicly false players, or hook in existing ones, so It can be feed data about the world.

Imagine instead of having to screen record for lets plays, you could just set a player permissions to something like [streamingExternal: read acess], So an external website could just directly hook into the visual data into player, reducing bandwidth/data needs (although If you want all those fancy graphics, its going to have to have more rendering weight put somewhere, but it on streaming server or client).

And perhaps not even players, just basicly ghost players. Allowing you to basiclly use them as cameras. Perhaps settings like field of view, or the amount of data that it recieves/requests. Settings to allow to writing to movement/key settings (aka, moving the camera), things like that.

It'd be an intresting experiance for server play where viewers can just jump between players point of views, or see them from top down angles or such.


Perhaps this code will be used for some kind of camera mod.






Or perhaps itll be something like world data thats allowed to be read. Like certain chunks being marked as readable by external sources. Cool mechanic if it was something like you can only seen chunks externally once X players have been in them for X chunk age, etc.

Perhaps key files will be used for external sources to make accounts, and such.











In anycase, its pretty intresting idea.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Observers really are just another flavor of player. You'd connect to the game normally and just enter an observer mode where you could jump between players / camera points if configured / desired.

You need to be able to render before you can stream, and at that point you pretty much have a game client. Improvements to the game camera system will help there, but that'll still be game client, not server API :)

This is much more about letting a game server also act as a simplistic web server, responding to a set of simple requests. Chat bridging is a super easy example to visualize. Want to display game chat on a website? Register for a chat hook with some target URL to send chat payloads. Bi-directional? Then also deliver your chat payloads at this URL in soandso format for the server to broadcast in-game.

And yup, reading chunks or some other representation of the world for a mapping utility is another example.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Welcome @DefinitlyEvil :)

Video recording or streaming has come up before, but hasn't been considered a priority since other tools exist that already work fine. With limited available effort we should probably focus elsewhere. So I doubt it'll happen, unless somebody shows up who has a burning desire to make it work for some reason :geek:
 
Top