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 » 11 Jun 2009, 01:55

[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.
0 x

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post by lurker » 11 Jun 2009, 02:01

Hey, while you're forcing a lobby update make it send the hash of the mod archive itself, probably as an additional param.
0 x

imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

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

Post by imbaczek » 11 Jun 2009, 02:03

preferably md5/sha1 of it and not crc while you're at it...
0 x

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

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

Post by Satirik » 11 Jun 2009, 02:10

* missing file oO
* TeamNo and AllyNo must both be between 0 and 200 (should be enough)
* Side must be positive
0 x

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

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

Post by Satirik » 11 Jun 2009, 02:12

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.
0 x

User avatar
koshi
Lobby Developer
Posts: 1058
Joined: 14 Aug 2007, 16:15

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

Post by koshi » 11 Jun 2009, 02:12

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.
0 x

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

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

Post by Satirik » 11 Jun 2009, 02:14

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 ...
0 x

User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

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

Post by aegis » 11 Jun 2009, 02:15

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.
0 x

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post by lurker » 11 Jun 2009, 02:18

IIRC unitsync does make the archive CRC32 available. You're on your own for anything better.
0 x

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

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

Post by Satirik » 11 Jun 2009, 02:21

lurker wrote:IIRC unitsync does make the archive CRC32 available. You're on your own for anything better.
won't touch unitsync
0 x

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

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

Post by Satirik » 11 Jun 2009, 02:26

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
0 x

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post by lurker » 11 Jun 2009, 02:41

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;
0 x

User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

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

Post by aegis » 11 Jun 2009, 02:52

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.
0 x

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

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

Post by Satirik » 11 Jun 2009, 03:00

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
0 x

User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

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

Post by aegis » 11 Jun 2009, 03:05

did you talk to tobi?
0 x

User avatar
AF
AI Developer
Posts: 20669
Joined: 14 Sep 2004, 11:32

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

Post by AF » 11 Jun 2009, 04:41

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!
0 x

Gedanken
Posts: 121
Joined: 13 Oct 2008, 02:57

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

Post by Gedanken » 11 Jun 2009, 10:34

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 :(
0 x

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 » 11 Jun 2009, 12:35

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.
0 x

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

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

Post by Tobi » 11 Jun 2009, 12:54

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.
0 x

zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

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

Post by zerver » 11 Jun 2009, 14:20

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.
0 x

Post Reply

Return to “Engine”