Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] Java Vs C w OPEN GL


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
10 replies to this topic

#1 lupine   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 October 2000 - 10:21 AM

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?

Sponsor:

#2 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 October 2000 - 10:29 AM

Try starting with the FAQ for this thread... it may answer some of your initial questions.

http://games.cpbinc.com/faq

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 13 October 2000 - 04:34 PM

1So, can Java really run on all these machines?

yes


2Are Java games unstable or "crash happy"?

no, in my experience they are more stable

3Do all high end computers have Virtual JAva Machine?

I think all computers have the basic JVM, not sure

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?

yes it is much easier and natural.

6. Is Java *really* slow? I am only needing 2D 256colors?

Not that slow. Unless you are trying to make a game with high requirements java should be fine

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?

java is good, you can do a lot of stuff, even save and load objects directly to files, as well as more conventional text files. My only complaint is that you can''t load .bmp or .pcx files and instead have to go with gif and jpg







#4 lupine   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 October 2000 - 06:56 PM

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"

#5 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 13 October 2000 - 08:10 PM

>> 3Do all high end computers have Virtual JAva Machine?

> I think all computers have the basic JVM, not sure

They do not all have it installed by default. For instance, Windows has one installed in the browser but that is *very* slow and not directly usuable by you. When you finally deploy your program it would be a good idea to deploy the Java Run-time environment (JRE) with your program or direct your users to Sun''s site for a free download.

> My only complaint is that you can''t load .bmp or .pcx files and instead have to go with gif and jpg

It is quite easy to write .bmp and .pcx loaders yourself. I have actually written some myself in C++ in days past. It will take you just a few days to do.

Jacob Marner

#6 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 13 October 2000 - 09:11 PM

good idea, I should learn to write one. It just seems kind of silly that they didn''t make it know more formats in the first place.

#7 DJNattyP   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 October 2000 - 12:01 AM

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

#8 DJNattyP   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 October 2000 - 12:16 AM

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

#9 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 October 2000 - 04:16 AM

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


#10 lupine   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2000 - 09:38 AM

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)

#11 lupine   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 October 2000 - 12:57 PM

Did anybody see the news today on the main page
entitled "How to distribute a java game"
aw yeah




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