Is using Java a good way to create a game?

Started by
12 comments, last by Serapth 10 years, 2 months ago

OpenGL is an interface for the video card - so calling opengl functions is the way that you ask the video card to draw stuff - you aren't actually "drawing" anything yourself - you provide opengl with the data by calling functions and then you have it draw using that data by again calling functions

Okay, and what if I wanted to "draw" characters? Would I have to be able to determine a bunch of coordinates, height, width, etc. for each character I want designed?

Advertisement

You would draw your character sprite sheets (assuming you are talking 2d here) on regular image formats - png, jpg, whatever - then you would render those images on to quads which will have dimensions determined by the vertices that make up the quad.. a quad consists of 2 triangles which is 6 vertices..

The process of drawing the quad and rendering a loaded texture to that quad is different if you are using shaders or not - it is at least a few pages to describe these processes but there should be plenty of tutorials on how to do this using java/opengl

basically your characters would be sections of a sprite sheet texture rendered on to the quad - you can transform this quad around the screen and cycle through your sprite sheet to animate the character

Okay, thank you. I will definitely have to do more research on that topic. But your explanation did help me understand the concept.

I spent many many many many moons selecting a game engine / programming language combo that fit my criteria ( 2d/3d support, cross platform, code focused, quick, productive, good community ), trying literally hundreds of libraries and at the end of the day I went with Java and LibGDX.

Ironically, I am not even all that big of a Java fan. After years as a C# programmer, Java feels like a warty C# to me. The library however ultimately won me over.

This topic is closed to new replies.

Advertisement