Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


[java] Reasons to make games in java?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
21 replies to this topic

#1 ARCHIGAMER   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 May 2000 - 08:34 AM

why should you make games in java besides it compatible across all operating systems?

Sponsor:

#2 Mezz   Members   -  Reputation: 570

Like
Likes
Like

Posted 17 May 2000 - 08:36 AM

Some programmers like the fact that you don''t have to worry about pointers.

-Mezz

#3 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 May 2000 - 09:51 AM

A quote from our FAQ at http://games.cpbinc.com/faq/

"Q. What role can Java play in Game Development?

Java offers increased developer productivity both in development and debugging over lower level languages such as C and C++. Still, most people would agree that Java will not be the development tool of choice for ‘traditional’ commercial games. In commercial game development projects cutting-edge performance is more important than cost and time savings.

However, Java may play a role in game development in a couple of other areas:

Advertisement and Web Site Enhancements: Discovery Online and Disney''s web sites comes to mind - they frequently make applet based games available as part of their marketing and/or education efforts.

Customization and Mods: I have seen discussions pertaining to the use of some kind of JVM hooks for scripting mods and customizations to games. This has already been done with the Quake engine by third parties.

Two Part Game Engines: Java based game logic executables on top of a core game engine in C or C++. This way you would get the performance benefits of C for the performance sensitive components of the game and the developer productivity benefits of Java for the non-performance critical game logic. With JIT technology this seems very feasible (the game logic gets compiled as the level loads, for example).

Steve Anichini of Jellyvision on C++/Java engines.

Cross platform game development: Now that Linux is gaining in popularity there MAY be an actual use for cross-platform game development. Some game genres, such as turn based strategy games, don''t need cutting edge performance and could be developed in Java (taking advantage of the cross platform aspects).

Amateur Developers: The number one problem for most amateur developers is finding time to actually finish your game. Java can help, and most amateurs don’t need cutting edge graphics and multimedia so Java’s performance will suffice. (Jerry_Lynn)"

#4 SHilbert   Members   -  Reputation: 647

Like
Likes
Like

Posted 17 May 2000 - 10:09 AM

Hey, I think pointers are very useful.

lntakitopi@aol.com | http://geocities.com/guanajam/

#5 ARCHIGAMER   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 May 2000 - 10:57 AM

i am talking about applications?..it sounds like you are talking about online web browser based games or is that the only way you can use java?...i am not sure

#6 joeG   Members   -  Reputation: 172

Like
Likes
Like

Posted 17 May 2000 - 11:21 AM

Well, networking, at least for me was a cinch to implement. I don''t know how easy it is for WinSock or DirectPlay compared to Java, but there''s a plus for doing a game via a Java application.

Let''s see, what else....hmmm. Nothing much else comes to mind

JoeG

#7 SHilbert   Members   -  Reputation: 647

Like
Likes
Like

Posted 17 May 2000 - 01:04 PM

Actually, just thinking about it, Java has some virtues. Namely, since it''s cross-platform, it''s kind of like a console system. (And any programmer could guess that a console system like a Nintendo 64 would be a whole lot easier to write for than Windows!) There''s one standard and it all comes out the same (unlike java-script.) Darnit, you guys are going to make me go buy a Java compiler or whatever you use.

lntakitopi@aol.com | http://geocities.com/guanajam/

#8 dog135   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 May 2000 - 01:12 PM

From my humble experiance with it so far, Doing graphics in Java seems easier then in, say, VC++.

However, I''m not about to write a game in Java just yet. Mainly because it''s still to easy to decompile to code into it''s original source. Variable names and all. This really bothers me.

(Although it''s become a nice source of sample code)

E:cb woof!

#9 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 17 May 2000 - 02:43 PM

Heh if you think you can escape pointers in Java you are dead wrong =P
There is no pointer math and garbage collection keeps you from shooting yourself in the foot with deletes (sort of). However, almost everything in Java is a pointer - hence the need to instansiate everything and why == usually won''t work =-)

#10 Captain Goatse   Banned   -  Reputation: 100

Like
Likes
Like

Posted 17 May 2000 - 06:24 PM

Java is way much easier than C++ and you don''t have to buy 200$ compieler to get at least good compieler, because Sun proviedes all you need. Also, Java is way much logical and you can write purely in oop

Time comes, time goes and I only am.

#11 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 17 May 2000 - 07:05 PM

Java is good for web applications, however because it is cross-platform it lacks the speed necessary for a real time or even 3d game. I have taken 3 semesters of college dealing only with Java and when you compare the ability to have predesigned classes with slow speed to the fast, low-level programming of C or C++ but having to write most of the code yourself, C and C++ beat Java way out. Java3D isn''t all its cracked up to be simply because of the independence it has over C or C++, Java3D in its current state can only run about 1 frame per 15 sec on a simple block on a pentium 100 with 16 meg of ram. granted it has no 3D accelerator but i enjoy some of the old top dowm games that still run on my old boxes.

So if you ask me, I feel, weighing all the pros and cons, C or C++ works better than the current Java version. Now thats not to say it won''t get better but for the time being Java just doesn''t cut the speed needed for descent games.

#12 Prosper/LOADED   Members   -  Reputation: 100

Like
Likes
Like

Posted 17 May 2000 - 08:59 PM

In my own opinion, nothing beats C++ if you want to create "state of the art" games. I used JAVA for a whole year and all these pre-implemented classes where very useful but in fact, writing such classes ("list" or "hashtable" for example) don''t take you so much time, compared to a 2-3 years project. Moreover, you''ll just have to write once if you code it well.

If I had to make a "little" game with network support, i would use JAVA, because you can make little apps very quickly. But if i had to create a huge game, JAVA wouldn''t be so useful.

Even with new librairies, JAVA is REALLY REALLY SLOW!

So, what could you do with JAVA ? For now, i''d say "little game" (not professional) or games which needn''t great power (turn based strategy).



Prosper / LOADED corporation

#13 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 17 May 2000 - 10:36 PM

Java is slow on graphics, other than that it''s almost as/equally fast as C++. I''ve heard some people say that some of their apps have been faster in Java (due to aggressive inlining at runtime etc.) but I haven''t seen any examples of that.

The great thing about Java for me is that it reduces the development time. Sure, you can write small apps in C++ that speed up the graphics in Java etc. but I think it would
be painful to write a whole big app in C++. I used to do C/Asm programming and some C++ but for the last 4 years I''ve been doing Java exclusively and I really don''t feel like ''going back'' to the earlier languages. The project I''m working on right now is really big and it would have taken A LOT longer in C++.

Java3D does seem slow but Sun also says that it wasn''t designed for gaming and recommends using other lower-level API''s for that purpose. Anyone tried the packages that adds OpenGL bindings to Java? They are supposed to be a lot faster.

About decompiling Java. Just run your program through an obfuscator and no one will have fun trying to decompile your code. Many optimizers will also replace your variable strings with numbers or shorter strings that take up less space, that will make reading decompiled code harder.

Henry

#14 bobbin   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 May 2000 - 03:24 AM


Cuss I can....

#15 dog135   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 May 2000 - 04:28 AM

Yeah, I''ve seen Java that was run through one of those "obfuscators". I still could figure out the code with a little work. The one I saw used the same name over and over ("p" normally) and relied on overloading to keep the functions appart (some classes had "void p()", "double p()", "double p(double p, double d)", etc.)

The code I was looking at was the only sample of IK I could find. After a couple days of renaming variables and functions, I had the entire thing figured out.

E:cb woof!

#16 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 May 2000 - 04:45 AM

"Heh if you think you can escape pointers in Java you are dead wrong"

- A pointer is NOT the same thing as a reference. The practical implication is that you cannot cause subtle and hard-to-find bugs through improper memory allocations and deallocations with a reference.

"Java is good for web applications, however because it is cross-platform it lacks the speed necessary for a real time or even 3d game"

- If you are referring to writing a 3D engine in Java then I would have to agree. But if you write a game in C++ you’re probably going to use some graphics API like DirectX or OpenGL. If you were writing a game in Java you would do the same thing. With DirectX or OpenGL handling your graphics you should be able to easily muster enough performance for a real-time game. 3D games like FPS''s might still be out of reach simply because of the amount of calculations required for collision detection and the like. I am just starting my OpenGL based game in Java, so I don''t have a lot of results on performance yet.

I wrote a Java 3D game and even with simple scenes the memory requirements were horrible. I also could not resolve the periodic ''freezing'' that I think was being caused by garbage collection. Of course, I am fairly new to Java 3D, so it may have just been my lack of experience with it. At this point I am writing Java 3D off as a solution until a few more revisions have come out.

#17 dog135   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 May 2000 - 06:46 AM

If you don''t think Java''s fast enough to do a simple 3D game, check this out:

http://members.aol.com/edhobbs/applets/index.html

They''re not FPS''s but they''re well written 3D programs.

E:cb woof!

#18 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 18 May 2000 - 12:17 PM

Bah, I beg to differ a on the pointer vs reference.
It IS a pointer. You can say String x = new String("FOO");
and String y = x;
y is now a pointer to x essentially and x is a pointer to
a memory location containing sting object FOO.
You cannot get the actual memory location it is pointing to directly, but that is what it is =)

#19 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 18 May 2000 - 12:24 PM

Ugh i mean x and y both point to memory location holding string "FOO" =P

#20 Etnu   GDNet+   -  Reputation: 880

Like
Likes
Like

Posted 18 May 2000 - 12:37 PM

Eventually, Java(or something else, whatever) will replace C/C++. (probably VB on Windows though, thanks to its new OO structure) because of the gradual evolution (ASM,Cobal,Fortran,C/Pascal,C++,VB/java) many said that C would never replace Assembly(at least according to books ive read) because of its speed at the time. Eventuall, genuine full fledged applications will probably be programmed in some derived language (such as HTML), with lower level languages such as C/C++ replacing the ASM optimizations currently used when programming C or C++.
Whatever,
Etnu

What is a man without goals? A dead man.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS