News: The Java platform is the chosen language for our projects. May 20, 2012, 03:39:27 am
Welcome, Guest. Please login or register. *

How about using Java?
Pages: 1
  Send this topic  |  Print  

  How about using Java?
Author Message
0 Members and 2 Guests are viewing this topic.
2playgames
OpenWar Project Founder
Administrator
Sr. Member
***
Offline Offline

Posts: 857


Busy busy busy busy busy


View Profile WWW
« on: January 04, 2007, 02:13:39 pm »

i've been browsing a bit trough the Wiki TDP posted, and i'm actually thinking java may be a good choice for us. why:

- it's easy to learn and to use:

Code:
// Compare
// In C++
int number = 411;
std::ostringstream mystream;
std::string mystring;
mystream << number;
mystring = mystream.str();

// In Java
int number = 411;
String mystring = String.valueOf(number);

- it will work on all java supported platforms
- today it's not all that slow, especially with JIT (just-in-time) compilation. around the time this project is done it will probably be even faster
- with upcoming OS's, managed code is going to be sort of the standard and unmanaged code will be managed anyway by the OS
- if speed is really a problem, it can call C++ bits
- the bottleneck will probably be the graphics anyway
- it has it's own 3D API, but if that's not good enough (I haven't really checked it) things like Irrlicht can also be used

http://gpwiki.org/index.php/Java

quote from "Killer Game Programming in Java" (download):

Quote
One of my assumptions is that the reader (that's you) has had an introductory knowledge of Java, the sort of stuff gleaned from a semester's course at college. Near the start of that course, you were probably regaled with Java's many advantages: an object-oriented paradigm, cross-platform support, code reuse, ease of development, tool availability, reliability and stability, good documentation, support from Sun Microsystems, low development costs, the ability to use legacy code (e.g., C, C++), and increased programmer productivity.

Rather than explain each of these again, I will take a different approach and discuss Java's suitability for games programming in terms of the typical misconceptions and complaints wheeled out by people who think that games must be implemented in C, C++, assembler, or whatever (just so long as it's not Java).

Here's the list of objections to Java:

-Java is too slow for games programming.
-Java has memory leaks.
-Java is too high-level.
-Java application installation is a nightmare.
-Java isn't supported on games consoles.
-No one uses Java to write real games.
-Sun Microsystems isn't interested in supporting Java gaming.

It's worth saying that I think almost all of these objections are substantially wrong. Java is roughly the same speed as C++. Memory leaks can be avoided with good programming and techniques like profiling. Yes, Java is high-level, but it offers more direct access to graphics hardware and external devices. Installation isn't a nightmare if you use decent installation software. There's a growing number of excellent, fun Java games, and an enormous amount of support available from Sun and Sun-sponsored sites.

A general point about these objections is that they had more validity in the late 1990s when the language and its libraries were less sophisticated and slower. Java's user and developer communities are burgeoning and have produced a plethora of useful tools, online help, and code examples. The games forums dedicated to Java barely existed 2 to 3 years ago. Java is a great language for games programming, as I hope this book demonstrates. Now, back to the criticisms.

« Last Edit: January 16, 2007, 02:38:55 pm by 2playgames » Logged




Darvin
OpenWar Staff
Staff
Sr. Member
**
Offline Offline

Posts: 506


The Concept and Design King


View Profile
« Reply #1 on: January 04, 2007, 10:09:11 pm »

As I said early on, give Java and every language it's fair chance and full analysis.  If it really isn't suitable, that will be evident.  However, from the looks of things, that article indicates that it just may be competative.  If that's the case, a second look is definitely merited.
Logged
2playgames
OpenWar Project Founder
Administrator
Sr. Member
***
Offline Offline

Posts: 857


Busy busy busy busy busy


View Profile WWW
« Reply #2 on: January 04, 2007, 11:27:10 pm »

ok, so Java is my suggestion. if you (being anyone who reads this, not specifically you darvin) have another suggestion please make a topic like this, stating the pros and cons with some background information
Logged




2playgames
OpenWar Project Founder
Administrator
Sr. Member
***
Offline Offline

Posts: 857


Busy busy busy busy busy


View Profile WWW
« Reply #3 on: January 16, 2007, 02:39:26 pm »

i uploaded the e-book which convinced me of using java. see first post
Logged




Darvin
OpenWar Staff
Staff
Sr. Member
**
Offline Offline

Posts: 506


The Concept and Design King


View Profile
« Reply #4 on: January 16, 2007, 10:09:41 pm »

If we use Java for the pre-project, then we should be able to see for ourselves whether it meets our needs.  From the looks of it, Java offers a great opportunity for games that really hasn't been cached in on.
Logged
uvgroovy
Guest
« Reply #5 on: May 14, 2007, 06:19:47 am »

When do you expect to decide on the langauge?
If this project is done in java, I'll be happy to help (as i see it, writing non-managed code is obsolete).

   - yuvi.
Logged
2playgames
OpenWar Project Founder
Administrator
Sr. Member
***
Offline Offline

Posts: 857


Busy busy busy busy busy


View Profile WWW
« Reply #6 on: May 14, 2007, 08:12:34 am »

Well, since I now have both experience in C/C++ and seen some examples of games in Java, I can say that we will use Java unless somebody steps up and objects right now Smiley
Quote
as i see it, writing non-managed code is obsolete
true true
Logged





Pages: 1
  Send this topic  |  Print  
 

Jump to: