Which language to choose?

Started by
11 comments, last by AverageJoeSSU 14 years, 4 months ago
Quote:Original post by Deprecated
Well I would really much like to position my own components, even if it's possible to do this with Java it's not ment to be done. I should position them relative to each other and then let the LookAndFeel decide how the should be positioned. Those nifty little features causes me more trouble than joy.
That's not really an OS thing. And I'm not sure what you're referring to -- Java allows you to use AWT/Swing without a layout manager with no problems.
Quote:The inability to communicate with applications outside the JVM

What particular sort of communication do you want? Java can read/write named pipes just fine, and there are interfaces for using COM and suchlike.
Quote:that I'm unable to create a mutex

java.util.concurrent.locks.
Quote:or load a library at runtime.

java.lang.loadLibrary().

It sounds like you might want to learn more about Java before passing final judgment on it. The Java environment takes quite a bit of getting to know. Presuming that it must not have a given feature just because you haven't found is odd, given the number of other people who program in Java and would have use for such a feature.
Advertisement
Quote:
There's no restrictions which keeps me from writing these kinds of games, I was referring to the restrictions of Java as a language, I'm not allowed to access functions provided by the OS unless they exist within the JVM. Naturally sun can't give this kind of access as the language wouldn't be platform independent anymore. This isn't that big of an issue, but it really irritates me.


Its true java offers no direct access to Native libraries. But it does offer access indirectly through some wrapping. JNI is the basic framework for this , which is difficult to use and on top of it is JNA which much easier and simpler, both offer access to native libraries and there are many libraries that use both , even though most programmers obviously prefer JNA.

Quote:
C++ is compiled and therefore execute alot faster than a language like python, anyhow this doesn't matter for my project, I just tried to point out that I don't want to use C++ as that seems to be the usual suggestion here.


True C and C++ are not only compiled but also statically typed. Py code is also complied to python bytecode but it can become alot slower up to 1000 times (eventhough the number fluctuate quite alot, and there are cases that the slow up can be minimum) according to some benchmarks because is dynamically typed and so the interpreter waste alot of time guessing what is what.

However there are means to speed python up . You can wrap C libraries . You can call C libraries directly with ctypes. And lastly there is Cython.

Cython is basically python syntax language that can take a python source code and converted to c code , it also offer optional statical typing so its the perfect cross C/C++ with python with almost no loss at speed(actually Cython in some case has been reported to be faster than C/C++ but is usually less than 30% slower ). You can take then the C source file generated by the python code through cython and compile it like any other C app. Cython can be used to complile whole python apps or export c functions to python or python functions to c.

So there you have it several solutions to a single problem. Of course in the end good profiling is all that it takes to speed things up for any kind of language.If you know where the problem is , you can attack it properly.

You should be not worried with the choice of language so much, each one has the ups and downs. Its more like a personal choice than a practical one.

But yes I recommend python , it very easy to learn and use. In the end use the one that makes you happy and help you enjoy the process. If you dont have fun then you do not do it right.
C# and XNA are widely popular.

I would go there, since it provides you with the means of creating your game for the most part.

there is no popular equivalent that exists.

------------------------------

redwoodpixel.com

This topic is closed to new replies.

Advertisement