UnityLobby
Moderator: Moderators
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...).
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...).
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.
In terms of aesthetics I don't think it adds and might throw up cross platform wierdness.
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
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)
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 !!!!
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.
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.
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
2 logic ideas that lead to 2 same AIDLL
1
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
- 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.
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?
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?
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...
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...
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?
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?
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...
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...
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/
the howto of the other thread "svn startup..." doesnt apply for me.
https://taspring.clan-sy.com/svn/spring/trunk/
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
UnityLobby is in svn. Just need todo a to compile a unitsync.so which is needed
also need
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)

Code: Select all
scons unitylobby
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)

-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
Committed atlast
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
- GUI Changes to Displaying Bots In Battle Screen
Added FORCEFROMBATTLE (untested)
Added ADDBOT REMOVEBOT
Added UPDATEBOT (no gui option to change side yet)
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
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
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
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
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
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
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
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
This should do it:
For building mystatus, just send 0 if normal, 1 if ingame, and 2 if away
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)
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49