SY Devs: What language(s) are you comfortable with?

SY Devs: What language(s) are you comfortable with?

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

Moderator: Moderators

What language(s) are you comfortable with?

Poll ended at 15 May 2005, 01:33

C++ only
5
45%
C++ and Python
2
18%
C++ and Java
1
9%
All three
0
No votes
As long as it is written and commented well and easy to learn, I don't care!
3
27%
 
Total votes: 11

coryrc
Posts: 81
Joined: 01 May 2005, 23:09

SY Devs: What language(s) are you comfortable with?

Post by coryrc »

For the rewrite of the SpringClient, we (port team) want to make sure it is done in a language people already know and can modify. SpringClient needs lots of features but not high-speed performance, so the port team has been looking at using a higher-level language to avoid memory leaks, increase productivity, etc., but we don't want to alienate anyone.

We'll do our best to write everything cleanly and with many, good comments!
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

C++, no discussion, no argument.
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

I voted for C++ & Python. C++ because it is mostly unavoidable nowadays in terms of how many people know it. Python because it is an incredibly easy language to learn, and once the basics mastered you can get very quick application development, which'd be good for scripts, automations and tests.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

On a sidenote, here is what the current layout looks like...

I tried to make it look a little bit like an IRC client:

Image

I am not going to vote....although I am most comfortable in coding C++.
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Is that actually working?
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Post by coryrc »

If we did indeed go with Python, and used files from this project, it would require an extra 4 lines of code for the client to have chat ability

http://uranium-irc.sourceforge.net/

However, no, it does not yet work. This is the GUI redesign. (It exports C++ or Python code)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I think that asides from a client such as that, I think that spring multiplayer shouldnt be consigned to game lobbys, for example what about chat program plugins? Such as on msn 5+ you could start a game of TA with another msn contact, if this could be done for a major Chat network client thats crossplatform then you have a temporary solution although I'm nto suggesting it as a relacement for a lobby.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

I am not entirely sure why Microsoft added support for TA in its chatrooms and MSN clients, but I am pretty sure it had to do with the fact that TA used DirectPlay for its netcode. TA Spring doesn't use DirectPlay, and probably never will because it is extremely platform dependent.

(Plus, I don't think that you can make plugins for MSN messenger, although I wouldn't know because I use GAIM.)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

For msn you would use the API's or you would take the aeasier route of using the same method that was used by msn to let TA show up in menus. If all else fails use an msn plus! plugin.

TA was in msn because MSN Zone has support for TA and microsoft likes to integrate things (though they could ahve gone a lot furher than they have with that). Either that or msn loos through registry settings and finds TA and a few other gaes and adds them to the menus
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

I really like Java. It's like C++ with a much easier syntax, and is overall more coherent. Unlike C#, it's not from Microsoft. It has been designed from the start to be great for networking, which is the most important aspect here. Besides, using the right mix of components (GCJ as compiler and SWT as GUI library) it can even be compiled natively on most systems.

I have nothing against Python, but I don't know it and I suspect it's less powerful than Java, since it's used very often as a scripting language. So future extensibility of the client might suffer.

Either way, as long as it works well and has mod-switching and mutators, and is well written and documented, we'll love it!
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

I strongly dislike Java because it's just too slow. Python is quicker, but I know little to nothing about it. C++ is the quickest, simply because its a compiled language.

I honestly wouldn't use Java in this situation, but that is just me. Someone else would have to do the GUI (Java's gui's suck) if we decide to use Java. I can live with Python, but Java is worthless to me.

(sorry to be so blunt)
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

Ace07 wrote:I strongly dislike Java because it's just too slow. Python is quicker, but I know little to nothing about it. C++ is the quickest, simply because its a compiled language.

I honestly wouldn't use Java in this situation, but that is just me. Someone else would have to do the GUI (Java's gui's suck) if we decide to use Java. I can live with Python, but Java is worthless to me.

(sorry to be so blunt)
Well, Java is always the subject of heated controversy. I just like it because it's an elegant language and I could learn a lot of it intuitively, unlike C++. I won't fight to force anyone to use it, though. Still, I'd like to mention a few facts:

-"it's just too slow": I just said above that you CAN compile it into machine code, with the open-source GCJ. Then it works the same as compiled C++. As for the usual way of running it startup time is slower than C++ 'cause the virtual machine/JIT compiler has to start. After that it can be faster or slower than C++, depending on how well-written the program is.

In any case, as mentioned in the original post, speed is not the main issue here. We'd rather have a stable server/client that has good networking. On a machine good enough to run Spring, you won't even notice the app was written in Java.

-"Java's gui suck": :?: To me Swing GUI's look great (look at the Azureus bitorrent client for instance) especially with the latest Java releases, and if you don't like it and want to use something that's entirely open-source, you have the alternate SWT library.

- the open-source community doesn't like Java much because it's not open-source; but Sun is opening it more and more to contributions, and there are open-source implementations/libraries which we can use, as I said above.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

It isn't the GUI that sucks as much as making it. Ive had to make one once, and it isn't overly fun. The GUI might look great when you are done, but what is more important to me is how it was made.

Java is an "ok" language, but it was more of a bully language to me. It was always forcing me to do things the way that "they" wanted me to do (when I did it my way, they made sure to block me every step of the way). Also, the endless hierarchies of classes and objects was certainly not "simple." (I have a 4ft by 4ft poster to prove it, all in 8 pt font too)

Needless to say, I've had bad experiences with Java, and that is kind of why I don't like it. Azureus is the one Java app that I run on my computer, and I have to say that it works pretty good. (the startup times and the closing times are pretty pathetic though)

Anyways, enough with the language holy wars. SJ has passed by this thread a couple of times with no answer. I think that the SY's should come up with an answer together if none of them want to talk individually. I will PM them when I get some time.
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Post by coryrc »

Alantai Firestar wrote:I think that asides from a client such as that, I think that spring multiplayer shouldnt be consigned to game lobbys, for example what about chat program plugins? Such as on msn 5+ you could start a game of TA with another msn contact, if this could be done for a major Chat network client thats crossplatform then you have a temporary solution although I'm nto suggesting it as a relacement for a lobby.
Hi Alantai,
SpringClient is just for attaching to a game room. For a MSN plugin, you would want the ability to change game settings, but no need for external chat due to the builtin chat, etc. If we design the program right (and we will :) ) just the game settings section could be run to generate most of the settings.txt file and the plugin could spit in the host IP info/game name/etc.

. . . does that make any sense?
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Language Choice

Post by coryrc »

Gabba wrote:
Well, Java is always the subject of heated controversy. I just like it because it's an elegant language and I could learn a lot of it intuitively, unlike C++. I won't fight to force anyone to use it, though. Still, I'd like to mention a few facts:
. . .
On an unrelated note, I think everyone should take 1 hour out of his/her life to go through the [usl=http://www.python.org/doc/2.3.5/tut/tut.html]Python tutorial[/url]. If you enjoy using it, you will have a powerful new tool at your disposal.

Language discussion: I'm just looking to know what other languages the dev's use. I know the pros and cons, but if nobody uses the language we won't code in it.[/url]
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Ace07 wrote:I strongly dislike Java because it's just too slow. Python is quicker, ...
That has been brought up some times in HappyPenguin and some other places. That is a common but wrong assumption.

Most Linux people dislike Java because of what stated above and most people generally say that Python "feels" quicker than Java. But the "feels" is obviously subject to miscalculations as all benchmarks i've seen so far, show that Python is generally much slower.

However, do not think that i'm defending in any way Java. Java tends to not work in Linux and, with Java, you write once for all platforms only in theory because as far as i know, you end up having to do at least some minor changes to make it compatible to other platforms.

Python as far as i know, works pretty much «out of the box» anywhere were Python is suported.

But i think that although Python might be good for a non-performance critical aplication like the Battleroom client, it wouldn't be very well suited for a server (maybe that server wouldn't need that much performance anyway...?).
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Post by gramuxius »

What you can do concering python and speed, is write the number-crunching parts in c, which you then can call from a python framwork.

Most times only a small part of the program is really computationally intensive, which should be discoverable with a profiler. Now you can have a python with both a 5-line rpc server and some real speed where you need it.

What java brings to the table is mostly ironclad control of what the developers can and can't do. The rigid typing and security system could be a good thing if you have a large developing team and don't trust everyone to not mess anything up. :)

I actually saw perl mentioned as a somewhat middler ground between secret police java and total anarchy python.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

And while most users have to download active python or some other installer to get python to work on their systems (windows), the fact is java comes pre-installed on the majority of all systems worldwide in some shape or form.

coryrc I didnt quite follow that at all =s
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

write the number-crunching parts in c
Then why not write the whole blasted thing in c then?
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Post by gramuxius »

[K.B.] Napalm Cobra wrote:
write the number-crunching parts in c
Then why not write the whole blasted thing in c then?
Because python is so pretty!

No, really. It's quite possible to achieve everything you want in C, but in my experience python is both quicker to write and safer from mistakes. Of course, it mostly comes down to experience and habit.

From a more idealistic viewpoint, it would be nice if languages were completely portable, including their libraries. Interpreted languages go a long way towards that.

Anyway, I feel like I'm derailing the thread here a bit. I'll shut up now.
Post Reply

Return to “Engine”