Jump to content
  • Advertisement
Sign in to follow this  
TreeSaaaaap

How to transition into Game Dev with Java

This topic is 1570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

 

I've been working in Java for a little while now (after learning some Python and C++) and I'm feeling more comfortable with Java syntax more than the other languages so far.

 

I'm looking for a resource that will help me to better understand (in-depth) how to actually render terrain and models, and at some point help me understand the process of doing this with a client/server connection.  I find some decent articles and reading out there, but these things still confuse me.

 

I realize that it's a bit advanced, but it is something I could work towards as a hobby.  I'd love to create a multiplayer game similar to Ultima Online.  But if I could figure out how to render a map like that (isometric and terrain/tiles?) and have it work as a multiplayer game I'd be extremely happy.  Did UO use a heightmap, large bitmap, or just render a huge map of small tiles right next to each other?

 

Also, would you guys suggest trying the jmonkeyengine?

 

Lastly, this might be a dumb question but how is gear rendered both on a player, and in a paperdoll with the ability to die a section of armor?  Graphics programming seems extremely difficult.

 

What would you guys suggest as a decent resource for transitioning from basic Java to understanding some graphics and server/client programming?

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement

For 3D applications you can use built in libraries, or try download a 3rd party API .

 

 Believe it or not, Java's built in libraries make it very easy to do many different types of networking applications ( socket programming ).

You can start with a simple chat program, move up to sending objects using serialization , than try your hand at multithreading .

 Once you get this part learned, it is very simple to create the network backbone for almost any kind of game.

 

Edit: Java is not a language to use for large scale 3D games. Attempting to render complex 3D shapes with texture mapping and lighting can bring your game to a screeching halt.

 (( Java is a perfectly fine language to use for 2D MMOs, and non graphic intensive 3D games ))

Edited by Shippou

Share this post


Link to post
Share on other sites

To mention one more useful framework, look at libgdx. It has more suitable framework for making games than lwjgl or jogl. For the 3d part you have lwjgl wrapped in. For physics you have integrated box2d. For detailed feature list look here.

Edited by kazisami

Share this post


Link to post
Share on other sites


If you want to learn 3D programming on your own, you'll need an OpenGL wrapper, both LWJGL and JOGL are up and running. I use LWJGL but you can use whatever you like most. Oh, and you need a good tutorial on modern OpenGL like this one to get you up and running on all the math and rendering concepts (nevermind the C++, OpenGL calls are the same in whatever wrapper you use).

 

+1  Graphics programming is always changing.  It is less important to learn a specific technology (like Java) and more important to learn the concepts.  You can do it with Java, but it really doesn't matter on the language.  Right not, with all the bare metal APIs coming out, who knows if even learning the current OpenGL API will be that useful.  So don't worry too much about the technology, and learn the concepts.  

 

Use modern OpenGL to become familiar with a matrix, projections, lighting, materials, textures, collision detection, models, animation, etc...  Use Java because you're already familiar with it and don't need to learn new stuff.  But keep it in the back of your mind that all these libraries will keep changing, so it is more important to understand what they are doing than to memorize function names.

Share this post


Link to post
Share on other sites
Edit: Java is not a language to use for large scale 3D games. Attempting to render complex 3D shapes with texture mapping and lighting can bring your game to a screeching halt.

 (( Java is a perfectly fine language to use for 2D MMOs, and non graphic intensive 3D games ))

 

Eh, I wouldn't worry too much about "rendering complex 3D shapes and texture mapping and lighting", and so on as that's going to be hardware accelerated. It's not like your choice of language is going to greatly impact that.

 

The biggest pain point in my opinion is the lack of structs in Java. All your math "objects" are exactly that, objects allocated on the heap. So you're going to have to worry about allocations during updating/rendering (gotta be smart about it, e.g. extensive use of pooling). Then of course concerns about performance with a managed language where code is being JIT'ed on the fly. Certainly not going to get the performance of native in that regard, but that doesn't mean you can't do serious graphics programming. Far from it!

 

If you want a more comprehensive package, jMonkeyEngine is a good platform. I used to use it back in the day, but they've made some big strides the last time I used it (or used Java...heh I'm mainly a .NET developer and personally prefer using C# over Java and Direct3D over OpenGL, but that's me). It has a lot of stuff out of the box, so you may not be finding yourself right from the get go doing complex low-level stuff (or writing shaders).

 

But if you really want to learn graphics programming I would go with the low-level wrappers around OpenGL or Direct3D (although, are there any D3D wrappers out there for Java?) such as LWJGL. And like Glass said, search for "Modern OpenGL", e.g. programmable pipeline.... --> OpenGL Bible 6th Edition. There's a plethora of tutorials and material out there that use fixed function, which at this point is legacy, so it can be confusing and overwhelming when first starting.

Edited by Starnick

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!