New client

New client

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Orakio
Posts: 119
Joined: 25 Aug 2006, 16:41

New client

Post by Orakio »

I'm making a client. It's for my own use primarily, well actually it's going to be more of a bot, the client is secondary. It's open source though. I want to add a few new features such as changing the player's position in relation to fixed, automatic team balancing with things like experience, etc.... It would be designed to be a public bot. So I would like to make it possible for it to try and find maps that people want that it doesn't have, as well as things like commands to change mod, etc.

Source so far
User avatar
iamacup
Posts: 987
Joined: 26 Jun 2006, 20:43

Post by iamacup »

i wouldnt recommend some of these variable names in an OS project :P

Code: Select all

 	public static String enc(byte[] in)
	{
                short[] fuckyoujava=new short[in.length];
                int i;

                for(i=0;i<in.length;i++)
                {
                        fuckyoujava[i]=in[i];

                        if(in[i]<0)
                                fuckyoujava[i]=(short)(128+fuckyoujava[i]|128);
                }

		String out="";

		for(i=0;i<(int)(in.length/3);i++)
			out+=encThree(fuckyoujava,i*3);

		return out+(in.length%3==0?"":in.length%3==1?encOne(fuckyoujava,in.length-1):encTwo(fuckyoujava,in.length-2));
	}
Last edited by iamacup on 13 Sep 2006, 16:29, edited 1 time in total.
Orakio
Posts: 119
Joined: 25 Aug 2006, 16:41

Post by Orakio »

Not my fault java doesn't support unsigned.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Nothing wrong with the language in the code for variable names.
Take a look @ linux source some time i.e
http://www.vidarholen.net/contents/wordcount/

Not as if a normal end-user is gonna notice it.

And in this case showing author annoyance @ java brillant support for unsigned :)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Penguin?
j5mello
Posts: 1189
Joined: 26 Aug 2005, 05:40

Post by j5mello »

linux!!
User avatar
Quanto042
Basically OTA Developer
Posts: 778
Joined: 22 Feb 2006, 03:01

Post by Quanto042 »

LUNIX!!!
Sheekel
Posts: 1391
Joined: 19 Apr 2005, 19:23

Post by Sheekel »

AAAA!
User avatar
Peet
Malcontent
Posts: 4383
Joined: 27 Feb 2006, 22:04

Post by Peet »

Quanto042 wrote:LUNIX!!!

Lunix is a Unix shell for the Commodore 64.
Orakio
Posts: 119
Joined: 25 Aug 2006, 16:41

Post by Orakio »

haha penguin
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

This thread owns.
Orakio
Posts: 119
Joined: 25 Aug 2006, 16:41

Post by Orakio »

So anyway is there an RFC or something for the TASserver/client? It would save me allot of time if I didn't have to keep reading the TASServer source and packet sniffing. Although somethings make sense other things are a little more confusion such as client status, various battle information...

I guess I'd have to find this betalord person.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Orakio
Posts: 119
Joined: 25 Aug 2006, 16:41

Post by Orakio »

Ah excellent, thanks. This is very useful.

I probably would have been able to find that if I didn't make the assumption I'd find everything Server/Client related in the TASClient/TASServer code folders. :/
Orakio
Posts: 119
Joined: 25 Aug 2006, 16:41

Post by Orakio »

I'm still working on this client It's still in an early state but can just about handle joining channels and PMs. If anyone wants to suggest any cool features I might include them.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

The altaclient that zydox and licho use to make game servers has a ton of cool features, you might check that out.
Egarwaen
Posts: 1207
Joined: 27 Feb 2006, 21:19

Post by Egarwaen »

LordMatt wrote:The altaclient that zydox and licho use to make game servers has a ton of cool features, you might check that out.
Especially since Altaric can't maintain it anymore, and a lot of people like the features he added.
Orakio
Posts: 119
Joined: 25 Aug 2006, 16:41

Post by Orakio »

Hmm well I can see some advantages in making a new client. It's primarily for my own use to make a client and bot but if I'm going to make it I might as well make it also useful for other people to make the work more productive. Altaclient seems to be windows only and probably a modified version of the delphi client. A java client would be much easier to port to linux.

Anyway I already plan to have some of the features altaclient has.

I plan to have something to automatically sort teams, base on experience and/or cpu.
Show more info about the unit being selected for restrict.
A few tools for auto colour selection.
Bot commands such as start battle <mod> list mods, end batttle, end game (kill spring.exe), download map <map name> various start rect commands, etc
Feature to set time out for battles.
Command to auto kick things such as bots if people try to add their own, people with low cpu, spectators before a battle starts, etc.
If it's possible I might check out the reply format and see if I can make it run replays other things wont. I've had times where I can't play a replay I should be able to because the mod file has an eirrelevant change.
I haven't investigated the the protocol fully, but it may be possible to trick the server that you have left a game to run multiple instances of spring allowing to host more than one game, if this is possible and there's a headless (no graphics) spring varient available then I may include it as a feature however it may also mess up game time.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

I wasn't suggesting you maintain Altaclient, just that it has a lot of features that people would love to see in your client.
User avatar
Michilus_nimbus
Posts: 634
Joined: 19 Nov 2004, 20:38

Post by Michilus_nimbus »

I've been working on a similar project myself for quite some time now. It's coded in Python, and hosts battles on demand. If you want to see it in action, contact me by PM or try and catch me in the lobby.
Orakio wrote:I haven't investigated the the protocol fully, but it may be possible to trick the server that you have left a game to run multiple instances of spring allowing to host more than one game, if this is possible and there's a headless (no graphics) spring varient available then I may include it as a feature however it may also mess up game time.
I'm afraid the "in-battleroom" status is set server side, so it's impossible to host 2 battles. Unless of course you spawn 2 instances of the same bot.
A "headless" spring doesn't exist (yet), but the option to start it minimized and to make it quit after the game ends will be in next version.
Post Reply

Return to “General Discussion”