New lobby client "framework" is done - Page 2

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

Post by Ace07 »

Cheery wrote:Damn, can't get it to work. I mean the c++ code. Why you guys can't make console based lobby which works?
The C++ will not compile without some work involved. Trust me. :lol:

Its just there for a developer who wants to pick it up and work on it.

@mother: You cannot compile *.py files. They are interpreted at runtime.... (ie 'python SpringClient.py')
@Cheery: Something is definitely missing, but I am not sure what yet... :cry:
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

What about lobby_main.cpp and .h in cpp.gen?

I think I didn't manage to get the wxwidgets to work anyway so I removed whole crap and test again later maybe. There came so much errors from that code...

Thought one intresting thing I found with linkable libraries I haven't seen before. So I'm pretty sure I'll get back there until checking some things.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Cheery wrote:What about lobby_main.cpp and .h in cpp.gen?

I think I didn't manage to get the wxwidgets to work anyway so I removed whole crap and test again later maybe. There came so much errors from that code...

Thought one intresting thing I found with linkable libraries I haven't seen before. So I'm pretty sure I'll get back there until checking some things.
main.cpp is the location of the "main" event loop in wxWidgets. If you want to get it to work, you need to learn the wxWidgets API. (the one cool thing about it is that you shouldn't need to include windows.h)
Last edited by Ace07 on 20 Jun 2005, 08:20, edited 1 time in total.
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

Post by mother »

EDIT: Im uber, but an ass... ignore this
Last edited by mother on 20 Jun 2005, 17:04, edited 1 time in total.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Yes, I use binary packages because they simplify things quite a bit. I have not been able to compile it on windows or linux because I have never needed to. Python has been built in since I installed, and wxPython was only a "yum" or "apt-get" command away. "Just works" is what I enjoy the most about binaries and whatnot.

Not everyone has the time to manage their entire dependency system and update every piece of software by downloading from source. There is nothing wrong with this approach, but it leaves much to be desired to those who want a Linux box with less hassle.

The wxWidgets platform is stable, and it is in C++ mostly. wxPython should be stable, but I am not entirely sure why certain things wouldn't work in Windows and could work in Linux. At the most, this means we either have to just switch over to C++ entirely or use a different GUI builder which forms the code to work with BOTH platforms.

Cross-platform was the reason for python, but I doubt it will stay like that for long. Python just offers a quick and dirty way to get something working. Python would be included with the installer most likely, because not everyone has the time to go around and hunt dependencies down.

wxPython is probably not the problem at this point, it is probably wxGlade which was used to build most of the code that initializes the window. wxGlade might use stuff that the Windows version of the wxPython API can't handle. When all the bugs are sorted out, it should have the same behavior on both platforms. (that is the advantage to python...)

Either way, I am sorry that I offended you. I am very happy for everyone's help in this manner. Now off to fix this crap...
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

Post by mother »

Since you were nice, while I was kinda an ass...

I fixed it for ya.

3 problems, 2 critical:

1) Ditch the wxLC_SMALL_ICON widget style for list_lobby_1_games
2) The relative paths break horribly for the toolbar icons. I sed'd in hard path (ie e:/blah blah, that worked. I know the solution is to use some code in there, but my python sucks and I could figure out how to get it to take something of the orders "code:wxBitmap(os.path.join("resource/",<png name>), wxBITMAP_TYPE_PNG)" as the bitmap name. Hopefully you understand what I was trying to do |roll| and can actually make it do that ;)

And the not-as-critical:
3)Apparently you really need to put a panel inside a frame before anything else, or on windows its funky.

btw

Code: Select all

$ cat SpringClient.wxg|sed -e 's/resource\/\(.*png\)/e:\/NewSpringClient\/resource\/\1/' >SpringClient4.wxg
was how I 'hardwired' the changes to the filenames.
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

w00t

Post by mother »

Oh yeah damnit!

The thing that started all this :lol:
Image
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

I'm happy you got it to work, now only thing we need is the working protocol which works everywhere. We should look into another networking sources and see how it has been done. It can't be we can't host game trough a router!
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Hey, it doesn't look half bad...but the proportions are screwed up...haha

Either way, an updated version of the code is in the repository! I have introduced the changes you mentioned in this patch heh. Thanks for the help!

Make sure you tell me if it works now guys. I doubt there will be too many problems after this.... :P

EDIT: The information is updated in the first post.
Last edited by Ace07 on 20 Jun 2005, 08:00, edited 1 time in total.
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Code: Select all

Traceback (most recent call last):
  File "F:\SprintLobbyInterface\SpringClient.py", line 34, in ?
    from gui_lobby import gui_lobby
  File "F:\SprintLobbyInterface\gui_lobby.py", line 62, in ?
    COLOR_CHANNEL_TEXT = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_WINDOWTEXT)
  File "D:\Python\Lib\site-packages\wx-2.6-msw-ansi\wx\_misc.py", line 187, in SystemSettings_GetColour
    return _misc_.SystemSettings_GetColour(*args, **kwargs)
PyNoAppError: The wx.App object must be created first!




For that lobby code, I think we should be aware from information in GameDev.net:
http://www.gamedev.net/reference/articl ... le1138.asp
http://www.gamedev.net/reference/list.a ... ryid=30#68
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

I am hoping one of two things happens now. Coryrc gets back from where ever he is (he is probably on vacation or something), so that the netcode can get started right away. I need to still peck away at this GUI, because there is still a lot to be desired from the windows that branch off of the client.

If coryrc doesn't come back (I am pretty sure he will come back), then jouninkomiko should be able to help me. He can probably help regardless, I just hope that microsoft will let him help.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Ace07 wrote:... At the most, this means we either have to just switch over to C++ entirely or use a different GUI builder which forms the code to work with BOTH platforms.
...
wxPython is probably not the problem at this point, it is probably wxGlade ...
PauloMorfeo, into the taspring-linux@lolut.utbm.info mailing list, wrote:...
I just want to mention that Gas Powered Games is requesting to hire a programmer
who has skills in WxWindows.
http://gaspowered.com/jobs.php
http://www.wxwindows.org/
...
They also request for that same position, skills in Python, C# and, of course, C++.
They are a professional company, which also has high expectations.
From this, i would supose that they're next game is expected to work on multi-platform (because of WxWindows), that WxWindows works, at least, acceptably on professional terms on most platforms and that both Python and C# (mono?) are viable options in professional terms.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

The newest version is a little broken because I was up late coding it...I forgot to add the crucial "import os" line to every file. I updated the first post with what you need to get the latest bugfix. You can download it here, or get it from subversion.
Last edited by Ace07 on 03 Jul 2005, 04:07, edited 1 time in total.
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Post by coryrc »

Ace07 wrote:I am hoping one of two things happens now. Coryrc gets back from where ever he is (he is probably on vacation or something), so that the netcode can get started right away. I need to still peck away at this GUI, because there is still a lot to be desired from the windows that branch off of the client.

If coryrc doesn't come back (I am pretty sure he will come back), then jouninkomiko should be able to help me. He can probably help regardless, I just hope that microsoft will let him help.
Hey, hey. You read the other thread... I've got a week left until I said there will be a functioning battleroom server and client. Calm down :)
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

coryrc wrote:
Ace07 wrote:I am hoping one of two things happens now. Coryrc gets back from where ever he is (he is probably on vacation or something), so that the netcode can get started right away. I need to still peck away at this GUI, because there is still a lot to be desired from the windows that branch off of the client.

If coryrc doesn't come back (I am pretty sure he will come back), then jouninkomiko should be able to help me. He can probably help regardless, I just hope that microsoft will let him help.
Hey, hey. You read the other thread... I've got a week left until I said there will be a functioning battleroom server and client. Calm down :)
I knew you were coming back, you just hadn't posted in a while. I doubt you would just recklessly abandon this project. I just have a habit of making backup plans heh.

(BTW, I need help with the sizer code....for some reason it doesn't work on some platforms...namely windows..) =X

I have seen it work wierd in Linux too, so we need some more testing to figure this out.
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Post by coryrc »

Ace07 wrote: (BTW, I need help with the sizer code....for some reason it doesn't work on some platforms...namely windows..) =X
Get boa-constructor and give it a try; it's really easy to play with sizers. (Might be with wxglade, too, haven't tried yet.) Remember, some is good, but more is better!
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

coryrc wrote:
Ace07 wrote: (BTW, I need help with the sizer code....for some reason it doesn't work on some platforms...namely windows..) =X
Get boa-constructor and give it a try; it's really easy to play with sizers. (Might be with wxglade, too, haven't tried yet.) Remember, some is good, but more is better!
I need to get another distribution....fc3 doesn't have packages for the newest version of wxPython. I might have some free time to do that soon, but its hard for me to change...heh.

So the idea with sizers is that every element should have them right? That way you can change their porportion in relation to the parent sizer right?
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Post by coryrc »

Ace07 wrote:So the idea with sizers is that every element should have them right? That way you can change their porportion in relation to the parent sizer right?
Err.... Only things containing things (typically, panels or sizers) need sizers.

http://www.wxwidgets.org/manuals/2.6.1/ ... rview.html
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

windows screenies

Post by colorblind »

I dunno if you're still waiting for some Windows screenshots, but here they are nonetheless:

Image
Image
Image
Image
Image
Image
shnorb
Posts: 147
Joined: 04 Jun 2005, 07:25

Post by shnorb »

nice :twisted:
looks both great (so many more options) and terrible (structuring).... but im fine with that :lol:
Post Reply

Return to “Engine”