UnityLobby - Page 30

UnityLobby

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Locked

What would u like to see implentent next (after next release should be tomorrow or day after at most)???

Poll ended at 20 Jul 2006, 01:04

Direct IP Multiplayer Games
7
54%
Chatroom (chat only for the moment)
1
8%
More Options for Configure Section
2
15%
More Options for Skirmish Section i.e colors teams spectators etc
3
23%
 
Total votes: 13

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

Post by imbaczek »

Nit: showing full path of AI so isn't required and may even be a security concern. os.path.basename is your friend.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It also breaks AIs in network games if your AIs arent in that specific path. It also breaks tasclient and aflobby compatability.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

The path is only informative as far as I know because the AI is (should be) only loaded on the player that added the bot (AIs dont run as synchronized code after all...). Even the different extension would be a problem otherwise...

So including the path is only an estheatical and possibly security issue, but not a compatibility issue (unless TASClient or AFLobby crashes on slashes in AI names or something stupid like that...).
own3d
Posts: 129
Joined: 25 Aug 2006, 16:31

Post by own3d »

In terms of security I would say it doesn't make alot of difference if somone can get onto your pc they will find what they are looking for reguardless of whether you tell them or not. Besides why would they do that to get an ai when they can get it off unknown-files.net ?

In terms of aesthetics I don't think it adds and might throw up cross platform wierdness.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Such a damn small thing,

Worse case scenario, someone will figure out your distro.

1) Wait till i get around to rewrite the Lobby.py = Lobby Connection Code so can take advantage of below. (talking weeks / 1-2 months, the way work hours is going atm)

Code: Select all

The message ID has only one function: to ease tracking server responses for the client. Using message IDs means that client can also use synchronous communication (with certain commands), which makes it easier to implement certain command that require multiple responses in both directions.
This wont happen till i get multiplayer done. Hoping to get time to finish code this Friday

Otherwise i would have to add ulgy hack that wont always work 100% so not gonna do that. Plus Lobby Server doesnt have ADDBOT FAILED command. So it gets ulgy to keep track of ADDBOT & where exactly the {AIDLL} is ( edit: without using message id above )

Especially, when its possible to have multiple {AIDLL} of exact same filename when using multi-datadir on linux !!!!
Last edited by hollowsoul on 16 Jan 2007, 22:30, edited 1 time in total.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

Hey, it was only a nitpick, after all 8) Keep up the good work, lots of people are counting on ya.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Especially, when its possible to have multiple {AIDLL} of exact same filename when using multi-datadir on linux !!!!
This should be avoided at all costs by linux users.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

2 logic ideas that lead to 2 same AIDLL

1
  • Spring installed via package i.e ebuild / rpm / deb
    User doesnt have root access so cant overwrite files, or has root password but doesnt want to overwrite files incase it messes with linux distro package system i.e leaving the altered files behind when uninstalling

    So user installs newer pre-compiled versions in another datadir i.e ~/.spring where they have write access to. Now u have 2 AIDLL with same names
2
  • AI Dev has spring installed from package. AI Dev decides to test out latest one via ~/.spring/..... . So no hassle with renaming files & easier / faster, and also bonus of testing new version against old version. Without messing with spring for other users on same machine.
To sum it up , simply fact absolutely no reason for lobbies to limit whats possible with spring. If there is another decent way around the problem in question. i.e thus why UnityLobby supports multiple installs of spring (except for major changes to unitsync atm)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

tasclient doesnt support it and linux users use tasclient in wine atm. Thats why I said it. Also it confuses chainloading AIs, although at this very moment in time the only chainloading AI thatspublicly released and has a use is hugh perkins mono .Net interface.

And out of curiostiy, if you specify aai.so and you have multple aai in several locations, how does spring decide which one to use?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

If no full path is given in the startscript (but AFAIK UnityLobby gives the full path) then the first one it finds is used. It checks data directories one by one in determined order (as shown in infolog.txt, on linux).

I doubt it causes problems with TASClient for reasons mentionned in my previous post, please read it. And TASClient on linux in wine will never support data directories anyway so it isn't a problem with that - that's a workaround solution anyway...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Unless your the host running in wine on linux and you have 6 aais in every folder but the one tasclients in. But yah I get what you meant, but I wasnt referring to including paths at the time.

And how does it determine the order to check data directories? I take it that all these extra directories are defined in a file, thus they'd be checked in the order they're listed?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Then TASClient wouldn't find them at all, as it has no notion of multiple data directories because it uses the Windows unitsync...

It's the usual order, ie. environment variable overrides ~/.springrc overrides /etc/spring/datadir overrides the hardcoded datadirs. Look at one of my sticky posts in this forum for details...
Rudirogdt
Posts: 82
Joined: 18 May 2006, 18:00

Post by Rudirogdt »

so how do i build a client with the svn stuff?
the howto of the other thread "svn startup..." doesnt apply for me.

https://taspring.clan-sy.com/svn/spring/trunk/
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

UnityLobby is in svn. Just need todo a

Code: Select all

scons unitylobby
to compile a unitsync.so which is needed
also need
  • pygtk-2.10
    gtk-2.10
    python-2.4 (2.5 untested)
    python imaging library (PIL)

Small Update
, no commit yet. Need to fix a few small things i broke while changing some Bot Code around. Should get some time to finish it & commit tomorrow. Bot Commands == Done.

After commit, just need to add raw support for Unit Restriction & Map Starting Positions, for compatiable multiplayer between TASClient V UnityLobby.

Below is small screenshot, changes in work == removed dialog for asking Bot Name ( will add popup window to rename bot in future, but putting on hold till rest till weekend. Want to get multiplayer working first, hopefully tomorrow.

Also removed displaying sync & ready images for bot(s), unneeded & TASClient doesnt update sync (and bot's ready) status so no point.
And lastly automatic naming for Bots (gathers list of bots, and picks first Bot(X) where X == 1 -> 16 (max number of teams / bots)
Image
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Committed atlast
  • GUI Changes to Displaying Bots In Battle Screen
    Added FORCEFROMBATTLE (untested)
    Added ADDBOT REMOVEBOT
    Added UPDATEBOT (no gui option to change side yet)
If i get time tomorrow will add gui code so host / bot owner can pick different sides (note:- works in offline games).
And also check that FORCEFROMBATTLE is working right, didnt get to test (i.e kicking player from your battle).

Left todo for multiplayer is the following raw support i.e as in using for creating script.txt. Not displaying... aiming for compatiable client before i enable multiplayer
  • ADDSTARTRECT
    REMOVESTARTRECT

    DISABLEUNITS
    ENABLEUNITS
    ENABLEALLUNITS
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

No real news yet,

I should have multiplayer working tomorrow some time around 5pm GMT.

Main problem is bitmasks drive me mad atm, just realised need to send MYSTATUS, so other clients know that host is ingame & thus battle == underway.

Only problem is bitmasks for me, current code for bitmasks i got off other people...

Anyway if anyone got time and care to whip up some code for encoding a MYSTATUS would help speed things up & save me trying to figure it out

Link for MYSTATUS info
http://spring.clan-sy.com:8202/protocol ... TUS:client
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

so you've yet to actually start a multiplayer battle with Unitylobby?!
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

What does that question have todo with me asking for help with bitmask for encoding MYSTATUS ?

Yes i have created multiplayer battle's with UnityLobby, but i dont want to release an incompatiable client in the wild.. i.e only work UnityLobby Versus UnityLobby.

No point having client that can host & join & start a battle, if it doesnt create script.txt properly i.e ignoring Starting Positions / Unit Restrictions & if it doesnt update the Battle as beening underway.
Pointless since peep can just run TASClient in wine

Just need to finish off code for Starting Positions & Unit Restrictions == almost done, and add code for MYSTATUS.


As i said it will be working in a few hours time, be faster if someone who knows bitmasks & python to help create the code. So i can finish the multiplayer, release it & then have the rest of weekend free
User avatar
Michilus_nimbus
Posts: 634
Joined: 19 Nov 2004, 20:38

Post by Michilus_nimbus »

This should do it:

Code: Select all

def make_status(status):
    #all except rank are bools. status is an int
    #ripped from TASServer/Client.java
    ingame = (status & 1) is 1
    away = ((status & 2) >> 1) is 1
    rank = (status & 28) >> 2
    moderator = ((status & 32) >> 5) is 1
    bot = ((status & 64) >> 6) is 1
    return (ingame,away,rank,moderator,bot)
For building mystatus, just send 0 if normal, 1 if ingame, and 2 if away
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

cheers Michilus_nimbus exactly what i was looking for.
Now for a small break (just back from work & will finish off the code)
Locked

Return to “Linux”