Chman
Junior Member  
Nothing more that... Java games are cool !
|
 |
«
Posted
2004-08-04 15:00:03 » |
|
Ok guys, I've just finished my tutorial about making a 2D pong game with LWJGL. For the moment, it's only available in PDF format. You can grab the tutorial here : http://chman.kaioa.com/blog/lwjgl/GLPong.pdf And the source code here : http://chman.kaioa.com/blog/lwjgl/GLPong.zipIf you find any mistakes, please tell it, I would be please to make this tutorial better ! Chman Edit: source link, thanks to Simon !
|
|
|
|
|
Simon
JGO Visitor
Java games rock!
|
 |
«
Reply #1 - Posted
2004-08-04 15:24:03 » |
|
 I just browsed through your tutorial! Nice work! Just what a noob ( like me  ) needs to get started in both games and LWJGL programming. But I guess you screwed the link for the source code... It points to your pdf tutorial file...
|
I don't suffer from insanity. I enjoy every minute of it.
|
|
|
elias
|
 |
«
Reply #2 - Posted
2004-08-04 16:23:46 » |
|
It looks nice and complete from the initial skimming, but I don't think I like that LWJGL is encouraged to be installed in the JRE/JDK directory. I'd much rather prefer directions on how to use -Djava.library.path and instructions on adding lwjgl.jar to the classpath. It will make it easier to distribute LWJGL for the game developer in the long run and isn't that much harder.
- elias
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Chman
Junior Member  
Nothing more that... Java games are cool !
|
 |
«
Reply #3 - Posted
2004-08-04 16:50:18 » |
|
Elias you're absolutly right, but I don't want to bother a beginner with many command parameters... The way I make people install LWJGL is for coding purpose only. I will make a special tutorial on how to distribute LWJGL games (with and without webstart). Right now I'm writing another tutorial to make the pong game better (I plan two others pong tutorials : making the game time-based and another with point counting and drawing the score on screen). If you have any recommandation for another beginner tutorial, tell me here or PM me  Chman
|
|
|
|
|
the2bears
|
 |
«
Reply #4 - Posted
2004-08-04 18:25:28 » |
|
Nice work!
Bill
|
|
|
|
kevglass
|
 |
«
Reply #5 - Posted
2004-08-04 19:58:10 » |
|
Brilliant, well done!
Kev
|
|
|
|
Chman
Junior Member  
Nothing more that... Java games are cool !
|
 |
«
Reply #6 - Posted
2004-08-04 21:15:37 » |
|
Thanks to all ! I've nearly finished the second tutorial but I won't be at home tomorrow, so don't expect it before this week end... About posting my tutorial on JGF, I don't have time to convert the all thing to HTML, so if someone want to do it, I can send him the OpenOffice formated document  Chman
|
|
|
|
|
PlanetMongo
Senior Newbie 
Follow the yellow line. Don't EAT the yellow line
|
 |
«
Reply #7 - Posted
2004-08-04 22:02:01 » |
|
Friggin' A, man.
|
If you were me, you'd be good lookin - six string samurai
|
|
|
Mac_Systems
Junior Member  
I love my Java
|
 |
«
Reply #8 - Posted
2004-08-05 09:03:12 » |
|
Good Work  Hope that more people will dig into LWJGL, as the Documentation is the most worse part. - Jens
|
|
|
|
Chman
Junior Member  
Nothing more that... Java games are cool !
|
 |
«
Reply #9 - Posted
2004-08-05 17:33:41 » |
|
It's me again  Finally, I've just finished the second tutorial, which explains how to make a FPS counetr and how to use it to make the game time-based. You'll find the PDF and the source package at the bottom of my lwjgl demos/tutorials page : Clicky. This tutorial is way smaller than the previous one, but I think it's very important to know how to make games time-based and not frame-based. A third article is on the way !  Chman
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
blahblahblahh
|
 |
«
Reply #10 - Posted
2004-08-06 10:24:45 » |
|
About posting my tutorial on JGF, I don't have time to convert the all thing to HTML, so if someone want to do it, I can send him the OpenOffice formated document  Chman Whatever you do, don't do that!  . We don't have ANYTHING in HTML. Everything is in a small subset of XHTML. You just used properly-closed P, I, B, U, A, and IMG tags.
|
malloc will be first against the wall when the revolution comes...
|
|
|
MickeyB
|
 |
«
Reply #11 - Posted
2004-09-27 20:46:14 » |
|
Love the tut. Question: I am using the following code to load a texture on the ball (just to see if I can) 1 2 3 4 5 6 7 8 9 10 11
| glBindTexture(GL_TEXTURE_2D, texture[0]); glBegin(GL_QUADS);
glVertex2i((int)(locationX - 10), (int)(locationY + 10)); glVertex2i((int)(locationX - 10), (int)(locationY - 10)); glVertex2i((int)(locationX + 10), (int)(locationY - 10)); glVertex2i((int)(locationX + 10), (int)(locationY + 10));
glEnd(); |
Unfortunately I only ever get white. Where am I dying? M
|
|
|
|
Chman
Junior Member  
Nothing more that... Java games are cool !
|
 |
«
Reply #12 - Posted
2004-09-27 21:30:09 » |
|
Have you enabled GL_TEXTURE_2D ? if not, just type that in the init code : 1
| glEnable(GL_TEXTURE_2D); |
 Chman
|
|
|
|
|
cfmdobbie
|
 |
«
Reply #13 - Posted
2004-09-28 12:05:56 » |
|
You'll also need to specify texture coordinates for each vertex - search Google for glTexCoord2f.
|
Hellomynameis Charlie Dobbie.
|
|
|
Chman
Junior Member  
Nothing more that... Java games are cool !
|
 |
«
Reply #14 - Posted
2004-09-28 12:49:34 » |
|
cfmdobbie is right. If you encounter others problems with textures, take a look at the LWJGL demos on my webpage, it could help you : here  Chman edit: there's one called "AWT Texture Loading" that could help you.
|
|
|
|
|
MickeyB
|
 |
«
Reply #15 - Posted
2004-09-28 14:20:48 » |
|
thanks a bunch!
added both suggestions and voila!
luv it!
Thanks
|
|
|
|
|