View previous topic - View next topic |
Author |
Message |
Xegnma Monkey-Butler
Joined: 03 Apr 2003 Posts: 53 Location: Trapped in Middle Earth
|
Posted: Mon Sep 13, 2004 5:29 pm Post subject: Java and Game Programming |
[quote] |
|
Just out of curiousity, has anyone here ever tried making a game with Java? I can't say I know much about the language other than that it's object-oriented and highly portable. But I understand that it's being used to develop mobile phone games as well as software for other handheld devices. What I want to know is if it's a good language for game development.What about issues concerned with speed and overall game performance? How well can java deal with these issues? Any takes on this...
|
|
Back to top |
|
|
Happy JonA's American snack pack
Joined: 03 Aug 2002 Posts: 200
|
Posted: Mon Sep 13, 2004 6:33 pm Post subject: Re: Java and Game Programming |
[quote] |
|
Xegnma wrote: | Just out of curiousity, has anyone here ever tried making a game with Java? I can't say I know much about the language other than that it's object-oriented and highly portable. But I understand that it's being used to develop mobile phone games as well as software for other handheld devices. What I want to know is if it's a good language for game development.What about issues concerned with speed and overall game performance? How well can java deal with these issues? Any takes on this... |
Eh, it's alright.
|
|
Back to top |
|
|
SyntheticElephant Lowly Slime
Joined: 04 Apr 2004 Posts: 4 Location: New York
|
Posted: Mon Sep 13, 2004 7:48 pm Post subject: Re: Java and Game Programming |
[quote] |
|
I've used Java to develop a few small games. There are some tutorials out there for dealing with using Swing and the new Image classes to accelerate blitting of graphics. As always there is overhead involved with using the virtual machine and all. However, speed was never really a large concern even on some of the larger projects I made with it (a multiplayer risk-clone). I haven't done anything in the realm of 3d programming, however I have heard horror stories about drops in speed compared to other languages. So I guess it all depends on what you are doing with it.
|
|
Back to top |
|
|
BigManJones Scholar
Joined: 22 Mar 2003 Posts: 196
|
|
Back to top |
|
|
Xegnma Monkey-Butler
Joined: 03 Apr 2003 Posts: 53 Location: Trapped in Middle Earth
|
Posted: Tue Sep 14, 2004 10:42 pm Post subject: |
[quote] |
|
Thanks for the input guys(you too happy). As it turns out, I amdoing an introductory course (in Java) this semester and started wondering how feasible the language was as far as game programming is concerned. I find I kinda like it. I',m very impressed with the idea of "write once, run anywhere". Gonna check out some of those links now... thanks again
|
|
Back to top |
|
|
janus Mage
Joined: 29 Jun 2002 Posts: 464 Location: Issaquah, WA
|
Posted: Wed Sep 15, 2004 3:10 am Post subject: |
[quote] |
|
Java is a big timesaver but if you want to make games with it, prepare to deal with dozens of incompatibilities and performance issues. For example, a friend was stuck using it to develop a game for his thesis project and discovered that certain versions of the JRE refused to run his game correctly on macs, while other versions refused to work on Windows, and so on. Definitely not 'write once, run everywhere' - though it's still a lot easier to work with than C++.
|
|
Back to top |
|
|
biggerUniverse Mage
Joined: 18 Nov 2003 Posts: 326 Location: A small, b/g planet in the unfashionable arm of the galaxy
|
Posted: Wed Sep 15, 2004 1:31 pm Post subject: |
[quote] |
|
The other thing is that when developing in Java, you don't have a feel for the machine. You hardly optimize, or even know where to look. Java keeps everything to do with memory management away from the user - for better and worse.
Another rule of thumb: read up on temporary object creation, GC, and the Object Eden; and try to limit object creation as much as possible, esp. in inner loops. _________________ We are on the outer reaches of someone else's universe.
|
|
Back to top |
|
|
BigManJones Scholar
Joined: 22 Mar 2003 Posts: 196
|
Posted: Thu Sep 16, 2004 2:06 am Post subject: |
[quote] |
|
biggerUniverse wrote: | The other thing is that when developing in Java, you don't have a feel for the machine. You hardly optimize, or even know where to look. Java keeps everything to do with memory management away from the user - for better and worse.
Another rule of thumb: read up on temporary object creation, GC, and the Object Eden; and try to limit object creation as much as possible, esp. in inner loops. |
The incremental gc is so good you don't even need to worry about object creation nowadays. The JIT compiler does better optimization than you ever could (you being 99% of the non-Abrash programmers in the world).
Quote: | Java keeps everything to do with memory management away from the user - for better and worse. |
I've not seen a 'worse' yet; especially given the incremental gc.
There are problems with Java;
1. Like Janus said, Apples vm's have lagged behind, but windows and linux have been very consistant for a few years now.
2. The AWT event thread can introduce some problems ie random pauses.
3. For very large data sets like a quake 3 bsp levels memory overhead per object and potential nonlinear memory alignment can/will wreck performance.
If your not doing anything esoteric then vm inconsistancies won't be a problem.
|
|
Back to top |
|
|