Home » Stars! Clones, Extensions, Modding » Stars! Extensions » My wheels are turning (A different approach to Stars! management)
Re: My wheels are turning |
Fri, 18 April 2014 21:14 |
|
CrazyBS | | Petty Officer 1st Class | Messages: 68
Registered: November 2010 Location: Portland, OR | |
|
Quote:The rest of your post indicates that you mean to provide a way to "create" or "play" turns, not "submit" turns. (I don't mean to quibble. But I do think that a project of this scope benefits from having as clear a mission statement as possible.)
Yeah, I agree with that. I'll clarify that, we certainly want to be able to work on a turn without using the client.
Quote: From there I'm guessing we could reconstruct most or even all of the files' internals, which would lead to all kinds of great tools, including anti-cheating. Cool
Since the submission of turn data would be in JSON form to the server, there would be a requirement to ensure that the turn data passes sanity tests. We would know about the race of the player and their current research levels/technology through the race file and the M file. So it's all theoretically possible.
The main point of contention is that we will need to be able to get to and from a valid Stars! file to a representation of the data. The idea is this:
public interface StarsGeneratedTurn
{
// Could be streams
public StarsGeneratedTurn(byte[] fileData);
// Represents the same byte[] array passed in. This is the .M file
public byte[] tokenize();
// StarsYearData would be a POJO filled with all the information needed to view the yearly details
public StarsYearData getYearData();
}
public interface StarsTurn
{
// Creates a new turn definition from a generated turn
public StarsTurn(StarsGeneratedTurn generatedTurn); // Creates a new turn definition from a generated turn
// Opens up a previously tokenized turn.
// I'm not sure if we actually need the generated turn here, but could be useful for validation rules
public StarsTurn(StarsGeneratedTurn generatedTurn, byte[] tokenizedTurn);
// This will be the .X file representing the current state of the turn.
public byte[] tokenize();
// StarsTurnData is a simple POJO with a collection of turn information
public StarsTurnData getTurnData();
// The provided data would have edits, additions or deletions from the getTurnData().
// Validation
public List<ValidationErrors> setTurnData(StarsTurnData turnData);
// Validates a turn and returns the results
public List<ValidationErrors> validateTurn(StarsTurnData turnData);
}
As a first stab at it.. that looks pretty good. Now we just have to get the right people to agree to implement it or provide the information to me to do so myself.
The more I think about this project, the more this would be better as a "upgrade" to SAH version 2.0. Mainly adding additional features that allow the players to click on their turn and view it, edit it and submit when they are satisfied. That way the sensitive source code for these files doesn't get into the wrong hands. However, with the JSON representation being the interface to the data, I can build on top of those interfaces and build a useful app to compliment SAH.
--------------------------
Brenton Pyl
Technical Lead
Catalyst IT Services, Inc.Report message to a moderator
|
|
|
|
|
My wheels are turning
By: CrazyBS on Fri, 18 April 2014 03:53
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: CrazyBS on Fri, 18 April 2014 10:37
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: CrazyBS on Fri, 18 April 2014 21:14
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: CrazyBS on Sun, 20 April 2014 19:04
|
|
|
Re: My wheels are turning
By: XAPBob on Mon, 21 April 2014 02:40
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: XAPBob on Mon, 21 April 2014 12:58
|
|
|
Re: My wheels are turning
By: skoormit on Mon, 21 April 2014 15:27
|
|
|
Re: My wheels are turning
By: CrazyBS on Tue, 22 April 2014 20:55
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: XAPBob on Fri, 30 May 2014 09:00
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: XAPBob on Fri, 30 May 2014 15:47
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: XAPBob on Sat, 31 May 2014 03:36
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: skoormit on Fri, 18 April 2014 11:03
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: XAPBob on Wed, 23 April 2014 07:43
|
|
|
Re: My wheels are turning
By: skoormit on Wed, 23 April 2014 09:57
|
|
|
Re: My wheels are turning
|
|
|
Re: My wheels are turning
By: skoormit on Wed, 23 April 2014 09:54
|
|
|
Re: My wheels are turning
|
Goto Forum:
Current Time: Tue Jun 11 20:00:43 EDT 2024
|