New lobby client "framework" is done

New lobby client "framework" is done

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

New lobby client "framework" is done

Post by Ace07 »

https://lolut.utbm.info/svn/taspring_li ... ingClient/

You can find it here if you don't have subversion.


Use subversion to download it to your computer if you want to test it out. The requirements are:

Python
wxPython (wxWidgets API port to the python language)

It should run pretty smoothly. =)

Now we just need to get the networking implimented and the rest should be cake...or so I think... :?

Also note that there is a C++ version that can work (with some editing) in that repository. Someone can download it and make it work if they wish. I plan on continuing to support updates into that directory just in case someone wants to make a C++ client at some point.

EDIT: I also want to see some screenies in Windows if anybody has the time. That way I can fix any wierd bugs you find (that have to do with display) right now.
Last edited by Ace07 on 06 Jul 2005, 03:12, edited 8 times in total.
shnorb
Posts: 147
Joined: 04 Jun 2005, 07:25

Post by shnorb »

=D
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

okay i dled it all and extracted to TASpring... now what??? there is NO visual difference at all. do i need some program or someting (im on XP atm)
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

@min3mat

It's just the source of the gui. There are apparently noting behind. If you want to see the result, you have to compile it.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

um Okay but i'm a noob step by step is the only thing that would help me!!!
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

I'm a python noob too and I can't get it to run on Windows 2000. I've downloaded Python and wxWidgets, but when I try to run SpringClient.py I get the following message:

Code: Select all

Traceback (most recent call last):
  File "G:\temp\client\SpringClient.py", line 33, in -toplevel-
    from gui_lobby import gui_lobby
  File "G:\temp\client\gui_lobby.py", line 61, in -toplevel-
    COLOR_CHANNEL_TEXT = wx.SystemSettings_GetSystemColour(wx.SYS_COLOUR_WINDOWTEXT)
AttributeError: 'module' object has no attribute 'SystemSettings_GetSystemColour'
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

I've got the same problem (I'm a python noob too)
I've take the source from the tar.gz file
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Post by coryrc »

In case this wasn't clear to anyone, Python is being used mostly to build the network framework quickly for debugging and testing, before likely moving to C++.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

colorblind wrote:I'm a python noob too and I can't get it to run on Windows 2000. I've downloaded Python and wxWidgets, but when I try to run SpringClient.py I get the following message:

Code: Select all

Traceback (most recent call last):
  File "G:\temp\client\SpringClient.py", line 33, in -toplevel-
    from gui_lobby import gui_lobby
  File "G:\temp\client\gui_lobby.py", line 61, in -toplevel-
    COLOR_CHANNEL_TEXT = wx.SystemSettings_GetSystemColour(wx.SYS_COLOUR_WINDOWTEXT)
AttributeError: 'module' object has no attribute 'SystemSettings_GetSystemColour'
Interesting, the only time that error would happen is if you didn't have wxPython installed. You installed it from the link I supplied right?

I have edited it a bit to possibly fix it. SystemSettings_GetSystemColor might be incorrect for the version you are using. I changed it so it should work now. If it still doesn't work, then wxPython isn't installed.

Steps:

1. First downlod python from that link and install it.
2. Download wxPython from that link and install it.
3. You should be able to double click on "SpringClient.py" and it should run. If it doesn't, tell it to run it using the program 'python'. I haven't used windows in a long time, so I don't remember how to do that.

That is all there should be to it. We might just have to go bug by bug through this. Just keep telling me when bugs pop up.
NMDANGE
Posts: 36
Joined: 27 Apr 2005, 16:35

Post by NMDANGE »

Hey Ace, what are you going to do for the networking piece? Are you going to use the same protocol as the current client or write a new one?
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

I've tried the new code, and it still doesn't run. I get the following error message:

Code: Select all

Traceback (most recent call last):
  File "G:\temp\client\SpringClient.py", line 33, in -toplevel-
    from gui_lobby import gui_lobby
  File "G:\temp\client\gui_lobby.py", line 61, in -toplevel-
    COLOR_CHANNEL_TEXT = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOWTEXT)
  File "C:\Program Files\Soho\Python24\lib\site-packages\wx-2.6-msw-unicode\wx\_misc.py", line 187, in SystemSettings_GetColour
    return _misc_.SystemSettings_GetColour(*args, **kwargs)
PyNoAppError: The wx.App object must be created first!
And yes, I have wxPython installed (but I don't know if it needs some more configuring).
User avatar
aTTacK
Posts: 90
Joined: 23 May 2005, 13:00

Post by aTTacK »

here a screen how it look like in windows


http://www.chryys.galacticgate.de/nKK/error.jpg

X_X

[edit] oh same like the last poster...
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

NMDANGE wrote:Hey Ace, what are you going to do for the networking piece? Are you going to use the same protocol as the current client or write a new one?
It is must, because I gues he's using .NET for that but it's not good solution as we saw.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Thanks guys, I will see what I can do. Its a very wierd error to be getting... :S

I have updated the source a bit. I took one of the lines out that seemed to be causing the problem.

EDIT: Turns out that there is more than just a few errors. Something with the API's that we are using isn't working correctly. I need to get to the bottom of this, but it might take a while. As far as I have heard, it has worked on Linux fine, so it seems something is wrong with the Windows version of the wxPython API.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

I've tried the new code (revision 74), and the error messages have multiplied:

Code: Select all

Traceback (most recent call last):
  File "G:\temp\client\SpringClient.py", line 51, in -toplevel-
    SpringClient = wxGUI(0)
  File "C:\Program Files\Soho\Python24\lib\site-packages\wx-2.6-msw-unicode\wx\_core.py", line 7473, in __init__
    self._BootstrapApp()
  File "C:\Program Files\Soho\Python24\lib\site-packages\wx-2.6-msw-unicode\wx\_core.py", line 7125, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "G:\temp\client\SpringClient.py", line 38, in OnInit
    lobby = gui_lobby(None, -1, "")
  File "G:\temp\client\gui_lobby.py", line 137, in __init__
    self.list_lobby_1_games = wx.ListCtrl(self.panel_lobby_1, 901, style=wx.LC_REPORT|wx.LC_SMALL_ICON|wx.LC_SINGLE_SEL|wx.SUNKEN_BORDER)
  File "C:\Program Files\Soho\Python24\lib\site-packages\wx-2.6-msw-unicode\wx\_controls.py", line 4502, in __init__
    newobj = _controls_.new_ListCtrl(*args, **kwargs)
PyAssertionError: C++ assertion "nModes == 1" failed in ..\..\src\msw\listctrl.cpp(402): wxListCtrl style should have exactly one mode bit set
good luck with the bughunting ...
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

Wow wxPython on win32 is a cluster!

Post by mother »

I stopped in my tracks because I was going to build it, and having a cygwin environment on my windows machine...

omg no.

I think this might be a clue as to the problems:
Building on Windows

The Windows builds currently require the use of Microsoft Visual C++. Theoretically, other compilers (such as mingw32 or the Borland compilers) can also be used but I've never done the work to make that happen. If you want to try that then first you'll want to find out if there are any tricks that have to be done to make Python extension modules using that compiler, and then make a few changes to setup.py to accommodate that. (And send the patches to me.) If you plan on using VisualStudio.Net (a.k.a. MSVC 7.1) keep in mind that you'll also have to build Python and any other extension modules that you use with that compiler because a different version of the C runtime library is used. The Python executable that comes from PythonLabs and the wxPython extensions that I distribute are built with MSVC 6 with all the Service Packs applied. This policy will change with Python 2.4 and MSVC 7.1 will be used starting with that version.
Thats one major source of concern... What compiler was used to build your python? heh

BTW To need MSVC to compile wxPy, oh the irony.
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

Post by mother »

colorblind wrote:I've tried the new code (revision 74), and the error messages have multiplied:

Code: Select all

Files\Soho\Python24\lib\site-packages\wx-2.6-msw-unicode\wx\_core.py", line 7473, in __init__
    self._BootstrapApp()
Ahh, another suggestion after poking around the wxPython winders site... Try using the ANSI (!Unicode) version. The unicode version uses some magic foo to make unicode happen.

Considering this is really a proof-of-concept to be rewritten in C++, that shouldn't be too limiting.

EDIT* Doesn't matter, the problem seems to be either the different linking OR erg... something else...
Last edited by mother on 19 Jun 2005, 19:56, edited 1 time in total.
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Do I need SVN or what to get into that subversion system?
Edit: ok, SVN worked well.

Edit: Are you sure you don't just lack some important wxWidget .dlls in windows?
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

Post by mother »

Im sure...

Currently trying to get wxPython 2.6.1 to compile w/ gcc on cygwin/win32 :P

Once I got my head out of my, er... Once I realised I could feed the configure script

Code: Select all

--disable-precomp-headers
:roll:

Heh...

If this works I will know that I have python 2.41 and wxPy 2.6.1 all built using the same runtimes... I hope...

EDIT
PS To anyone really curious- PCH is hosed because of how addressing gets wierdly munged in a mutt environment like cygwin/win32, but the address' line up for the first file, so the damn ./configure script says 'ohh goody you have PCH support in your compiler, lets use that!'
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Damn, can't get it to work. I mean the c++ code. Why you guys can't make console based lobby which works?
Post Reply

Return to “Engine”