Jump to content

  • Log In with Google      Sign In   
  • Create Account


Java and graphics APIs


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

#1 WiseTree   Members   -  Reputation: 115

Like
0Likes
Like

Posted 05 May 2013 - 11:41 AM

Hello,


In recent past I've been working on a game engine for actionscript 3. I was doing it in as3 because it's portable, I quite liked the graphics APIs and everything seemed quite natural for me there. Recently I lost all of my work and I'm thinking about rebooting my project in Java.

Now the reasons are:

 

1. I'm a uni student and I just had a year-long project, which was written in java. So I think I'm reasonably good with the language (especially since I was taught of things about it in the uni, so I'm aware of some subtleties, etc.). 

2. It fits my game design slightly better than as3 (since I'm thinking of possible controller support).
3. It's more efficient. The more I looked into graphics performance in as3 the more I realised that if I want to have good performance with a lot of particles, as3 might not be a good choice.

I had a graphics and vision course lately and I want to play around with direct pixel manipulation as well (for prettyness!). Since as3 doesn't support GPU acceleration (I think ohmy.png), it would slow down my engine even more.

So finally to the question: how good are java APIs when it comes to graphics? (e.g. AS3 had a built-in method for hit testing for bitmaps, does java have anything of the sorts?)

How good is java when it comes to 3D?
Share your experiences with java and graphics.



Thanks in advance!

 



Sponsor:

#2 Glass_Knife   Moderators   -  Reputation: 3492

Like
3Likes
Like

Posted 05 May 2013 - 12:14 PM

Java 2D out of the box is a good API, but will not have the things you need for game programming.  It is lacking input and sound.  As for 3D, you can use JOGL with OpenGL, but I would suggest using a 3d party library.

 

http://www.slick2d.org/

http://www.lwjgl.org/

http://libgdx.badlogicgames.com/

 

Depending on your requirements, one of the above libraries should suit you just fine.


I think, therefore I am. I think? - "George Carlin"
Indie Game Programming

#3 WiseTree   Members   -  Reputation: 115

Like
0Likes
Like

Posted 05 May 2013 - 01:24 PM

What exactly does the default lack in terms of game programming? Is it just input and sound? Since essentially for me this is just learning experience - I don't want to just make a game, I want to make it learning as much as I can, so maybe I can try to program it myself and see how that would work.



#4 Glass_Knife   Moderators   -  Reputation: 3492

Like
2Likes
Like

Posted 05 May 2013 - 01:30 PM

If you want to do the input and sound yourself, check out

 

http://jogamp.org/jogl/www/ - OpenGL for graphics

http://jogamp.org/joal/www/ - OpenAL for Sound

https://java.net/projects/jinput - JInput for Input

 

This is what LWJGL is doing behind the scenes if you wanted to learn it all yourself.


I think, therefore I am. I think? - "George Carlin"
Indie Game Programming

#5 WiseTree   Members   -  Reputation: 115

Like
0Likes
Like

Posted 05 May 2013 - 02:01 PM

That's very helpful, thanks!



#6 stein102   Members   -  Reputation: 475

Like
1Likes
Like

Posted 05 May 2013 - 06:33 PM

Slick2d/LWJGL is a good option.



#7 3Ddreamer   Crossbones+   -  Reputation: 2977

Like
1Likes
Like

Posted 06 May 2013 - 08:31 PM

Hi,

 

Java APIs have been used to create world-class games and simulations.   The graphics area where you have a question is one of the strong areas of this development.  In my opinion it often results in a perfect match of performance and quality graphics.   The shadows, anti-aliasing, shading, bump-mapping, sounds, collision detection, damage model, and input configuration are all strong areas.  It tends to lend itself well to realism and departing from fantasy environments, but I have seen some fabulous fantasy games made in this genre.  Cross-platform, OS and hardware, is built into them which is another consideration for some developers.

 

About image file formats, bitmaps are a good choice when performance is not an issue, but otherwise with performance critical games then JPEG would be a better choice.  Lossless images add to a big demand in performance in scenes where there are many of them.  For performance demands, then also include shading and in particular bump-mapping. 

 

A good Java API will make all of these choices available to you.  Third party libraries with well designed editors are another matter for choosing an API, such as terrain editors.


Edited by 3Ddreamer, 06 May 2013 - 08:35 PM.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#8 3Ddreamer   Crossbones+   -  Reputation: 2977

Like
0Likes
Like

Posted 06 May 2013 - 08:40 PM

By the way, take a look at jMonkey:

http://jmonkeyengine.com/

http://jmonkeyengine.com/showcase/

 

If you look at all the variety of games being made, then you see that almost anything is possible.


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#9 Aldacron   GDNet+   -  Reputation: 3065

Like
2Likes
Like

Posted 06 May 2013 - 08:42 PM

Java2D has a number of issues for game development that you can read more about in the javagaming.org forums if you really want ot. Slick2D was the go-to library for a while in the world of 2D Java game dev, but it isn't anymore. libgdx is where all the action is. It's a brilliant library that allows you to get your game on a number of platforms that pure Java doesn't. Plus, it uses the modern programmable pipeline of OpenGL under the hood. The guy who developed Slick2D is making his newest game with libgdx.

If I were starting from scratch right now with a 2D Java game, libgdx would be a no-brainer.



#10 3Ddreamer   Crossbones+   -  Reputation: 2977

Like
0Likes
Like

Posted 06 May 2013 - 08:54 PM

Community support for the beginner may be more important than the game engine itself.


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer





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