Mythruna
April 24, 2024, 05:31:19 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Pre-Alpha API  (Read 18484 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #15 on: July 05, 2013, 02:19:43 AM »

With this API, would it possible to add a sort of "query answer" plugin? You query the server with a certain command/string and the plugin return you the number of players connected, the version of the server....

It could be very usefull for my list (http://mythruna-servers.com/).

This is the API for game plugins, server or client.  You could write a plugin that wrote that information to a file (that's what my server status page does) or whatever.  It's not the game server's job to handle these sorts of requests really as its better handled externally.  The hooks let you catch and write the latest data, though.
Logged
Endimmion
Donators
Newbie
***
Posts: 12


View Profile WWW
« Reply #16 on: July 05, 2013, 03:25:18 AM »

This is the API for game plugins, server or client.  You could write a plugin that wrote that information to a file (that's what my server status page does) or whatever.  It's not the game server's job to handle these sorts of requests really as its better handled externally.  The hooks let you catch and write the latest data, though.


This solution is only valid if you host your server and the status page on the same server. If someone register his server on the list, he need to give me access to his file system to be able to know how many players are on his server. That's not imaginable.

So in the future, server owner will have to use such a complicated method just to be able to get something so simple as the number of players connected?


Every game with a server for the past years has a query protocol. I don't really understand the problem you have with that.

Logged

pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #17 on: July 05, 2013, 11:51:05 AM »

This is the API for game plugins, server or client.  You could write a plugin that wrote that information to a file (that's what my server status page does) or whatever.  It's not the game server's job to handle these sorts of requests really as its better handled externally.  The hooks let you catch and write the latest data, though.


This solution is only valid if you host your server and the status page on the same server. If someone register his server on the list, he need to give me access to his file system to be able to know how many players are on his server. That's not imaginable.

My server and status page are on two different servers and I transfer the status page over to the web server as part of the update.  It was the easiest way for me to get it working.

So in the future, server owner will have to use such a complicated method just to be able to get something so simple as the number of players connected?

Every game with a server for the past years has a query protocol. I don't really understand the problem you have with that.

Anyone can add this as a mod.  However, in general it's the single easiest way to DoS a server, too and a pretty large time sink on my part to get it "right".  I have other parts of the game to worry about at the moment.

A server list service could also support a REST API that the server could call to update it with recent info periodically.  There are a variety of ways to implement this feature and nothing stops a modder from doing it themselves.

However, the API discussed in this thread is for mods to access.  It's part of what a "server status mod" would use to do its job but it is not remotely query-able info on its own.  A mod that wanted this support would have to add it... and it's a completely different network connection type than the normal game connection.
« Last Edit: July 05, 2013, 01:35:33 PM by pspeed » Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #18 on: July 05, 2013, 12:00:13 PM »

I actually went ahead and added Paul's Mythruna-Core.jar to my build path on eclipse. Tongue
Later (or alpha) I may mess with the Mythruna-Client.jar to change up some of the client designs Smiley
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #19 on: July 24, 2013, 07:20:38 AM »

I would like to note that if anyone would like to help to make this pre-alpha api and contribute to it, visit the github repo @ https://github.com/Shzylo/Mythruna-Pre-Alpha-API.. and add a new file, edit one, ect. Thank you if you decide to help Smiley
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #20 on: September 14, 2013, 08:35:17 AM »

I have started to write the API in java as well, and all I have to show are examples on github now. If you don't like just having the examples, please give me some feedback about it, and if you guys know about any good free websites with rich-text editors it would be nice for you to inform me, ESCPECIALLY if it has a code block thing Wink
« Last Edit: September 14, 2013, 08:37:30 AM by Shzylo » Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!