Add to Google

Java Gaming - pros and cons

Pages: 1, 2
free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > Game Programming

Java Gaming - pros and cons

GM-University
QUOTE
Compiler
The compiler is a program that "translates" the entire program in to assembly object code that then goes through a linking process to create one large binary executable file. Advantage of the compiler is that it can see the "big" picture and may go through more than one pass to make sure the translation is correct. A disadvantage of compiling is that any changes or modifications to the code require a complete rebuild/ compile-link process.

Interpreter
This is a program that interprets each line of code one at a time and then executes them one by one. The advantage of this is that the code itself can modify itself as needed while it is executing. The disadvantage of this is that the interpreter only sees the little picture and may execute instructions out of context and there is no way of "speeding up" the code by optimizing the way the code is sent to the processor.
Language - Level - Compiled or Interpreted
Assembly - Low - Compiled/Assembled
C(++) - Medium - Compiled
Java - High - Interpreted
Fortran - High - Compiled
Perl - High - Interpreted
Basic - High - May be compiled Most often Interpreted

We see from the above table that Java is interpreted and that C(++) is compiled. Which is better? To be quite honest each is the best for each use. C(++) is the languaget to write most application programs such as Netscape, Word, etc. It is the preferred language to write these becuase these are compiled few times in comparison to the number of times it is executed. Much work has gone in to the improvement of the compilers to provide optimized efficient executing files. C(++) allows direct interaction with the hardware of the system.

Java on the other hand runs on top of a software emulated Java virtual machine (JVM). Becuase the hardware is "emulated" using software there is no actual access to hardware by Java. So the Java byte code is executed one line at a time or interpreted. To take advantage off this Java programs can actually be modified while they are actually running. Since these are often used as programs over the networklk you can update them even while they are in use without requiring the system or program itself to be shutdown or restarted.

This is basically the long way of saying that each magnifies it's strengths by understanding their weaknesses.

I hope all this helps a little.

Wow, nice post, that helped me, and I program in Java and C++, lol. Really, nice guide thingy, I like it.

 

 

 


Comment/Reply (w/o sign-up)

s243a
Java isn’t really interpreted. The code is translated to beta code, which is machine code for a virtual machine. A processor could be created with instructions that match the beta code and sun systems may have created such a processor. There are also compilers available that will translate Java into machine code. This will give speed advantages but will lose some of the portability advantages. Most languages that can be interpreted also have compilers but the reverse is not true. This makes me wonder if and interpreted langue is better. There is however, no java interpreters.

Comment/Reply (w/o sign-up)

lava.alt
i suggest you use vb6 + directx8 ... im learning game programing with vb6 and its very easy ... you can try this link to star learning ... gameuniv.net ...

ph34r.gif

Comment/Reply (w/o sign-up)

beeseven
Just to clarify/correct one thing, Java is compiled into byte code, not beta code. The byte code is then interpreted by the Java Virtual Machine (JVM). So really, Java is both compiled and interpreted. It's not fully compiled into machine code which makes it decompileable, unlike C/C++/other stuff. Find a free trial of DJ Java Decompiler and try it out on your own stuff to see.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Pages: 1, 2

Searching Video's for java, gaming, pros, cons




advertisement



Java Gaming - pros and cons