Jump to content
SSForum.net is back!

Recommended Posts

Posted

So instead of sending raw stats to the server to be processed, the bot/plugin sends to the site what achievements the user is gaining progress on or completed?

 

The only issue I have with this is the amount of programming it adds. Instead of one site doing everything except gathering stats, you've got multiple pieces of code each doing everything. Instead of a small, simple bot/plugin, you've got a more complicated one that has to do more work (figure out what achievements it's tracking, load progress from storage, check all achievements as events come in). The harder things are on the bot/plugin developers, the less likely they're going to do this.

 

I'm also not convinced that this is the best way to go about things. The amount and variety of the data you'd have to keep in-memory is intense:

  1. Total kills
  2. Kills in a Warbird
  3. Kills of a Warbird in a Warbird
  4. Kills of a Warbird in a Warbird with a bullet
  5. Total deaths
  6. Deaths in a Warbird
  7. Deaths in a Warbird killed by a Warbird
  8. Deaths in a Warbird killed by a Warbird with a bullet

If you just send the data, throw it in a decently optimized database (in-memory tables even), run a couple SQL queries (SELECT COUNT(*) FROM kills WHERE playerId=? AND playerShip=? AND targetShip=?), and you have your answer. (though I admit it's completely possible that I see my way as simpler because its the way I've done things for years.)

 

 

How about both?

 

Sending data for every *watchdamage or *watchgreen item, weapons packet or position packet would be insane. For these things it would be better for the bot to keep track of only what it needed to keep track of (perhaps sending aggregate numbers to the site on a regular basis, how much damage the user did, how many reps they've used, etc...).

 

But, keeping track of all the variations and nuances on the bot side would be equally insane. So send that data to the server. The server can keep a database and run reports and do all it needs to, sending the bot progress reports as necessary.

 

So the bot/plugin can keep track of its own achievements, can send stats to the site, or can do both depending on what the author wants. We can also then cut down how much and how specific the data the site gets, instead focusing on aggregate and long-term data (do 1,000,000 points of damage, for example).

 

Of course, the bot/plugin would not need to send any data it didn't care about.

 

Are there any issues with this?

Posted

The bot itself would be configured to only check for 'this' achievement or 'that' one. So it would only be checking for the pieces of data it NEEDS, instead of sending a lot of (mostly useless) information to the server. Sure, you could have it only send to the server the useful information, but if you 'sort' the needed information out from the rest, you might as well process that piece of information right now.

 

The programming would be the same to determine if an achievement is complete, whether it's coded in the plugin, or in the server.

 

 

I'm also not convinced that this is the best way to go about things. The amount and variety of the data you'd have to keep in-memory is intense:

Total kills

Kills in a Warbird

Kills of a Warbird in a Warbird

Kills of a Warbird in a Warbird with a bullet

Total deaths

Deaths in a Warbird

Deaths in a Warbird killed by a Warbird

Deaths in a Warbird killed by a Warbird with a bullet

Sending all that data to the server would pose a similar; if not greater; problem, I think.

 

Also, CPU "costs" less than bandwidth. The less bandwidth used the better for those who pay for the zone servers.

 

It would have to send data to the server once in a while, of course, but it would only need to send the useful numbers. If an achievement requires one to have 100 kills in a warbird while carrying a flag, it would send the number of kills he had in a warbird while carrying a flag. If a zone has, say, 50 achievements with each 2 combined conditions, that's only 100 values to send in the worse case (that is, if all the values are changed between 2 updates)

If an achievement requires you to get 100 kills in each of the 8 ships, then the plugin would keep 8 values updated on the server on a periodic basis. And you could see the progress on the site for that achievement, for example.

 

That's how I'd do it, anyway. It eliminates A LOT of data you might not need. Like keeping track of all the flags and players at given times. You can just have the plugin do something when one of the events actually occur, instead of tracking everything and then checking if the event has occured in that large chunk of data. You seem to be underestimating the speed at which a plugin or module can process events... Though I understand your concern of abusing the CPU, but as I said, Bandwidth = $$$, CPU not really (I doubt servers will need to be upgraded to run that)

Posted

Okay, you've convinced me.

  1. Admin creates account on website, gives arena information, gives bot IP address, gets arena ID
  2. Admin gives arena ID to bot configuration, starts bot
  3. Bot connects to stat server
  4. Bot gives a hello that provides definitions of the achievements tracked by the bot (achievement ID and title)
  5. Admin can now give descriptions and icons to the achievements
  6. Bot begins sending progress reports to the stat server

I'm going to do some experimenting with the stat server itself (separate from the site, having to do HTTP requests for each progress report would be bad. Perhaps I should call it the stat responder). I should have something ready for comments soon.

Guest
This topic is now closed to further replies.
×
×
  • Create New...