|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| Java2D or JOGL |
|
![]() Si Hao Member since: 4/23/2006 From: Johor Bahru, Malaysia |
||||
|
|
||||
| I am currently making a simple clone of Dungeon Siege. The difference being my game has a 2D top down view instead of full 3D and players only control one character at a time. What I am doing is to create a simple functional game as a learning process, before improving upon it gradually. For example changing from top down view to full 3D. Here is the question, should I use Java2D to do my rendering now as it is easier, but will need a code rewrite when I convert my game to 3D, or should I use JOGL for rendering while learning it in the process. Any advice is appreciated. |
||||
|
||||
![]() princec Member since: 3/5/2002 From: United Kingdom |
||||
|
|
||||
| LWJGL, of course ;) Cas :) |
||||
|
||||
![]() Son of Cain Member since: 8/6/2004 From: Curitiba, Brazil |
||||
|
|
||||
| The point that really requires a thought is how are you going to model your game logic, having that switch of rendering technology in mind. You must concentrate first in a good set of interfaces and abstract classes to provide the functionality you require from your game objects, but keeping them uncoupled from a rendering interface. If you achieve that, you are free to adapt your code to whatever rendering interface you please: Java2D, JOGL, or.. LWJGL :p So my advice to you is: before you even wonder if you should use 3D from the beginning or not, worry about building a consistent and flexible design for your game objects. A hint of a good work is the presence of interfaces such as Collideable, Localizable, Movable, Drawable, etc.. You can work with abstract terms in code, and switch only the concrete rendering layer when changing from 2D to 3D. Son Of Cain |
||||
|
||||
![]() Si Hao Member since: 4/23/2006 From: Johor Bahru, Malaysia |
||||
|
|
||||
| Thanks for the replies. I have been trying to keep my code as flexible as possible, thanks for bringing up more things to consider :) Guess I will stick with Java2D first and only go into a new API when I iron out all the bugs and design issues. |
||||
|
||||
![]() capn_midnight GDNet+ Member since: 9/11/2000 From: Chambersburg, PA, United States |
||||
|
|
||||
| Java2D can run with hardware acceleration in Java5, so speed isn't an issue. I've used Java2D for a lot of things. It's definitely a good API to learn, I use it all the time at my current job. Additionally, you won't have to include any 3rd party dependencies in your app, the JRE comes with Java2D (not the case with JOGL, or JSR-231 as it's now called). "aut viam inveniam aut faciam"---[My Site]---[Some Research and Development]---[3H-GDC]---[An Art Gallery] |
||||
|
||||
![]() princec Member since: 3/5/2002 From: United Kingdom |
||||
|
|
||||
| ...MacOS... 1.4.2 mostly.... no h/w acceleration... ahem :) Cas :) |
||||
|
||||
![]() capn_midnight GDNet+ Member since: 9/11/2000 From: Chambersburg, PA, United States |
||||
|
|
||||
Quote: Uh, Java5 is available for OSX. "aut viam inveniam aut faciam"---[My Site]---[Some Research and Development]---[3H-GDC]---[An Art Gallery] |
||||
|
||||
![]() princec Member since: 3/5/2002 From: United Kingdom |
||||
|
|
||||
| "Available" != "widely distributed" Cas :) |
||||
|
||||
![]() capn_midnight GDNet+ Member since: 9/11/2000 From: Chambersburg, PA, United States |
||||
|
|
||||
Quote: Actually, it's distributed as an OS Update, pretty much everyone on OSX should have it. However, the same relationship can be made for OSX... "aut viam inveniam aut faciam"---[My Site]---[Some Research and Development]---[3H-GDC]---[An Art Gallery] |
||||
|
||||
![]() princec Member since: 3/5/2002 From: United Kingdom |
||||
|
|
||||
| Sadly completely untrue :( For a start it only runs on 10.4+, and most of the OS X visitors I get are using 10.3 or even 10.2 still. In fact I've got some actual real stats here... let's see... here's the stats for the last 3 months: 1.4 18049 84% 1.5 3384 16% 1.6 1 0% (haha) So there you have it. Will be a few years yet before it's sensible to target 1.5 for games dev. Cas :) |
||||
|
||||
![]() Son of Cain Member since: 8/6/2004 From: Curitiba, Brazil |
||||
|
|
||||
| You can always bundle a JRE of the specified version with your game, can't you? Also, the folks at Three Rings require 1.5 for their "Bang! Howdy" game. If they can safely assume people will upgrade their JREs to play, can't the boy here do the same? :D Don't want to disagree with you Cas, knowing that you work on this biz, I know that yours aren't groundless statements. But aren't we supposed to estimulate the updates in some sort of way? Son Of Cain |
||||
|
||||
![]() princec Member since: 3/5/2002 From: United Kingdom |
||||
|
|
||||
| Turns out you can't expect people to upgrade their JREs to play. I won't even do it myself, I'm that lazy :) But also - you can't change the JRE on a Mac. So if you target 1.5 on Windows you're OK because you can bundle the JRE in the installer but on a Mac you're at the mercy of statistics. There is some percentage that will upgrade just to play your game but the fact is, it's just a small percentage, meaning a rather larger percentage of lost opportunity. Especially given the extremely bouyant Mac market. O'course the OP might actually not care about Mac development at all which would be a shame but there you go. Cas :) |
||||
|
||||
![]() Si Hao Member since: 4/23/2006 From: Johor Bahru, Malaysia |
||||
|
|
||||
| Thanks guys for pointing out that not everyone can use 1.5. Had always assumed I can solve the problem by packaging the JRE in the game itself...guess not. I will still go ahead with 1.5, because this game is more of a learning project to improve my Java then a game meant for wide distribution possibly played by myself and some friends (as testers). |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|