New lobby client "framework" is done - Page 3

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 »

Ya, I need to spend some good time to fix the layout issues, but once they are sorted out it should work pretty nicely. :-)

I thank everyone for their help on diagnosing these problems with it. We will need the support when network starts to be integrated into the client, so stay tuned!
elim
Posts: 8
Joined: 23 Jun 2005, 21:18

Post by elim »

I think this might be the answer to your players http://www.ethereal.com/
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Good news!

I have uninstalled Fedora Core 3 and went to a more stable distribution (Ubuntu). The problems that you all are experiencing can now be fixed. I just managed to get the lobby to stretch and scale properly!

I haven't uploaded the source to the repository yet, because I want to get rid of most of the layout issues first. There are some other layout issues that can finally get fixed now.

(Its nice to finally be rid of Fedora...ugh)
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

The new version has been uploaded to the repository, so now its time to test...!

A lot of the layout has been fixed. Try it for yourself!

Now we just need the subwindows to be coded and the netcode to get made up.... :-)
Last edited by Ace07 on 03 Jul 2005, 04:06, edited 1 time in total.
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Works well now, good job ace.

Why wouldn't you write the lobby code yourself?
http://www.amk.ca/python/howto/sockets/

For windows maniacs, you can use py2exe to make it look like windows application. ;)

Please make tabbing work, it really makes it better to crawl trough your graphical interface.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Cheery wrote:Works well now, good job ace.

Why wouldn't you write the lobby code yourself?
http://www.amk.ca/python/howto/sockets/

For windows maniacs, you can use py2exe to make it look like windows application. ;)

Please make tabbing work, it really makes it better to crawl trough your graphical interface.
I really want to make tabbing work...it is a top priority for me. I have built the framework to support tabs, but I don't know if I did it right. Only time will tell.

I could write the network myself, but I would rather someone who knows the protocols. Currently anyone could randomly write the netcode (like the guy who made the other springclient), but the problem with that is obvious. It only works for their servers. What we want is the code to work for PheonixWorx servers and TASpring servers.

I trust that Cory will get going on it soon. (He probably already has.)
NMDANGE
Posts: 36
Joined: 27 Apr 2005, 16:35

Post by NMDANGE »

Ace,
I've documented the protocol used by the current client and am implementing it in PW. I will releade the spec as soon as it is ready, which should be in the next day or two.
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Good job, boys. I wonder if I'll have more time in later summer. For now the time is consumed into:
  • - Codename TK design, coding.
    - Personal Gameprogramming & Gaming.
    - Personal team homepage designs & coding...
    - Another's homepages & coding...
    - Parsing my computer and family house slightly at time to better.
    - Thinking about open-source funding system.
I would give more if I would have time, for now I can only give you my mental support. I believe you get into great heights because the code already looks good.
I believe we don't need any other guy to make C++ version from this because it will work good enough.

Some design notes I want to expose for you:
  • - Align the button lines. Rather use lists with intuitive way than buttons ordinary way, they looks simply better.
    - Remove toolboard or menu, another of them is not needed.
    - Make credits screen look much better (put your image and mail there ;) )
    - Do not imitate the original TASpring settings.exe, it didn't looked good.
I could write you some echantements into screen design, implement it if you wish.

This takes a while when I draw the design.

http://img277.echo.cx/my.php?image=modifies3co.jpg
I wish it exposes a little what it should look like. You should see only the commands you are able to process per time.
If you clear the network-code interface and distance it from the GUI code, I could do the interface improvements myself and move it into subversion. There are some ways to do it, encapsulate them into file or class, or both!

What do you think?
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

NMDANGE wrote:Ace,
I've documented the protocol used by the current client and am implementing it in PW. I will releade the spec as soon as it is ready, which should be in the next day or two.
Sweet, this should be useful for me. =)

Cory should be interested in it too.

@Cheery: The network will definitely be in a different file and class. As it is, we might want to mix up the classes a bit. The lobby is getting "fat" with functions and code.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

don't say fat say phat :D the more functions the better! 8)
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Min3mat wrote:don't say fat say phat :D the more functions the better! 8)
except if they aren't documented well. :wink:

Code: Select all

def nice_func( a, b, t ):
    '''
        Hi I'm really well documented example function.
        Makes a linear equtation between a and b points, returns the t point
        from the line.
        parameters:
            a as vector, first point.
            b as vector, second point.
            t as decimal number between 0.0 and 1.0.
        returns: equtation result which is  a*(1-t) + b*t
        usage:
            a = main_frame.math.vector(2.0, 5.0)
            b = main_frame.math.vector(6.0, 5.0)
            t = 0.5
            r = nice_func( a, b, t )
    '''
    return a*(1-t) + b*t
Remember to document well! It's worth of it. :-)
now we could acces that document with command:

nice_func.__doc__

in python interpreter.

I have found this is important even when I'm doing my own stuff, otherwise I don't remember how different functions were used.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Cheery wrote: except if they aren't documented well. :wink:
All of the functions now are pretty basic. You can kind of infer what they mean. Regardless there are #comments# everywhere. Especially in the weirder places that I had to add code to change the default behavior.

Currently I am working on saving settings to files. wxWidgets has some pretty dang nice libraries for that. It practically does all of the work for you!
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

I tested the resource overhead taken caused by python boosted with C, it's smaller than with java and .NET I believe.

Because the syntax is lightyears ahead from any other language I have seen, I'll turn on python with my own projects too.

I have one experimental pyrex library which gave me really positive results from python's performance and quality.

Now I only wonder. WHY people doesn't use it more?!? It's performance is rapid and everybody just passes it because of little weird syntax at first glance.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Python is lightyears ahead of .NET and java. If you were to compare python to java, it would be like comparing an truly interpreted language to C++. Java is the bully language of the interpreted class of languages. It forces you to do it "their way or the highway." Of course, what if their way is wrong? You could always give up I guess?

.NET isn't a platform independent GUI solution. So far there has been no successful port of the System.Windows.Form class to other operating systems.

Python is simply the idea of an interpreted language that takes out all of the stops. It has a lot less overhead than both, because you have to create the code yourself! There is built in functions that ease this idea, but python is about you coding. It certainly isn't about you just "using" the overbloated feature filled virtual machine to accomplish your tasks.

Either way, python is definitely a cool language. The sy's should look into using it as the scripting language for the game.

On a sidenote: I am almost done getting the settings to save correctly and all of that. Once that is done...netcode can finally start getting implimented...
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Ace, well, I think I'll use it from now on. Also recommend it for some people who likes to learn programming. =:)

As I excepted, it removes all the unnecessary stuff like:
  • - Creating the project file.
    - Writing lots of code for implementations.
    - Compiling my project.
    - Linking my project.
User avatar
dotnetnoobie
Posts: 3
Joined: 27 Jun 2005, 08:13

.Net Rocks... Python.Net is proberly pretty good too?

Post by dotnetnoobie »

:P IronPython
http://www.ironpython.com/

Release Announcement from July 28, 2004
It was a little less than a year ago that I first started investigating the Common Language Runtime (CLR). My plan was to do a little work and then write a short pithy article called, "Why .NET is a terrible platform for dynamic languages". My plans changed when I found the CLR to be an excellent target for the highly dynamic Python language. Since then I've spent much of my spare time working on the development of IronPython.

The more time that I spent with the CLR, the more excited I became about its potential. At the same time, I was becoming more frustrated with the slow pace of progress that I was able to make working on this project in my spare time. After exploring many alternatives, I think that I've found the ideal way to continue working to realize the amazing potential of the vision of the CLR. I've decided to join the CLR team at Microsoft beginning on August 2.

At Microsoft I plan to continue the work that I've begun with IronPython to bring the power and simplicity of dynamic/scripting languages to the CLR. My work with Python should continue as a working example of a high-performance production quality implementation of a dynamic language for the CLR. I will also reach out to other languages to help overcome any hurdles that are preventing them from targeting the CLR effectively. I welcome any and all feedback about how to best accomplish this. You can reach me at jim@ironpython.com.

:wink: Python for .NET
http://www.zope.org/Members/Brian/PythonNet/readme.html

Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers. Using this package you can script .NET applications or build entire applications in Python, using .NET services and components written in any language that targets the CLR (Managed C++, C#, VB, JScript).

Note that this package does not implement Python as a first-class CLR language - it does not produce managed code (IL) from Python code. Rather, it is an integration of the C Python engine with the .NET runtime. This approach allows you to use use CLR services and continue to use existing Python code and C-based extensions while maintaining native execution speeds for Python code. If you are interested in a pure managed-code implementation of the Python language, you should check out the IronPython project, which is in active development.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Cheery wrote:Ace, well, I think I'll use it from now on. Also recommend it for some people who likes to learn programming. =:)

As I excepted, it removes all the unnecessary stuff like:
  • - Creating the project file.
    - Writing lots of code for implementations.
    - Compiling my project.
    - Linking my project.
You will probably find a lot more that it does too. Most notably is that you don't have to declare any variables, you just have to assign them a value and they are ready to use! Also, scope is very easy to understand because you have to define the scope of each variable you access (unless its a local variable).

There is a lot more stuff that it can do also, but just remember that indentation is extremely important for some reason. Because the language does not have any braces to define when structured logic begins and ends, indentation is required to be consistent for all logic structures. That is the only pain I have found while coding in python.

Also:
.NET isn't platform independent, which is why the porting effort will not be using it.
NMDANGE
Posts: 36
Joined: 27 Apr 2005, 16:35

Post by NMDANGE »

Ace07 wrote:
Also:
.NET isn't platform independent, which is why the porting effort will not be using it.
Well .NET *is* portable, just not SWF. Of course I'd much rather have a C++ exe to distribute, no need to install a VM or runtime or any of that nonsense.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

A new version is out...and a lot of functionality has been added....

As far as I am concerned, the only thing left to add is the netcode! Once that is added, people can actually start playing with this client! You can try the latest update by viewing my first post.

It has also been added to the subversion repository located below:
https://lolut.utbm.info/svn/taspring_li ... ingClient/

This version adds the ability to save your settings for you! Its kind of neat actually. This project is one step closer to working in Linux. =)

Remember that you need to install Python and wxPython that are linked in the beginning of this thread!
Last edited by Ace07 on 03 Jul 2005, 04:06, edited 1 time in total.
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Code: Select all

F:\SprintLobbyInterface>SpringClient.py
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 32, in ?
    import misc
ImportError: No module named misc
This comes when I updated the SVN folder and tried to run springclient.
Post Reply

Return to “Engine”