Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Why Java?  (Read 5444 times)
0 Members and 1 Guest are viewing this topic.
Offline Kethean

Junior Newbie




Java games rock!


« Posted 2003-03-06 18:53:23 »

I am doing a report for my High School Java class, and was wondering what advantages java gives to game programming.
                                                               Thanks Grin
Offline zparticle

Senior Member




Thick As A Brick


« Reply #1 - Posted 2003-03-06 20:37:40 »

There aren't any, if anything it makes it more difficult. Cheesy That ought to start a war.

Just kidding, but I'm brain fried right now and can't think of anything. Actually it might help if you specified a specific type of game programming. For instance:

Online multi-player
2D shoot-em ups
2D adventure
3D FPS
etc.

Offline Kethean

Junior Newbie




Java games rock!


« Reply #2 - Posted 2003-03-06 23:58:35 »

I was thinking of more of games that are 2D in nature. I was thinking that JAVA makes working in the Windows enviornment easier.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Backmask

Junior Member




586: The average IQ needed to understand a PC


« Reply #3 - Posted 2003-03-07 05:27:33 »

Quote

I was thinking that JAVA makes working in the Windows enviornment easier.


If you are targeting only the windows plattform there are no need to use Java. Then C++ is more mature for game programming. There are one aspect that can make the use of Java as programming language for a game targeting the Windows plattform more interesting and that is that if you feel comfortable with Java as your language it is easy to make a nativ binding with JINI to use the graphical plattform specific things Windows has. Check out LWJGL that both work under Windows and Linux.

But if you would like to target alot of plattform and consoles Java can be a choice but unfortunate the java api hasn't got a real gaming api yet and therefor it is not as mature as other languages. I hope we will soon see a specific game api in Java that let's us use hardware acceleration easy.

Offline NielsJ

Senior Newbie




Java games rock!


« Reply #4 - Posted 2003-03-07 06:47:50 »

I disagree...

My primary motivation for using Java is not platform independence - If I can sell my software to 95% of the worlds computers, then that's good enough for me Tongue.

No, I use Java because it is by far the most productive language I have ever used (and I have been programming everything from 6510 machine code to C++ over the past 15 years).

It's probably slower than C++, but C++ is slower than C (asuming you make use of C++ features), C is slower than assembler, yet gamedevelopers have walked that very path, sacrificing performance for reliability and productivity. Sooner or later, gamedevelopers will look at C++ and go: "why the f*** did anyone ever bother with that crap".

Whether Java is the next step on the evolutionary path of game development remains to be seen, but believe me, C++ is NOT the last.
Offline Backmask

Junior Member




586: The average IQ needed to understand a PC


« Reply #5 - Posted 2003-03-07 07:17:47 »

Ok I agree with the points you make. I only hope that Microsoft loses large parts of their 95% market on operating system so that java can really use its platform independence.

And C++ is not the last step. I hope Java will be the next because I like the language and it makes me more productive , as you stated. But until Sun are more willing to spend some money on creating a stable gaming api in Java, Java will never become the next step.

Offline NielsJ

Senior Newbie




Java games rock!


« Reply #6 - Posted 2003-03-07 10:41:32 »

A few points on Sun and expanding the Java API:

1) Sun are not actually making money from Java (at least not directly, and not in any major way), so I think we should be happy with what they've given us so far, and beg that they focus their future efforts where it makes a difference (VM research). Sun's efforts on the run-time APIs are somewhere between mediocre and horrible, so let's not encourage further efforts in that area.

Which leads me to point 2:

2) AWT, Java2D, Java3D, JavaSound, etc. ... Any of these strike you as major advances in any of their respective areas? No, because they aren't. All have been inferior to what was available for other platforms at their time of release. Sun is just not very good at this, each new API bloats the JRE but adds nothing, because you eventually have to roll your own anyway (LWJGL).

And bloating is, in fact, my 3rd issue with Sun's API efforts:

3) I work with Java every day and has been doing so for the past 6 years and I can't figure out what the hell is part of what "configuration", "spec", "api", "package", "option" or wtf they call it. How on earth do they expect end-user-joe to figure this out? Everything is over-engineered, over-designed and generalized to the point where it is generally useless.

So, my advice to Sun, and hope for the future, is that they focus all their resources on the Java language, VM and the very very basic of the JRE (basically JRE1.0 minus unnecesarry garbage), and leave everything else to those who know. (I.e. when there's a perfectly well functioning, open, industry accepted API already available, EMBRACE IT! Yes, I'm thinking OGL vs. J3D here, but there are other examples).

I'll shut up now - I really don't enjoy trolling  Roll Eyes, but sometimes it gets the better of me Tongue
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #7 - Posted 2003-03-07 11:22:18 »

That's the kind of trolling I like Smiley
There's some other advantages of Java no-one's mentioned to our earnest school chum which are along the lines of the ability to run dynamically loaded code in safety. Not only that but the whole VM concept leads to a more stable platform. Very few - OK, none for me even - Java applications have managed to break my computer, but a lot of native things have screwed things royally.

Cas Smiley

Offline Backmask

Junior Member




586: The average IQ needed to understand a PC


« Reply #8 - Posted 2003-03-07 11:59:13 »

Totally forgett about

Quote

ability to run dynamically loaded code in safety.


Thanks for reminding me princec.

Thats one of the great features with java. Easy to dynamically load in plugin modules into Java games makes the life alot easier. And also be able to run them i safety where no evil Java programmers (if there are any  Roll Eyes ) can make a evil plugin and spreding it to n00bie gamers.  So no more script languages and the code to parse it Grin

I am currently playing around with a game that uses dynamic loading of classes in two cases. And I always thought classloaders and securitymanagers would give me a headache but it was abit to easy, think I missed something  Tongue

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #9 - Posted 2003-03-07 14:33:21 »

Dynamic class-loading is very neat indeed, something that in C++ you'd be resorting to .dll's, which gets very annoying for small, pluggable modules Angry At the moment i've got a nice dynamic game objects system working (ignoring collision resolution bugs Embarrassed) which means that i can add new object/weapons/bullets etc. by just dropping a couple of extra class files in Grin

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #10 - Posted 2003-03-07 15:57:25 »

Not only can you dynamically load classes, but one of my favorites, is the fact that I can patch a program *very* easily by just including the class/jar on the classpath, before the original class/jar.

Offline bmyers

Junior Member





« Reply #11 - Posted 2003-03-09 20:55:25 »

I have heard that there is a 8-10x productivity gain in using Java or C or C++.  Mostly due to certain classes of bugs that you don't get in Java, like pointer corruption or memory leaks from failure to release allocated memory.

My own experience, having used all three languages a lot, is pretty similar.  The higher-level the language the easier it is to write things, but the close-to-the-hardware tuning becomes harder.  But it also depends on what you are doing with the language.  I find it much easier to build large complex systems (e.g. MMO game) involving multithreading and distributed behavior in Java than in C++.    But small demoware could be done quickly in either language, depending on what tools and APIs are already available.

And learning Java is a lot easier.  And the language is cleaner.  YVMV.

--Brad

Offline soupface

Senior Newbie





« Reply #12 - Posted 2003-03-23 02:51:06 »

Evaluating Java for Game Development
goes through alot of what's been mentioned and then some, including benchmarking different types of games under different VMs as well as C++ implementations and what not.

dry reading perhaps, but relevant.

Offline Captain-Goatse

Junior Member




I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #13 - Posted 2003-03-23 10:05:23 »

Hay, looks like Lisp will be the next ph33r tool at least if you believe gamedev.net the reasons? "Lisp invented game programming, OOP, objects and pre-emptive strikes, hence it si teh best tool! LOL U SUK c++ hobo!"
Offline javatypo

Junior Member





« Reply #14 - Posted 2003-03-24 23:28:28 »

maybe a better question to ask, is why not Java?
Offline Captain-Goatse

Junior Member




I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #15 - Posted 2003-03-26 11:56:43 »

Quote
maybe a better question to ask, is why not Java?



Not really, thats like shooting your self in the leg.

Why? Because obviously there are so much better and commonly accepted solutions where you can basically copy and paste the source and "create game" that way. Also Java isn't professionally very accepted.

When the next u2k3 uses java we can ask why not java.
Online EgonOlsen
« Reply #16 - Posted 2003-03-26 20:13:19 »

Quote

When the next u2k3 uses java we can ask why not java.
But if no one ever asks, it never will... Tongue

Offline Harley Rana

Junior Member




Java games rock!


« Reply #17 - Posted 2003-03-26 23:14:22 »

The only thing i can say is, pick the language for the job!
There is no perfect language, you just need to pick the best one for the job.  Smiley

We wont see a commercial FPS built in java.  But we will probally see game tools being built out of java.  Tools are perfect for java, because they benifit from all the productivity benifts of java, and don't need fast graphics.

Now java can use openGL through lwjgl, we can get cool 3D graphics in java fairly fast.  Its never going to as fast as c/c++ but for simple projects the benifits of java will out weight the speed loss.


Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #18 - Posted 2003-03-27 09:34:18 »

Quote
We wont see a commercial FPS built in java.  But we will probally see game tools being built out of java.  Tools are perfect for java, because they benifit from all the productivity benifts of java, and don't need fast graphics.

I disagree.

Quote
Now java can use openGL through lwjgl, we can get cool 3D graphics in java fairly fast.  Its never going to as fast as c/c++ but for simple projects the benifits of java will out weight the speed loss.

Well, C++ will never be as fast as straight C.  C will never be as fast as assembly.  Assembly will never be as fast as machine code.  Don't fall into the trap of thinking that C/C++ is the be-all and end-all of software development!

I'd also say that Java is a greater benefit on the larger and more complex projects, rather than the simple ones.

Hellomynameis Charlie Dobbie.
Offline Captain-Goatse

Junior Member




I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #19 - Posted 2003-03-27 10:15:17 »

You might disagree, but denial won't reveal the whole truth. I'd much rather be open eyed than bound to stupidity with retarded fanboyism.
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #20 - Posted 2003-03-27 11:19:04 »

Sorry Captain, I won't start name calling and insulting people - look elsewhere for a flame war.  I'm very happy with Java and see a great future for it.  If you don't, then that's merely a difference of opinion, not something to verbally abuse people over.

Just for the record, I don't believe I'm in denial, I'm not oblivious to the problems that Java has, I'm not stupid or retarded and I'm not a fanboy.  If you want to ruffle my feathers then you'll have to try a lot harder than that. Tongue

Hellomynameis Charlie Dobbie.
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #21 - Posted 2003-03-27 15:23:51 »

While we are spewing crap...

C++ can be exactly the same speed as C... depending on what features you use and how you use them C++ simply makes it easier to get a feature that you would have to write more code for in C.  (E.g. jump tables in C vs. virtual functions in C++)

Assembly and machine code are exactly the same speed, because Assembly is simply a way to write machine code that is easier to read than a bunch of hex.

I can show you examples of Java programs that run faster than C++.  It all depends on what you are trying to do.  There are trade-offs to every alternative.  In general VMs run a bit slower than native compiled code... but as should be evident to anyone paying attention, that is changing... VM technology is getting more advanced, raw computing speed in a VM is approaching that of natively compiled code.  The small trade-off in speed that remains can be thought of as the cost of the benefits that a VM gives you (better error checking, and the productivvity that arrises from it.. easy dynamic code loading, platform independance...)

There are several valid answers to both "Why?" and "Why not?"

Is Java a viable alternative for real commercial games... no need to ask it has already been used in successful commercial games, so obviously the answer to that one is "yes"..  Is it the right choice for you and your game?  That depends...

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #22 - Posted 2003-03-27 15:49:26 »

Quote
While we are spewing crap...

Wink

Quote
C++ can be exactly the same speed as C... depending on what features you use and how you use them C++ simply makes it easier to get a feature that you would have to write more code for in C.  (E.g. jump tables in C vs. virtual functions in C++)

Well, yeah, but that's not really "using" C++ is it?  I mean, it's a superset of C so you could just not use any C++ features... Grin  But yes, okay.

Quote
Assembly and machine code are exactly the same speed, because Assembly is simply a way to write machine code that is easier to read than a bunch of hex.

Well, if you know how to exploit machine code you can ("theoretically") do things that assembly won't let you do.  Usually not good to rely on though...

Quote
Is Java a viable alternative for real commercial games... no need to ask it has already been used in successful commercial games, so obviously the answer to that one is "yes"..  Is it the right choice for you and your game?  That depends...

How very true!  And I think that really sums up the whole argument doesn't it?

As the Queen Mother once said: "Respec'!"

Hellomynameis Charlie Dobbie.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #23 - Posted 2003-03-27 17:10:54 »

Quote
Well, if you know how to exploit machine code you can ("theoretically") do things that assembly won't let you do.  Usually not good to rely on though...


Hmmm... I wouldn't know one thing that would speed up your code.
The 2 things I can come up with is:
- using unsupported opcodes (you better get a better assembler if it doesn't support those instead of getting rid of your assembler)
- crashing your computer (oh, right... you can do that with an assembler too  Grin)

I think I skipped that theory lesson  Tongue

Roll Eyes

Offline Harley Rana

Junior Member




Java games rock!


« Reply #24 - Posted 2003-03-27 22:37:57 »

In pure rendering speed there is not much difference using openGL through lwjgl, and native c++.  You should be able to pump as many triangles per frame in java.  Smiley

It just depends on the type of game your making.  As to how much perfomace hit you'll take using java.  In alot of situations, the hit will be very low.

C++ is the fastest language around for making games.
Its complexity makes it a pain to use, but pros know how to get every last bit of performace out of it.  Like the ability to go into asm blocks for those tight loops.  

LWJGL is a blessing to the java community.  It is perfect for alot of groups and individuals, that will benifit from using java.  But pros have the tools and experience using c++, and can't afford any performace hit.

As a java lover im really hoping sun can pull of the theoretical  advantages of a runtime evnironment, to leave c++ behind with runtime optimizations.  
But it hasn't happend yet, and i doubt it will in the next few years if ever.
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #25 - Posted 2003-03-27 23:32:12 »

Quote
Hmmm... I wouldn't know one thing that would speed up your code.


...And thus it began to worry me.  I've never bothered playing with machine code myself, but I'm sure I read an article somewhere by someone who was hand-tuning assembly-generated binaries for speed.  I don't think the gain was much, but it was there.

However, I've had a quick search, and can't find it.  In fact I can find nothing to support the theory at all!  With the lack of any scap of evidence, I withdraw my comment. Grin

I think I'm getting old... Apologies for any confusion/anguish caused. Wink

Hellomynameis Charlie Dobbie.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #26 - Posted 2003-03-28 07:03:11 »

Quote
But it hasn't happend yet, and i doubt it will in the next few years if ever.

I think platform indepence is a problem here as we saw in the *huge* performance drop in 1.4 related to number crunching.
For that alone I'm not holding my breath for a faster than C++ VM.
That said, this doesn't make java particulary slow and I think it's easily fast enough for many sorts of games.
Just don't create software renderers or other number crunching tasks and expect it to perform really well.

Quote
C++ is the fastest language around for making games.

No it's not.
It's features just can make it *easier* for creating games while accepting a performance drop here and there compared to straight C or assembly.

Erik

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #27 - Posted 2003-03-29 08:57:00 »

Right now, I can say with 100% certainty that if I had a mind to I could create a FPS game the equal of Quake 3 Arena in all respects in pure Java plus LWJGL. Fortunately for the world I'm not clever enough to render curves yet Smiley

Now I've written Alien Flux and the infamous terrain demo I am intimately aware of what Java is capable of - and proved it. Something that ought to be taken into account is that I've got this stuff together in record time too considering I work largely on my own or in a tiny team. So there's an advert for the technology.

As to why not use Java - well, it can be pain in the arse because we don't have Structs, which is slower than it could be and more fiddly. But that's my only major gripe apart from the JRE size & licensing terms.

Cas Smiley

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #28 - Posted 2003-03-29 09:27:51 »

But they're not really curves are they? (At least I though it was faked by using a bit larger number of polys in the 'curves' and smoothing them out by lighting).

For what it's worth, I think Q3A would be easily possible too, but I suspect you would loose a few fps though, be it an acceptalble number.
Being able to create Q3A in much less time would've made it worthwhile still to do it in Java I suppose, because that's probably a better argument for the business people than 100fps instead of 90.
And platform independance is a nice bonus thrown in with no extra charge (well, almost none).

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #29 - Posted 2003-03-29 10:36:39 »

Precisely. Who cares about 10fps? (Well, you would if you were running at 20fps in the first place Tongue)

I expect the Q3A development time could have been cut in half approximately, and released simultaneously on Mac, Win32, and Linux - as it is, those two ports took months of extra development time. The whole mod/dll scripty thing took a good long time to develop too and has to be different for all three O/Ss

Imagine the mod community! Dynamically downloaded mods from the server no matter what O/S you're on! Woo! It just all makes sense. So let's just hope they fix the issues with the current Java soon. (You listening, Chris?)

Cas Smiley

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (75 views)
2014-09-10 06:39:09

Tekkerue (38 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (28 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (35 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!