Skip to main content
gamedev.net
🔒 Locked

[java] Java Vs C w OPEN GL

Started by lupine Oct 13, 2000 at 4:21 PM 9 replies 550+ views
Original Post
lupine
lupine
After spending significant time and resources learning some C I am finding out that I''m looking at some serious portability issues (targets WIN, LINUX, MAC 7-9, MAC 10) 1So, can Java really run on all these machines? 2Are Java games unstable or "crash happy"? 3Do all high end computers have Virtual JAva Machine? 4. Is there an example of a Java game that I can download and test? 5. I know some other programming language, I took to Java right away, it seems more like what I''m used to then C am I mental or something? 6. Is Java *really* slow? I am only needing 2D 256colors? 7. Does Java have any weaknesses that I''m missing above? how is it at data manipulation? Can I seperate data and logic as in other languages?
"do you like my helmut?"-yoghurt
Jerry Lynn
Jerry Lynn
Try starting with the FAQ for this thread... it may answer some of your initial questions.

http://games.cpbinc.com/faq
lupine
lupine
ok, I''m doing my project in Java
I''m going to need some help now and then
so I hope you all can back me up.

Project CODENAME "elfshotthefood"
"do you like my helmut?"-yoghurt
DJNattyP
DJNattyP
Anon -
I think the reason it only read GIF and JPG files was that Java is supposed to be platform independent. BMP is mostly only used by Windows, and PCX is mostly only used in DOS programs. I don''t think they included ways to load MacIntosh PIC files, or Unix only file types either. However, all of these know how to read GIF and JPG (mainly due to WWW), so Sun just chose those to implement.

-Nate
DJNattyP
DJNattyP
lupine -

I would consider Javas only weaknesses to be related to it being a partially interpreted language. These are:

1.) It''s a little slower than C/C++.

and

2.) You have to supply the interpreter to run the program.

However, the solutions to these problems are pretty simple.
1.)The speed issue is not a problem with most games.
2.) a.)make your program an applet. Unless someone has a really old browser (or unless you are using some of the newer Java stuff like Swing) if they can get to your program on the WWW they can use it. However, applets have some restrictions on them for security (such as cannot save files on the users computer, cannot access all system info, etc.) so you could also do -
b.)provide the Java Runtime Environment (JRE) with your program as one of the Anons suggested. This way you can use all the newer stuff like Swing and Java2D to make your program look better.

Hope this helps!

-Nate
felonius
felonius
quote:
Original post by DJNattyP

lupine -

I would consider Javas only weaknesses to be related to it being a partially interpreted language.

These are:

1.) It''s a little slower than C/C++.

and

2.) You have to supply the interpreter to run the program.



You don''t have to. There are plenty of native code compilers available for Java, meaning that your code will be compile to machine code and WILL NOT BE INTERPRETED - and much faster.

Read the forum FAQ for more info. Or read this article http://www.rolemaker.dk/articles/WhyJavaCanBeUsedForGames/index.htm

Running the program as an applet is not the solution. The VM part of browsers are the slowest ones available and you force users to download everything everytime they use it - and you can can native DLLs. So don''t use applets if you are serious about game development with Java.

Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games
lupine
lupine
I belive the JavaVirtualMachine
is shipped on current Macs and Pc''s
Leaving only Linux boxes needing to "get"
the VirtualMachine.
I will indeed look into compiling my code(machine)
"do you like my helmut?"-yoghurt
lupine
lupine
Did anybody see the news today on the main page
entitled "How to distribute a java game"
aw yeah
"do you like my helmut?"-yoghurt

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.