Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (515)
Games in Android Showcase (122)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Hello, and OpenGL?  (Read 572 times)
0 Members and 1 Guest are viewing this topic.
Offline goblinJoel

Junior Duke


Medals: 2



« Posted 2013-11-27 14:33:53 »

Hello! I'm a newbie as far as video game development goes, and I suppose to Java as well. Maybe intermediate. I've been programming in a couple of classes and in spare time since 200...5? -ish? So, I understand a lot of basic programming concepts and thought processes, but not a lot of the lower-level science and engineering, and most of my experience is in Java. I leave it to you to label my skill level.

I wanted to join this forum because it's one of the two places I've frequently found answers while Googling for my own questions, because it only seemed right that as a person trying to make a game in Java I should join a Java game dev forum, and because I have questions. So, thanks for having me (so far!).

My question right now is, what risks (in terms of licensing, cross-platform compatibility, and system requirements) and learning curves am I in for if I switch to OpenGL rather than throwing BufferedImages onto an AWT Canvas and a BufferStrategy with Graphics2D?

Background: I'm trying to make a pseudo-isometric, 2d, tactical RPG. It is intended to be a commercial release, however long it takes us to get there. I'm developing in Java 6 SE, with nothing extra at the moment because licenses scare me, and I honestly don't know how distributing it would work once I go beyond the built-in stuff. I'd really love it to run at no work for the user on Windows XP and onward, recent versions of Mac OS X, and the more popular Linux distributions. I'd love for it to run at at least 30fps on my 1.6GHz netbook. So, I'm casting a pretty broad net. The OpenGL question is being pressed because our Illustrious Art Director is very interested in using Sprite Lamp for dynamic lighting. I got the game to process a normal map (this one) to light a blank, grey square that covers maybe 2/3 of the game window, but this dropped the fps from 174 to 7 on my mid-range machine.

If anyone is interested in giving advice or suggestions on OpenGL or alternate routes (I could post my normal mapping code), or just a link to a topic I've missed where this has been covered before, I'd appreciate the help.

Thanks, and hope that question wasn't too demanding for a newcomer!
Offline philfrei
« Reply #1 - Posted 2013-11-27 19:03:30 »

Welcome!

The most recent thread on distribution rights that I've seen here at JGO is the following:
http://www.java-gaming.org/topics/my-game-have-creative-commons-resources-images-audio-can-i-still-sell-it/31284/msg/290494/view.html#msg290494

It is mostly about content, not the code libraries, though code libraries get discussed too.

I think for the most part, code licenses are set up to allow you to use them as long as you make the source code (of that library) available. In some cases all you have to do is provide a link to the source in a "Help" or "About" tab.

But the thing to do is to consult the library itself and see what license they use. Usually the code has headers that discuss the terms. And the licenses will usually have wikipedia entries as well as their own url's which include FAQ's and forums.

"It's after the end of the world! Don't you know that yet?"
Offline CodeHead

JGO Knight


Medals: 41


From rags to riches...to rags.


« Reply #2 - Posted 2013-11-27 20:16:52 »

The core OpenGL libraries are pretty open unless you are a hardware vendor. Libraries which utilize OpenGL can carry their own sets of restrictions. LWJGL for instance has very few requirements that must be followed when developing with it. Others such as JOGL have multiple licences attached which can make compliance a bit trickier depending on what you're doing, but none seem to be overly draconian in nature.

Most organizations/authors are more than happy to answer questions you may have about compliance.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline goblinJoel

Junior Duke


Medals: 2



« Reply #3 - Posted 2013-11-28 01:54:13 »

Oh, wow. I forgot LWJGL's license was so short. Thanks for the link, and for both of you responding. I've looked at it before, and I guess I really was just being paranoid. I think I remember some games (Revenge of the Titans, maybe?) just having the LWJGL notice as a screen in their installer. If that's all I have to worry about, maybe I should stop doing things the hard way. Tongue

philfrei, I did see that audio thread the other day. Confusions like the one in that thread over whether the game aside from the assets themselves would have to be freed to use CC audio are a big reason I've been hesitant to stray outside the bounds of Java SE, but I suppose I really have nothing much to lose with some of the more permissive licenses.

OpenGL is pretty universal, right? If I moved my rendering over to LWJGL, would I be shutting out older computers, people with integrated graphics cards, etc? Would I be opening myself up to a whole new world of support nightmares with graphics driver bugs and finnickiness?

I've seen a thread or two about different ways of doing per-pixel manipulation of images without OpenGL, and it sounds like the fast ways are kind of hacky. So, for something like dynamic lighting with Sprite Lamp normal maps, where I have to change the color of each pixel in an image, is there a thread that discusses the best ways to do this? I've got the code to do it right now, but like I said in my OP my framerate dropped from 174 to 7.

Should I be posting these questions in their own threads? Or somewhere else? Sorry, got this gush of text and questions spewing forth...
Offline CodeHead

JGO Knight


Medals: 41


From rags to riches...to rags.


« Reply #4 - Posted 2013-11-28 02:50:14 »

OpenGL is pretty universal, right? If I moved my rendering over to LWJGL, would I be shutting out older computers, people with integrated graphics cards, etc? Would I be opening myself up to a whole new world of support nightmares with graphics driver bugs and finnickiness?

OpenGL will fall back to software rendering if needed and it's universal in the sense that it's supported on most major platforms. The trick is choosing which OpenGL version to target. The newer the version, the less cards currently out there will support it. Integrated graphics are usually pretty crappy, but games like Torchlight show that you can do a lot more with those chipsets than people think. You just have to figure out the minimum amount of hardware needed to run your application, and call that the minimum required specs. There are always going to be certain users who will have inadequate hardware to run any given application.

I've seen a thread or two about different ways of doing per-pixel manipulation of images without OpenGL, and it sounds like the fast ways are kind of hacky. So, for something like dynamic lighting with Sprite Lamp normal maps, where I have to change the color of each pixel in an image, is there a thread that discusses the best ways to do this? I've got the code to do it right now, but like I said in my OP my framerate dropped from 174 to 7.

You'll find a lot of applications, especially games, contain certain amounts of hackery. It's not necessarily a bad thing so long as you understand the ramifications of your hacks. Sometimes you have to think a little bit out of the box to accomplish a goal with given constraints. That being said, Java2D is touch and go performance wise. It technically uses OpenGL or DirectX depending on the platform it's running on to do certain operations. My personal experience is that the DirectX pipeline is superb and delivers enough performance to make using Java2D viable for a lot of applications. The OpenGL pipeline tends to be less reliable in my experience. I've seen performance tank pretty badly on some machines (my current one included) when the JVM is told to use OpenGL. As for threads, give this one a try, and browse through the Java2D section. These types of questions tend to come up from time to time there.

Should I be posting these questions in their own threads? Or somewhere else? Sorry, got this gush of text and questions spewing forth...

No harm asking questions in the "Newbie & Debugging Questions" section. Wink If you want detailed answers to a specific question it's probably worth posting it in it's own thread. If you just want a general "lay of the land", then grouping related questions seems sensible to me.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline goblinJoel

Junior Duke


Medals: 2



« Reply #5 - Posted 2013-11-28 14:41:48 »

Quote
You'll find a lot of applications, especially games, contain certain amounts of hackery. It's not necessarily a bad thing so long as you understand the ramifications of your hacks. ... As for threads, give this one a try, and browse through the Java2D section.
Ah, yes, that was the thread I was referring to, since people argued vigorously over whether it was a dangerous hack. I think I'll take a look at the Java2D section.

By the way, how do forum avatars work here? Every time I tried to add one, it didn't work. Would that be because I tried using Google Drive, Picasa, Dropbox, and Facebook to upload it, and it can't handle those links? Or are there specific requirements for the images I'm missing?
Offline CodeHead

JGO Knight


Medals: 41


From rags to riches...to rags.


« Reply #6 - Posted 2013-11-28 14:54:22 »

By the way, how do forum avatars work here? Every time I tried to add one, it didn't work. Would that be because I tried using Google Drive, Picasa, Dropbox, and Facebook to upload it, and it can't handle those links? Or are there specific requirements for the images I'm missing?

I think it's probably the places you're hosting it from. I have mine hosted from my own domain, so there aren't any concerns of "hot link protection" or the like blocking it. You could always try one of the free image hosting services out there. If worse comes to worst, poke around and see where other avatars are hosted from. You should stumble across a usable host sooner than later.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline goblinJoel

Junior Duke


Medals: 2



« Reply #7 - Posted 2013-11-28 15:09:39 »

There we go. Looks like imageshack worked (and apparently I had an account there?). Odd that it stretches the image unless it is exactly 80x80 though. And that there are no instructions I can see. Tongue But it works! Thanks.
Offline CodeHead

JGO Knight


Medals: 41


From rags to riches...to rags.


« Reply #8 - Posted 2013-11-28 15:11:38 »

Always happy to help. You can always try padding your image to 80x80 before uploading if the distortion is bothering you.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (31 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (40 views)
2014-10-26 19:37:11

Luminem (21 views)
2014-10-26 10:17:50

Luminem (25 views)
2014-10-26 10:14:04

theagentd (31 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (57 views)
2014-10-16 15:22:06

Norakomi (46 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!