• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Shmoopy

Beginning graphics

10 posts in this topic

Hey all. 

 

I'm new to game programming but I've been programming in general for at least a few years. I need to know where to start with graphics as I've never worked with moving graphics or anything like that before. My best language by far is Java so that's what I'll be using. Once I gain some knowledge my ultimate goal is to make a very simple top-down sprite art RTS game if that helps you understand what I need to learn. 

 

Thanks!

2

Share this post


Link to post
Share on other sites

Light weight Java Game Library or lwjgl - http://lwjgl.org/

 

I believe it is a binding for OpenGL, OpenAL, OpenCL, and GLSL.

 

Minecraft used this library. It could be fun to try and create some minecraft mods to get some learning in. 
http://www.minecraftforge.net/wiki/Basic_Modding.

 

It looks like you want to do 2D as your ultimate goal though so you can look here

http://lwjgl.org/wiki/index.php?title=Space_Invaders_Example_Game

2

Share this post


Link to post
Share on other sites

Hi,

 

 

I feel that jMonkey is great for a Java beginner in game development.  You can tweak the game engine source code with a pretty liberal license, too.  Since you already know Java fairly decent, then get to know Blender which is part of the typical workflow pipeline for jMonkey.  No need to reinvent the wheel, or reinvent anything else for that matter.

0

Share this post


Link to post
Share on other sites

I myself wish to throw in LibGBX as a java tool. When you are done you can launch to android and computer if you wish with very little work. However, I haven't played with any of the other libraries mentioned, so I recommend looking into each and seeing what looks simplest to you. (I mainly needed to rotate some sprites for android when I found LibGBX, as doing the OpenGL ES got a tad annoying)

1

Share this post


Link to post
Share on other sites

I'm using Swing for my game project. It's not particularly powerful nor optimized for gaming, but for something simple like what you describe, it should do the trick. If all you need is a game loop, a window, mouse and keyboard control, and the ability to draw sprites and text, then Swing has you covered. Plus, it has the advantage of being built into Java, so no carting around libraries full of stuff you might not need. The Oracle documentation on the Swing API is quite thorough, so I recommend starting there.

0

Share this post


Link to post
Share on other sites

As an addition to the game library, it seems you might be confused about just how graphics move. This is usually done in an update loop that changes what the user sees based on events. For example in pong, the up key (event) will be held for 200 milliseconds. Based on this, the paddle might move 20 pixels. The update loop redraws the screen and provides the new image. Events are controlled by often controlled by booleans. Is upkey pressed?

There is also some opportunity for animators to run a sequence of images when an event happens.

Hopefully this doesn't insult your intelligence and someone else could probably give a more cohesive explanation. I just have been thinking about that question recently. How do images actually move?

0

Share this post


Link to post
Share on other sites

Java has Swing or AWT as the workhorse for windowing and whatnot. I hear they're not all that great for games, but that's pretty much all I've been using because I can't be bothered to look for anything else XD I think Oracle has some tutorials on how to work with those APIs, you might want to find those.

Swing is aiming for deprecation due to Java FX and its usefulness is currently found only in select mobile devices. Just a friendly FYI.

 

Shmoopy, I don't know if you wanted to create a game or a game engine, so I included suggestions for both.

Game Engine: If your aiming strictly for graphics, it sounds like a game engine is what your aiming for. Assuming so, and if your not aiming for any special platform, you'll want to study the following Doc Overviews (API):


Java SE 6 or above: http://docs.oracle.com/javase/6/docs/api/ - Core Java (Study multi-threading and how to make things thread safe).

Java FX 8: http://download.java.net/jdk8/jfxdocs/ - Use for interface design (Is replacing Swing)

JOGL: http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/ - (Use for OpenGL Rendering).

 

If you intend to access a relational databases using the JDBC or doing any business logic (Struts, Hibernate, Spring), you'll need to go into this too:

Java EE: http://docs.oracle.com/javaee/5/api/

 

* If you intend to use the Hadoop DB, just focus on your JavaScript and Java Core and disregard the need for JavaEE.

 

 

Game: Assuming you want to make a game, I would suggest using the jMonkey engine. They have a modified version of the Netbeans IDE specially tailored to their needs, which can be accessed by going to this site: http://jmonkeyengine.org/

 

Once you install their IDE, I would suggest refreshing up with their Doc Overview found here: http://hub.jmonkeyengine.org/javadoc/

 

 

If you intend to make a game for a specific platform, you may need to adjust my suggestions above to tailor your needs. As an example, I do not believe Java FX is supported on Android (where use of Swing may be needed). Also, Google has their own API which (and correct me if I'm wrong) has their own version of a OpenGL library nullifying the need for JOGL.

 

Likewise, you may also want to consider your legal direction. jMonkey engine and their IDE are copy left licensed (GNU Version 2+). If you want to sell the game, don't make it with jMonkey.  If you want to sell service with the game, you should be fine but I would suggest reading up on the legal details here: http://en.wikipedia.org/wiki/GNU_Free_Documentation_License

 

Hopefully, this'll give you a good start. Feel free to add to this suggestion all, as my suggestion is very broad, basic and general.

 

 

 

- For the record, I don't make games (yet). I just code business logic and had some exposure to game development in general.

2

Share this post


Link to post
Share on other sites

Starting with JavaFX (its been included since Java 7 AFAIK), while it might be harder than starting with Swing, it's a better move in the long run IMO.

 

It's a common issue, Swing has been out for a very long time, so there are tutorials, books, documentation, examples, everything. JavaFX is more green but it will simply best Swing in the next years (it has to).

 

Besides, its scene graph architecture lends itself better to what you'd find in a game.

1

Share this post


Link to post
Share on other sites

 

Java has Swing or AWT as the workhorse for windowing and whatnot. I hear they're not all that great for games, but that's pretty much all I've been using because I can't be bothered to look for anything else XD I think Oracle has some tutorials on how to work with those APIs, you might want to find those.

Swing is aiming for deprecation due to Java FX and its usefulness is currently found only in select mobile devices. Just a friendly FYI.

 

Shmoopy, I don't know if you wanted to create a game or a game engine, so I included suggestions for both.

Game Engine: If your aiming strictly for graphics, it sounds like a game engine is what your aiming for. Assuming so, and if your not aiming for any special platform, you'll want to study the following Doc Overviews (API):


Java SE 6 or above: http://docs.oracle.com/javase/6/docs/api/ - Core Java (Study multi-threading and how to make things thread safe).

Java FX 8: http://download.java.net/jdk8/jfxdocs/ - Use for interface design (Is replacing Swing)

JOGL: http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/ - (Use for OpenGL Rendering).

 

If you intend to access a relational databases using the JDBC or doing any business logic (Struts, Hibernate, Spring), you'll need to go into this too:

Java EE: http://docs.oracle.com/javaee/5/api/

 

* If you intend to use the Hadoop DB, just focus on your JavaScript and Java Core and disregard the need for JavaEE.

 

 

Game: Assuming you want to make a game, I would suggest using the jMonkey engine. They have a modified version of the Netbeans IDE specially tailored to their needs, which can be accessed by going to this site: http://jmonkeyengine.org/

 

Once you install their IDE, I would suggest refreshing up with their Doc Overview found here: http://hub.jmonkeyengine.org/javadoc/

 

 

If you intend to make a game for a specific platform, you may need to adjust my suggestions above to tailor your needs. As an example, I do not believe Java FX is supported on Android (where use of Swing may be needed). Also, Google has their own API which (and correct me if I'm wrong) has their own version of a OpenGL library nullifying the need for JOGL.

 

Likewise, you may also want to consider your legal direction. jMonkey engine and their IDE are copy left licensed (GNU Version 2+). If you want to sell the game, don't make it with jMonkey.  If you want to sell service with the game, you should be fine but I would suggest reading up on the legal details here: http://en.wikipedia.org/wiki/GNU_Free_Documentation_License

 

Hopefully, this'll give you a good start. Feel free to add to this suggestion all, as my suggestion is very broad, basic and general.

 

 

 

- For the record, I don't make games (yet). I just code business logic and had some exposure to game development in general.

 

I did some follow up research on my own comments, just to validate it's accuracy. I like this stuff and like to sharpen my skills in it so it was no bother to me.

 

First off, for mobile development, you wouldn't use Java FX.  Rather, you would use Java ME.  However, there is a Google variant of this (and a lawsuit from Oracle because of such). I'm pretty confident in saying that this Google variant is likely a better option for games, as Oracle has a habit of aiming strictly for business logic and applications.

 

Also, I did verify that Java SE has a Java 3D API. Unfortunately, the feed back regarding this is awful.  I still stand next to JOGL.  You might be interested in watching this for further information regarding JOGL: 

 

http://www.youtube.com/watch?v=X3Id2VGR1Ik&feature=youtu.be&t=307

 

 

I also found out that the Unity engine is now supporting Java. It uses the IKVM.NET framework that converts the Java code into C#. It seems to have been tested enough to validate it's working functionality. Based on the reading, Unity was originally designed to work only with JavaScript. However, it was later expanded onto C# compatibility but did not include the IKVM.NET framework at the C# integration phase. The most current version of Unity now supports the IKVM.NET framework, which now provides Java to C# translation support. Not exactly something sounding reliable yet but might be worth researching.

Here's some information regarding Java and Unity support:

 

http://answers.unity3d.com/questions/15308/can-i-access-java-code-from-unity.html

http://www.ikvm.net/

 

 

Additionally, here is something that might help you even further, assuming you wanted to make games on an Android platform: http://hub.jmonkeyengine.org/wiki/doku.php/jme3:eclipse_jme3_android_jnindk

 

 

Hope this helps further.  Wish Java was more often used for stuff other than business presentation, business logic and  database access. It's practically sitting on a bed of gold, which is being swept away by C#.NET.

Edited by Subtle_Wonders
2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0