Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
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  
  Big beginner tutorial  (Read 3599 times)
0 Members and 1 Guest are viewing this topic.
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Posted 2004-08-04 13: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.zip

If you find any mistakes, please tell it, I would be please to make this tutorial better !

Chman

Edit: source link, thanks to Simon !
Offline Simon

Innocent Bystander




Java games rock!


« Reply #1 - Posted 2004-08-04 13:24:03 »

Cheesy I just browsed through your tutorial!
Nice work! Just what a noob ( like me Smiley) 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.
Offline elias

Senior Devvie





« Reply #2 - Posted 2004-08-04 14: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!
Legends of Yore - The Casual Retro Roguelike
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #3 - Posted 2004-08-04 14: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 Wink

Chman
Offline the2bears

Senior Devvie


Projects: 2


Little Bear: Code Fu!


« Reply #4 - Posted 2004-08-04 16:25:28 »

Nice work!

Bill

the2bears - the indie shmup blog
Offline kevglass

« JGO Spiffy Duke »


Medals: 205
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #5 - Posted 2004-08-04 17:58:10 »

Brilliant, well done!

Kev

Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #6 - Posted 2004-08-04 19: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 Smiley

Chman
Offline PlanetMongo

Senior Newbie




Follow the yellow line.  Don't EAT the yellow line


« Reply #7 - Posted 2004-08-04 20:02:01 »

Friggin' A, man.  

If you were me, you'd be good lookin - six string samurai
Offline Mac_Systems

Junior Devvie




I love my Java


« Reply #8 - Posted 2004-08-05 07:03:12 »

Good Work Smiley

Hope that more people will dig into LWJGL,
as the Documentation is the most worse part.

- Jens


The Network is the Music
http://www.mac-systems.de
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #9 - Posted 2004-08-05 15:33:41 »

It's me again Smiley

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

Chman
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #10 - Posted 2004-08-06 08:24:45 »

Quote

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 Smiley

Chman


Whatever you do, don't do that! Smiley.

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...
Offline MickeyB

Senior Devvie




my game will work, my game will work!


« Reply #11 - Posted 2004-09-27 18: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]);
              // Start drawing a quad.
            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));

              // End quad drawing.
            glEnd();


Unfortunately I only ever get white.  Where am I dying?

M

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #12 - Posted 2004-09-27 19:30:09 »

Have you enabled GL_TEXTURE_2D ?
if not, just type that in the init code :

1  
glEnable(GL_TEXTURE_2D);

Smiley
Chman
Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #13 - Posted 2004-09-28 10:05:56 »

You'll also need to specify texture coordinates for each vertex - search Google for glTexCoord2f.

Hellomynameis Charlie Dobbie.
Offline Chman

Junior Devvie




Nothing more that... Java games are cool !


« Reply #14 - Posted 2004-09-28 10: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 Smiley

Chman

edit: there's one called "AWT Texture Loading" that could help you.
Offline MickeyB

Senior Devvie




my game will work, my game will work!


« Reply #15 - Posted 2004-09-28 12:20:48 »

thanks a bunch!

added both suggestions and voila!

luv it!

Thanks

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
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.

SHC (24 views)
2014-11-25 12:00:59

SHC (23 views)
2014-11-25 11:53:45

Norakomi (19 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (68 views)
2014-11-07 19:57: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

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!