Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / I'd like to get an executable jar file made from my LWJGL project on: 2010-12-01 02:03:04
Hi everyone, I've been learning LWJGL and I have a program right now I'd like to send to my friends. It's dependencies are Slick_util.jar, lwjgl.jar, and lwjgl_util.jar.   I am using Eclipse IDE to program, so my project has these 3 External Jar files loaded into its Build Path.  I hit the Green Arrow to run my program, and it runs great.

Because I'm using Eclipse, I'm  a bit spoiled when it comes to running my programs. I know how to do javac Class.java to build program in command line, but have no idea when it comes to executable jar files with 3 dependencies and a folder called Textures with some images in it.

Could you give me a hand, perhaps in walk-through format so others can benefit and use as a reference? Thanks!
2  Game Development / Newbie & Debugging Questions / Re: Binding different textures using Slick Util on: 2010-11-30 19:11:17
Wow someone punch me in the face.

1  
textures[currentFilter].bind();
3  Game Development / Newbie & Debugging Questions / Binding different textures using Slick Util on: 2010-11-30 19:10:48
Hi everyone, I have made insane progress in a week and I am learning Texture Filtering at the moment.
I set myself up in Tutorial 6 to use Slick_Util as opposed to the old DevIL to load textures, and it worked great. I was originally going to come here asking about how to set a texture filter for a loaded texture, but I took the time to look up the Slick Util docs and found the Texture Loader class which stated the parameters the function call takes, and came up with this:

1  
2  
3  
textures[0] = TextureLoader.getTexture("PNG", new FileInputStream("src/Textures/Crate.png"), FILTER_NONE);
textures[1] = TextureLoader.getTexture("PNG", new FileInputStream("src/Textures/Crate.png"), FILTER_LINEAR);
textures[2] = TextureLoader.getTexture("PNG", new FileInputStream("src/Textures/Crate.png"), FILTER_MIPMAP);


Awesome! But now I have another question, I am supposed to be cycling between different the different textures using keyboard input, but the syntax for texture binding in Slick Util is very different from what it is without the library:

1  
GL11.glBindTexture(GL11.GL_TEXTURE_2D, textures[currentFilter]); // Select A Texture Based On filter


Whereas Slick Util is just myTexture.bind(). What do I do?
4  Game Development / Newbie & Debugging Questions / Re: I want to use LWJGL, but I don't know OpenGL. on: 2010-11-29 14:56:00
Even simpler, do a
1  
import static org.lwjgl.opengl.GL11.*


and you are freed from the GL11 prefix...

How come GL_COLOR_BUFFER_BIT and GL_DEPTH_BUFFER_BIT didn't fix until I added "static"  to import static org.lwjgl.opengl.GL11.*   

?
5  Game Development / Newbie & Debugging Questions / Re: [LWJGL] org.lwjgl.opengl.glu.GLU can't be found :( on: 2010-11-29 13:39:44
The idea is to follow the actual NeHe C tutorials and only use the LWJGL ports for reference in case you don't succeed in converting single C calls to their java LWJGL equivalent. DON'T learn from the ports!

Yep! I have a window up now and can draw my first triangle and quad (and use glColor3F to color the points!)  Yay!!!
But I noticed all of the NeHe tutorials have calls that look like glSomething()  but LWJGL uses GL11.glSomething().

Will I always just add GL11. to get the equivalent call?
6  Game Development / Newbie & Debugging Questions / [LWJGL] org.lwjgl.opengl.glu.GLU can't be found :( on: 2010-11-29 03:46:04
Hi, I am having trouble importing the jar from the topic title. I googled and found out it is in lwjgl_util.jar in LWJGL 2.6, so I added that external jar like I did for lwjgl.jar, but it can't seem to find that particular path.

Can you help me out? The only tutorials for LWJGL are not even tutorials, they are code files from NeHe ports, and those aren't the best for learning  Sad

EDIT: Got the solution. GLU is no longer a part of org.lwjgl.opengl.glu, but belongs to org.lwjgl.util.glu

I'm gonna be upset if Markus Persson (Notch) didn't use these NeHe LWJGL code files to learn, because this is my only resource and I feel like it won't be good enough when I get to the end, but maybe it will be  so I'll be determined to keep at it!!!
7  Game Development / Newbie & Debugging Questions / Re: I want to use LWJGL, but I don't know OpenGL. on: 2010-11-28 18:23:56
Ok thanks, I've got my IDE setup (eclipse) with LWJGL libraries ready to go as well. One problem, the NeHe tutorials ported for LWJGL are lessonX.jar files. How can I possibly open that up to view code? lol. I want to see .java files  Sad


I can open them with Winrar and extract the .java files and readme.txt  :]
8  Game Development / Newbie & Debugging Questions / Re: I want to use LWJGL, but I don't know OpenGL. on: 2010-11-28 14:47:28
One nice place to start with learning OpenGL is Nehe. They have some good examples for getting started, and some (all?) have been ported to Java.

Not sure if they use JOGL or LWJGL, but I don't believe that should really matter. It's about learning OpenGL not a specific binding.

In that case, I should be able to follow along with the tutorials, and then any time I learn a new GL command, I should just go to the LWJGL docs and find the equivalent?
9  Game Development / Newbie & Debugging Questions / I want to use LWJGL, but I don't know OpenGL. on: 2010-11-28 05:28:17
As topic says, I want to program using LWJGL. I know Java, but I don't know OpenGL. What is THE best way to learn so I can start programming using LWJGL?

My concerns for each method I've come up with so far:

1) If I read the LWJGL javadocs, will I be able to determine which is the starting point, then step 2, then step 3, etc, or will all of the information be given in alphabetical order like all other programming documentation, meaning I can't actually learn by reading the docs, serving as a reference only?

2) If I read the LWJGL and happen to be able to determine the proper order in which it should be read, will I be taught OpenGL using the methods of LWJGL well enough that I'd actually LEARN OpenGL in the process?

3) If I can't learn LWJGL from the documentation, which book is THE best and most current (in regards to the current release of LWJGL) that I can use to learn OpenGL?
3b) Will I have twice as much work to do if I learn OpenGL first, and then have to go back and learn all of the function calls for LWJGL afterwords?

Disclaimer: This is a serious topic which can hopefully bring in some detailed answers. If the quality of replies is good enough, we can probably turn this into an FAQ, so it can serve as a good reference to the people who visit JavaGaming.org.


Thanks everyone
10  Game Development / Newbie & Debugging Questions / Re: Should I be reading tutorials on OpenGL before LWJGL? on: 2010-11-22 18:51:45
Is the Red Book the best option? :]
I figure once I learn OpenGL, I can use it in any language, it won't matter if I am doing Java now or some other language in the future!
11  Game Development / Newbie & Debugging Questions / Should I be reading tutorials on OpenGL before LWJGL? on: 2010-11-22 17:58:28
I finally got LWJGL installed, but then I didn't know what I was doing aside from copying code from the 3D Asteroids Coke and Code tutorial. I supposed I should check out the OpenGL Red Book and learning OpenGL before messing with LWJGL. What do you think?
12  Game Development / Newbie & Debugging Questions / Re: Any game projects started/completed in JOGL? on: 2010-11-19 01:47:58
I'm patiently working my way through the Asteroids 3D tutorial, and its actually fantastic. Here are my tips to having an easier time understanding what is going on:

1) Open the web page with the tutorials
2) Download the source code
3) Read through the first section (first few paragraphs)
4) Follow along by opening up the source code for the file GameWindow.java (kevglass doesn't completely run you through the creation of the game, you'll want to open up the .java files so you can see some of the functions he skipped (first ones being main() and findDisplayMode())
5) Open IDE (preferably eclipse) and start coding the project from scratch while following steps 3-4
6) Optimize and re-comment where you can so the project becomes YOUR WORDS so YOU understand it for the 2nd project you make on your own (with this one as a reference Smiley)

I was overwhelmed but now I'm moving right along. I also re-wrote findDisplayMode() to use an enhanced for loop:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
private DisplayMode findDisplayMode(int width, int height, int bpp) throws LWJGLException {
      DisplayMode[] modes = Display.getAvailableDisplayModes();
      DisplayMode mode = null;
     
      for (DisplayMode availableMode : modes) {
         if ((availableMode.getBitsPerPixel() == bpp) || (mode == null)) {
            if ((availableMode.getWidth() == width) && (availableMode.getHeight() == height)) {
               mode = availableMode;
            }
         }
      }
     
      return mode;
   }
13  Game Development / Newbie & Debugging Questions / Re: Any game projects started/completed in JOGL? on: 2010-11-18 22:43:42
Haha ok great, well I know C++ so I'm somewhat familiar with C - I understand what you meant though.. that because most of what I'll find online is about C when it comes to OpenGL, I'll have an easier time porting the code over to Java.

Still, the LWJGL docs..where are they?  :scratches head:


Found the documentation and wiki on the website. The documentation doesn't have a general overview of the library tho, explaining what each category controls, but I see the wiki has links to some tutorials. Just wish there was a tutorial for setting up the window to draw on.

All good though - the kevglass asteroids tutorial does, I'll just have to ignore some of the functions and start with main()

Think thats a good plan, cas?
14  Game Development / Newbie & Debugging Questions / Re: Any game projects started/completed in JOGL? on: 2010-11-18 21:55:41
Where are these magical docs I can learn OpenGL from? lol..

Thanks cas Smiley You show up in java boards and lwjgl/opengl topics as far back as 2005, so I know you're definitely the guy to speak to!

Also in LWJGL you can statically import the appropriate GLnn classes so the actual code looks more like C.

I'm trying to get as far away from C as possible. I just need some docs I can read to learn how to actually USE lwjgl after I include it in my project Tongue I've been fiddling with install for 3 days now, its been bad enough the only good tutorial for lwjgl is from cokeandcode.com and doesn't explain the OpenGL calls, just the structure of the game itself (which is gonna be awesome)
15  Game Development / Newbie & Debugging Questions / Re: Any game projects started/completed in JOGL? on: 2010-11-18 21:34:45
I said OpenGL 5 because I still had OpenGL SuperBible 5th edition in my head sorry Tongue

I want to use LWJGL, but can you link me to the docs? Are they sufficient to learn just using the docs or do I have to learn OpenGL from the book and THEN learn LWJGL?  If LWJGL is worth my time, its gonna cut away from my time reading other OpenGL material..
16  Game Development / Newbie & Debugging Questions / Tips for starting LWJGL (scroll down) on: 2010-11-18 20:13:26
Hi, thanks to all of you at java-gaming.org, I finally know how to create a new project in Eclipse and link my JOGL 2.0 library I've downloaded   Cheesy

I recently acquired this book, http://www.amazon.com/gp/product/0321712617/ref=s9_simh_gw_p14_d0_i1?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=1KMCRT135XYZ2WBBV4VH&pf_rd_t=101&pf_rd_p=470938631&pf_rd_i=507846 which is brand new and teaches OpenGL 5 from the beginning.

Instead of LWJGL, I want to work more closely to the original OpenGL calls and really learn how to work with 3D coordinates and then slowly add functions and new classes to form the framework of a game, and then keep starting over making better new code until I really have the skill to make more difficult projects.

I created this topic to find out if any game projects have ever been completed in JOGL, if any source code is available for these games, or if any game tutorials were started that use JOGL that I could look at as a supplement to working alongside the OpenGL 5 book i mentioned earlier.

**I found a tutorial by someone named kevglass on cokeandcode.com for LWJGL, but the source code he posts is different from the code found within the step-by-step tutorial, and jumping around makes it difficult for me to learn. Also he starts off with the beginning of the GameWindow class with more complicated methods before starting with main(), so the jumping around really frustrates the hell out of me.**

So yea, if you have any resources for JOGL that include tiny game projects with available source, that would really be great!
17  Game Development / Newbie & Debugging Questions / Re: Having a hair-pullingly frustrating time trying to install LWJGL on: 2010-11-18 18:57:27
Thank you Kapta.
Thank you everyone for having patience with a newbie.

Also, I found this link, but it pretty much just summarizes what Kapta has said:
http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)

Thanks again!!
18  Game Development / Newbie & Debugging Questions / Re: Having a hair-pullingly frustrating time trying to install LWJGL on: 2010-11-18 18:40:56
Personally I always like to keep LWJGL in a \Libs directory underneath each project. Otherwise I end up upgrading a shared LWJGL dir and have to check all of my old projects still work ok.

So you create a project, then go to your directory of the project ON YOUR HARD DRIVE and create a 'libs' folder and throw every file pertaining to LWJGL in there?
How do you then tell eclipse that you are using the lwjgl files in your program?

I'm way over my head since I don't know how to make .jar files yet, but how will i include the libs folder inside my project when I compiled and package for end-users?
19  Game Development / Newbie & Debugging Questions / Re: Having a hair-pullingly frustrating time trying to install LWJGL on: 2010-11-18 18:09:25
Topic Creator here:

I'm still confused. The installation linked above for LWJGL in Eclipse follows the same steps as JOGL, but it starts with "after you have installed LWJGL"... but I never did.

Does it mean "download the zip containing LWJGL and extract folder to some location on my harddrive"?

Also, in windows I setup JOGL in C:\lib\jogl2.0, i want to put LWJGL in  C:\lib\lwjgl
I really want to program Java on my Ubuntu machine, and I know how to create a lib folder inside home: \home\shadowprotocol\lib,   but where do people NORMALLY put files like this on their computer?  I don't really understand the \usr, \var, \etc folders, so I don't know if I should be putting EVERYTHING inside my \home folder or not.

Sorry, PLEASE clarify a little more how to install this in eclipse on linux.  <3 lol thank you
20  Game Development / Newbie & Debugging Questions / Having a hair-pullingly frustrating time trying to install LWJGL on: 2010-11-18 04:25:13
Hi everyone, I swear I'm 30 minutes from going absolutely ape-%*$^ so im stopping for the night. It took me forever scouring the web getting information on trying to install LWJGL with Eclipse.

Finally I found a website that had an AMAZINGLY SHORT, SIMPLE EASY-TO-FOLLOW guide on installing JOGL with Eclipse, so I went with that and got it going perfectly. Sad thing is, I didn't want JOGL, it was a last resort effort.

To anyone interested, here's the link for installing JOGL: https://sites.google.com/site/justinscsstuff/jogl-tutorials (tutorial 1: Environemnt Setup - takes 15 minutes maximum).
Thanks to that tutorial, I now know how to create a new user library and then create new projects and link the user library (in this case JOGL) to the project.

I'm thinking as I type this, but I would still appreciate some help. If I download LWJGL and put the files in [C:\lib\lwjgl], do I do the same procedure in eclipse as I did with the jogl tutorial? Which JAR files do I need to include in my user library?

Any tutorials afterwords to get the basic frame up and running?

I know I know, i'm a huge pest but I seriously spent a lot of time on this and now I need your help! Thanks so much Javagaming!!
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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
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!