Seems like I'm posting a topic here every week so if you're on this forum often, you've probably run into me at some point.
Anyways, I'm making a 2D networked game in Java as a project for learning the language. So far I have only used libraries that were immediately available to me. My thought process behind this was I wanted to learn Java at the most basic level before incorporating libraries to "do things for me" or simplify tasks.
I'm not sure at what point I should change this mindset. Currently my game allows for multiple people to join in, run around, and collide with trees (just got my collision boxes working yesterday, super pumped!). I don't really know what direction the game will go in, I'm just trying to set up a lot of back-end stuff... dynamic systems for which I can start layering on content.
I started thinking about lighting. Now, my experience with lighting has been .. limited. I created a 2D tile-based game in a proprietary programming language designed to create interfaces for medical software. My lighting calculation was incredibly crude and basically involved "Loop through every single tile. For each tile, calculate all tiles between this tile and the player. If there is an object on any tile in this set of tiles, then the player cannot see this tile". It created a very blocky LOS lighting calculation. Some optimizations were made to make sure I wasn't checking tiles twice but overall it took about .5 seconds to move from one tile to the next.
Now, with my current game, it's not really tile-based anymore. I mean.. there are TILES (which I really just use as squares of floor), but all objects, including players, can be moved on a per-pixel basis. Which really means I need pixel-based lighting. I also wouldn't mind incorporating some fancier shading effects, although I really don't know much about them.
This is really the FIRST time I've ever used a real language and created GRAPHICS. I used C++ for a while and did all console based applications. I started to learn DirectX stuff but got caught up with Windows programming. I don't really know .. how a lot of this stuff works. I understand DirectX and OpenGL are designed to help software communicate effectively with hardware... that's about where my understanding ends.
So.. OpenGL. I see lots of people recommending LWGL (I think it's called), assuming it got popular after Minecraft. Do I need to use that? Can I just.. use OpenGL directly? OpenGL is *already* a utility to help draw graphics and if this is my first time delving into something like that.. I would kinda rather not use a library to "do everything for me".
So .. questions:
1) Is it possible to learn OpenGL without incorporating another library to help make use of it? Does it make sense to do that?
2) I'm enjoying Java2D so far, but I don't wanna go so far into it that when I finally DO decide to do some fancier stuff, I need to re-write my graphics 'engine' (I can call my draw screen class a graphics engine, right? :-P )
3) More of a general question.. what does it mean to LEARN OpenGL (or DirectX for that matter)? Is OpenGL just a set of libraries in itself? Multiple languages can USE OpenGL.. how is that possible if they all have their own syntax? I am woefully in the dark about how this works.
Thanks for reading,
WhateverMyNameIsOnThisForum
Edit: Tuns out most of this stuff is discover-able with Google if you use the right terms. Seems like any language implementing OpenGL requires some sort of wrapper to utilize the functions. A more "standard" one for Java is JOGL. I guess the LWJGL is just another?