UnityLobby - Page 35

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

own3d
Posts: 129
Joined: 25 Aug 2006, 16:31

Post by own3d »

hollowsoul wrote: I rather just code up a gtk version of setup & not increase bloat / dependencies where i can.
That sounds good to me something under the label "Setup Wizard" would be good which guides the user through setting up key options like name, accounts and graphics etc.

If you look at this thread there is real support for a toggle-able parent window for unity similar to the one I posted. I think its more user friendly because I for one would not look in the taskbar once I've just started an application I look for window. Maybe have it one first run and it can be disabled in the options.

Being toggle-able the user could choose whether they want it or not so it would appease all including yourself in that regard.
10053r
Posts: 297
Joined: 28 Feb 2005, 19:19

Post by 10053r »

Thanks hollowsoul. It turns out it has nothing to do with fullscreen mode. I was not in any chat channels, so it can't be that (other than the battle channel, of course). It may be that it happens anytime there are spectators. That is my current theory, at least. I will attempt to continue to figure out exactly which actions trigger it.
own3d
Posts: 129
Joined: 25 Aug 2006, 16:31

Post by own3d »

10053r wrote:Thanks hollowsoul. It turns out it has nothing to do with fullscreen mode. I was not in any chat channels, so it can't be that (other than the battle channel, of course). It may be that it happens anytime there are spectators. That is my current theory, at least. I will attempt to continue to figure out exactly which actions trigger it.
I get the same same error under these same conditions, also occurs when you yourself are a spectator.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

:|
Ok last time i gonna mention is damn impossible for that error to be caused by Battle code.

Its caused by clientstatus bug in either user list (abstracted), Channel Listings, PM Listings. Now if u want recreate the bug in a lan running your own TAServer copy.

As the bug is somewhere in clientstatus code where index value is not present in list data type. Now remember while u are online in a battle, u are receiving info from lobby server constantly i.e other people Starting Battles, (going AFK if using TASClient shortly after entering battle), Leaving Battles, Going AFK, Present, Rank increase. Also receiving a clientstatus for each person that joins server. Just cause it happens in Battle Screen means nothing really, unless u happy to recreate using a local TASServer running & log all the server commands sent, so can be reproduced.

Personnally i more interested in rewrite, already have alot of ideas & getting basics coded. Will be very nice when done... with some features other clients dont have yet
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Hollow, in MSN Messenger when It needs to display a webpage it brings up internet explorer, the same with tasclient, teamspeak etc. You dont need a browser integrated with Unity Lobby to display html. Just make it ask the Linux environment to load the browser with that url.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Which assumes web browser user is using is compatiable with whats been displayed i.e rendered right in opera / firefox / epiphany / khtml etc..., and that they have one. And also if not integrated into client, looks wrong & cheap.
I gonna code it in gtk & qt simple as ....


Besides adding multiple language support via gettext (if installed, should be in all distros by default). Be a pain to auto generate a html doc each time for language in question

Also add better error logging & logging of server commands, so can debug exact message that cause a crash.

Also adding UPNP, and GUI error reporting when spring crashs out & display the Standard Output (what u see in console) in GUI Window.

And splitting updating Mod & Map Cache to a seperate python script. So can update Maps & Mods while UnityLobby is running.

So got alot todo & big plans for next release, plus in generally a gui overhaul
User avatar
Relative
Posts: 1371
Joined: 15 Oct 2006, 13:17

Post by Relative »

hollowsoul wrote:Which assumes web browser user is using is compatiable with whats been displayed i.e rendered right in opera / firefox / epiphany / khtml etc..., and that they have one. And also if not integrated into client, looks wrong & cheap.
I gonna code it in gtk & qt simple as ....
It's highly unlikely that someone is running a Linux distro that is so striped down it doesn't have a browser and can't render HTML. Sorry if I offend, but I think you are being a little overly neurotic about compatibility.
Last edited by Relative on 02 Feb 2007, 18:04, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Do you have any design notes? Diagrams of what you think it should look like?
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

The problem is i dont like opening up a webbrowser to configure UnityLobby its a gtk / qt application.

Also html will be a pain to implenment multi-language support versus

Code: Select all

print _('hello world')
And string is translated via gettext into Local Lnagugae defined by enviroment variable LANG. And ability to package translations for strings that arent in the gettext package.

Mixing in a web browser for GUI (& not for opening up html links in lobby chat) is plain wrong & i not gonna do it. Not when there is a better way....

As for beening over the top. Dont like answering questions multiple times,
If u dont like my UI choices, ask AF to implentment them..
i.e i am all ready redoing GUI so DockApp is not gonna be used as a main hook into GUI.

Been working Mon-Sat for last few weeks, rougly 50 hours aweek. Hopefully finished now...
So sorry i dont care about having patience to debate why i dont want to bloat app with a html webpage interface, when gtk / qt will work just aswell.

Plus whole reason of rewrite is for newer features & reduce cpu usage.

Rewrite will have abstracted code, so if someone wants to they can write up a webpage frontend, but i wont be.
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

I'm with you on this hollow.

As long as we get a working lobby and can do all the stuff tasclient can do, i'm not bothered, any extras would just be plain cool.
Word
Posts: 80
Joined: 12 Jun 2006, 09:59

Post by Word »

I -am- with hollow on this one anything web-based in a program should be avoided like the plague.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

I took some time to look at current unity from svn and here are some comments.

general comments:
- Timer class should live in its own module

client/Battle.py:
- gtk columns, renderers, etc. should probably live in lists, as having one variable for each increases clutter, but more importantly, you then don't have to make ten calls to some_method, just one in a loop.
- popup_menu: don't know the internals of gtk, but does it really have to be created on the fly _every_ time?

client/Lobby.py:
- a HUGE elif chain. this is seriously ineffcient, consider using a lookup table like this:

Code: Select all

lookupTable ={'PONG': self.client.messageQueue.put, ...}
...
lookupTable[command[0]](command)
This will perform much better and will be easier to maintain. Alternatively, you could make a set and check for existence:

Code: Select all

commandSet = set(('PONG', ...))
...
if command[0] in commandSet:
    doStuff
The second way should perform the same as the first, which to choose is a matter of taste.

- isSomething: could be reduced to one-liners without loss of clarity:

Code: Select all

        status = self.status
        if (status & (1 << 6)) != 0:
            return True
        else:
            return False
tranforms into

Code: Select all

F_BOT = 1<<6
...
      return bool(self.status & F_BOT)
- multiple something != None. This isn't that wrong, but isn't that correct either. The pythonic way is

Code: Select all

something is not None
- not very pretty:

Code: Select all

cmdToSend[:19] == 'UPDATEBATTLEDETAILS'
it is a little bit too much work for the programmer to count how long the command is :) that's what startswith is for:

Code: Select all

cmdToSend.startswith('UPDATEBATTLEDETAILS')

That's it for now, hope it's of some use.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Some very nice code suggests will add them in, thx.
Most / all of them wasnt aware of :roll:

And yeah most / all of the code could do with overhaul, thus why i though it be better for a rewrite.

Its beening completely overhauled atm

i.e File Layout so far

Code: Select all

Unity/
Unity/Unitysync  <seperate program for updating cache lives here>
Unity/Misc  < misc classes to be used for various frontends & abstracted data>
Unity/Lobby
Unity/Lobby/GTK-2.6
Unity/Lobby/GTK-2.10
Unity/Lobby/QT
Unity/Lobby/Resources <images used in lobby client>
Also splitting up the various things into proper classes & rewritting alot. Since learned abit since i started off learning python & pygtk. Also went out and got a book on python from O'Reilly, i.e so can look up performance issues with various data types.

Atm finishing of Unity/Unitysync <seperate program for updating cache lives here> with storing cache in xml file (ElementTree) with support for different backends if someone rights up a class with same functions.
Just taking small break atm, while i think i best way to store updated info in its own node, based on client frontend & profile. So frontend doesnt need to update its entire map / mod listings. If user just adds a single map / mod
User avatar
Relative
Posts: 1371
Joined: 15 Oct 2006, 13:17

Post by Relative »

@Hollowsoul, Word, clericvash

I think there was a misinterpretation on both ends. I thought we were talking about the client opening the browser (firefox, Mozilla, Opera etc...) for things like links in the chat room, or a readme text file. I was not suggesting setting up a HTML configuration utility for the client. Sorry
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

Regards to the current version in the svn, what are its dependancies (and versions)? Trying to run it on Mac OS with no luck.. probably missing something obvious..

Edit: rebuilt all known dependancies and checked paths, still no luck├óÔé¼┬ª
own3d
Posts: 129
Joined: 25 Aug 2006, 16:31

Post by own3d »

own3d wrote:The libraries you need, this is for Ubuntu but it should be similarly named on mandrake:
subversion
scons
libsdl-dev
libopenal-dev
libglew-dev
libboost-dev
libboost-thread-dev
libboost-regex-dev
libdevil-dev
libfreetype6-dev
python2.4-dev
zip
7zip

For unity lobby:

pygtk-2.10
pygtk-2.10-dev
gtk-2.10
gtk-2.10-dev
python-2.4
python-2.4-dev
python imaging library (PIL)
python imaging library (PIL) dev

the names might not be the same especially for the last two but find their equivalents.


my first guess if you have all the required spring libraries and Unity lobby libraries is to try the svn version

Code: Select all

svn co https://taspring.clan-sy.com/svn/spring/trunk/
Also librsvg
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

have all as stated there...

Code: Select all

File "/Users/elio/spring/buildwork/trunk/UnityLobby/client/Lobby.py", line 355
, in __init__
    self.client_localIP =  socket.gethostbyaddr(socket.gethostname())[2][0]  # T
ODO Add Option to select different interfaces
socket.herror: (1, 'Unknown host')
to irc :P

thanks to hollowsoul problems located.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

I don't think xml will be a good idea if you don't need to interoperate with any other lobby. For persistent python objects in their simplest form, check out the standard module shelve, or pickle/cPickle if you need finer control. There's also xmlpickle somewhere in the cheeseshop, I believe.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Blah its done...
using Elementtree

Basicly a seperate python script to update the mod/map cache file
But with a console switchs to pick which backengine & files to use for maps/mods cache.
Basicly to import the class (based of if statement using options.engine value) class to import <foo> & self.cache = foo()

Seperate prog since python isnt really multi-threaded. And unitsync using up a lot of cpu & may cause a lobby timeout. Thus seperate prog... only needs to run @ start / force update / when user drags & drops mod/map files on client for it to auto-install them

So be easy enough to add support for different back engines and allow using in clients to choose one, once other classes use same function names....

Using xml by default, cause splitting up UnityLobby code to seperate bits & abstracted.
For different GUI's & maybe someone will feel liking coding up a different gui or channel bot & hosting bot. Someone might also code up a lobby proxy (shrugs). Thus original picking xml for possible other coders, & less for me to learn as will use for spring options aswell.
Will code up others back engines later on...

Anyway next thing todo, is start on gtk & qt gui's.

Besides that gonna lose code for windows, (annoying hard to get spring to compile on windows).
Sylfurd
Posts: 6
Joined: 05 Feb 2007, 01:50

Post by Sylfurd »

hi ! :-)
I'm new in TASpring on linux and thent UnityLobby, and I have to say it's an awesome work, gratz :-)

I have a problem yet ...

I haven't seen this issue on the board, but when I try to connect to lobby server, I've got an error saying that I have to updta to a newer version, and that my UnitLobby version = 0.33 and that the compatible ones are the versions 0.31 & 0.32 :(

I'm trying to connect to taspringmaster.clan-sy.com

if anyone knows the issue, thx to answer :-)
Locked

Return to “Linux”