TASServer update : one int for id team and side !

TASServer update : one int for id team and side !

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

TASServer update : one int for id team and side !

Post by Satirik »

[19:49:02] * CommitBot ====> satirik committed revision 7267 <====
[19:49:02] * CommitBot Modified:
[19:49:02] <CommitBot> Lobby/TASServer/Battle.java
[19:49:02] <CommitBot> Lobby/TASServer/Bot.java
[19:49:02] <CommitBot> Lobby/TASServer/Client.java
[19:49:03] <CommitBot> Lobby/TASServer/TASServer.java
[19:49:03] * CommitBot Log:
[19:49:03] <CommitBot> * MYBATTLESTATUS, CLIENTBATTLESTATUS and UPDATEBOT commands improved. bytecode removed, every parameter is stored in a var and the battlestatus looks like this : TeamNo+"\t"+AllyNo+"\t"+rdy+"\t"+Mode+"\t"+Handicap+"\t"+Side so you can have as many id/team/side you want
[19:49:03] <CommitBot> not tested yet but it should work
[19:49:03] <CommitBot> .
be ready !
Last edited by Satirik on 11 Jun 2009, 02:11, edited 1 time in total.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: TASServer update : one int for id team and side !

Post by lurker »

Hey, while you're forcing a lobby update make it send the hash of the mod archive itself, probably as an additional param.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: TASServer update : one int for id team and side !

Post by imbaczek »

preferably md5/sha1 of it and not crc while you're at it...
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: TASServer update : one int for id team and side !

Post by Satirik »

* missing file oO
* TeamNo and AllyNo must both be between 0 and 200 (should be enough)
* Side must be positive
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: TASServer update : one int for id team and side !

Post by Satirik »

lurker wrote:Hey, while you're forcing a lobby update make it send the hash of the mod archive itself, probably as an additional param.
mmmh and the lobby would get that hash by itself , i mean... without unitsync ?
Last edited by Satirik on 11 Jun 2009, 02:13, edited 1 time in total.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: TASServer update : one int for id team and side !

Post by koshi »

tbh "be ready" my ***

Breaking battles for everyone who is not on auto update is not a good idea imo. This needs a soft transition.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: TASServer update : one int for id team and side !

Post by Satirik »

koshi wrote:tbh "be ready" my ***

Breaking battles for everyone who is not on auto update is not a good idea imo. This needs a soft transition.
no it doesn't need a "soft" transition, as you need latest spring you'll need latest lobby version ...
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: TASServer update : one int for id team and side !

Post by aegis »

Satirik wrote:
koshi wrote:tbh "be ready" my ***

Breaking battles for everyone who is not on auto update is not a good idea imo. This needs a soft transition.
no it doesn't need a "soft" transition, as you need latest spring you'll need latest lobby version ...
not really, and no thank you.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: TASServer update : one int for id team and side !

Post by lurker »

IIRC unitsync does make the archive CRC32 available. You're on your own for anything better.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: TASServer update : one int for id team and side !

Post by Satirik »

lurker wrote:IIRC unitsync does make the archive CRC32 available. You're on your own for anything better.
won't touch unitsync
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: TASServer update : one int for id team and side !

Post by Satirik »

aegis wrote:
Satirik wrote:
koshi wrote:tbh "be ready" my ***

Breaking battles for everyone who is not on auto update is not a good idea imo. This needs a soft transition.
no it doesn't need a "soft" transition, as you need latest spring you'll need latest lobby version ...
not really, and no thank you.
then do it ... and we won't wait 3more years to let you finish your uberserver ... or stfu
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: TASServer update : one int for id team and side !

Post by lurker »

Code: Select all

{since 0.61}function GetArchiveChecksum(arname: PChar): LongWord; stdcall; external 'UnitSync.dll' name 'GetArchiveChecksum';
{since 0.72}function GetPrimaryModChecksum(index: Integer): LongWord; stdcall; external 'UnitSync.dll' name 'GetPrimaryModChecksum';
{since 0.76} function GetMapChecksum(index: Integer): LongWord; stdcall; external 'UnitSync.dll' name 'GetMapChecksum';
Utility.pas already has the function prototypes, really simple for you to run GetArchiveChecksum on both map and mod. You could use this function as a base, even:

Code: Select all

function GetModHash2(ModArchive: string): Integer;
var
  index: Integer;
begin
  Result := 0;
  index := ModArchiveList.IndexOf(ModArchive);
  if index = -1 then Exit;
  if Debug.Enabled then MainForm.AddMainLog('Hashing file: ' + ModList[index], Colors.MinorInfo);
  Result := GetPrimaryModChecksum(index);
end;
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: TASServer update : one int for id team and side !

Post by aegis »

Satirik wrote:then do it ... and we won't wait 3more years to let you finish your uberserver ... or stfu
an incredible amount of attitudes like yours in the spring community are the only reason I'm not committing and deploying my fixes.

uberserver is already in a working state...
the version in the public git repo just has a few threading issues and a cpu issue.
the version in my local repo has some structure + speed improvements, fixed threading, random bugfixes, and isn't getting pushed until I arbitrarily feel like it.

the less jerkish reason for me to leave it private is my current unavailability for live maintenance, which will change soon.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: TASServer update : one int for id team and side !

Post by Satirik »

aegis wrote:
Satirik wrote:then do it ... and we won't wait 3more years to let you finish your uberserver ... or stfu
an incredible amount of attitudes like yours in the spring community are the only reason I'm not committing and deploying my fixes.

uberserver is already in a working state...
the version in the public git repo just has a few threading issues and a cpu issue.
the version in my local repo has some structure + speed improvements, fixed threading, random bugfixes, and isn't getting pushed until I arbitrarily feel like it.

the less jerkish reason for me to leave it private is my current unavailability for live maintenance, which will change soon.
i can start working on TASServer ... im tired of waiting now
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: TASServer update : one int for id team and side !

Post by aegis »

did you talk to tobi?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: TASServer update : one int for id team and side !

Post by AF »

As head of lobby stuff aegis sort of has the power to override you completely and utterly satirik, you should be persuading the guy with the banhammer, not attacking him!
Gedanken
Posts: 121
Joined: 13 Oct 2008, 02:57

Re: TASServer update : one int for id team and side !

Post by Gedanken »

i found a protip secret of the forum :o it is this buttan Image it is really good it makes a box for keeping stuff inside and you can show what is in the box to anyone you choose and nobon else will see! can a mod make it flash or smthn it must be really hard to see? Sorry if this is the wrong thread guys :(
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: TASServer update : one int for id team and side !

Post by Licho »

You know what would be amazing? To finally use hashes that DONT DEPEND ON BASE CONTENT and change with every engine version!

This is incredibly stupid mis-feature that lasts for ages.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: TASServer update : one int for id team and side !

Post by Tobi »

It's actually a good feature, to detect missing / incorrect base content in lobby. It was never meant nor advertised as a way to uniquely identify content, AFAIK.

An extra hash that does not depend on base content would be good though.

And yes, this should still go through unitsync (GetArchiveChecksum, instead of GetPrimaryModChecksum, IIRC), unless we want to let lobbies implement support for *.sdd and *.sdp themselves.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: TASServer update : one int for id team and side !

Post by zerver »

For developers, locking up the files in the base folder for hashing purposes is a real PITA. I keep experimenting with shaders and such and have to switch forth and back between different file versions to be able to play on-line.
Post Reply

Return to “Engine”