Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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  Java Game APIs & Engines / OpenGL Development / Re: NeHe Tutorials on: 2004-05-16 20:25:40
that's good news! thanks a lot Smiley I think a lot of newbies cluebies around here like me will be very happy with this Smiley perhaps it's even worth stickying because almost everyone new to lwjgl can learn a great deal from nehe's tutorials with your code
2  Discussions / General Discussions / Re: (yet another) YABB annoyance on: 2004-05-13 13:10:25
to answer a question earlier in the topic, get the source here:

http://prdownloads.sourceforge.net/yabb/YaBB_1Gold_SP1.3.1_cgi.zip?download
3  Java Game APIs & Engines / OpenGL Development / Re: ported kev's TextureLoader on: 2004-05-13 13:00:57
I got it now, I was just unsure about whether the textureloader was already doing transparency because of .hasAlpha() stuff in it. But the way you showed it works perfect, and I also know where to look now if I want more. So thanks! Smiley
4  Java Game APIs & Engines / OpenGL Development / Re: ported kev's TextureLoader on: 2004-05-12 21:37:20
I'm really in need of some help on getting alpha channels/png's with transparency to work.

I would like to have png's in some transparent form, but I have no idea what the problem is, I tried almost all options in formats but I'm either getting a NullPointer error which stops the game from running, or my texture is colored black (the background color) instead of being transparent, I'm having another texture moving behind the transparent one. Could anyone give me some pointers? or do I need to dive into blending/masks instead of just using the textureloader from this topic?
5  Java Game APIs & Engines / OpenGL Development / Re: NeHe Tutorials on: 2004-05-12 15:45:39
http://www.m4g3.nl/showsrc/showsrc.php?src=src/Lesson02.java
http://www.m4g3.nl/showsrc/showsrc.php?src=src/Lesson03.java
http://www.m4g3.nl/showsrc/showsrc.php?src=src/Lesson04.java
http://www.m4g3.nl/showsrc/showsrc.php?src=src/Lesson05.java

I also had the texture loader working at some point (which is lesson06) and if you really can't get that to work I can reconstruct that too. This should be enough to get you going though.

I'm using these files along with Jcreator and for me it works like a charm, I can compile and execute my files from within the IDE, which is very nice.

P.S Sorry for the messy coding, especially on the GL initialization stuff, all the files work though
6  Java Game APIs & Engines / OpenGL Development / Re: NeHe Tutorials on: 2004-05-12 11:16:03
I got them to work by combining the code from this file, which is the lwjgl/java code of nehe's first 13 lessons or something:
http://members.rogers.com/mark.bernard/
with the nice game loop from this thread:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=cluebies;action=display;num=1082112442

If you'd like I could post the code for lessons 2-5, just shout
7  Game Development / Newbie & Debugging Questions / Re: LWJGL 2d sprites/quads? on: 2004-05-06 11:52:47
roger that, sir!

Tongue thx for the reply
8  Game Development / Newbie & Debugging Questions / LWJGL 2d sprites/quads? on: 2004-05-05 22:03:28
Ok I've managed to put a quad on my screen with a png texture on it, using lwjgl.

But I've read a lot of stuff about lwjgl and opengl the last few days, and I remember that using quads is probably not the most efficient way to display a lot of 2d graphics on the screen.

Is there another, more efficient way of displaying 2d graphics, I think it has something to do with sprites? And something I also havent looked into but might have to do with it is fustrum. Anyway I'm unsure which way to go now. My goal is to make a 2d isometric game, and I know about orthographic projections.

I was a bit unsure whether to put this in lwjgl or newbie forum, because I guess it's both Wink
9  Java Game APIs & Engines / OpenGL Development / Re: ported kev's TextureLoader on: 2004-05-05 19:55:30
thanks for the help, I got the texture on a cube now!  Shocked Grin

*celebrates*
10  Java Game APIs & Engines / OpenGL Development / Re: ported kev's TextureLoader on: 2004-05-05 17:56:19
I'm trying to use your code to get lwjgl to display a 2d png image on the screen, however I'm a bit stuck


in my init I have
1  
2  
TextureLoader textureLoader = new TextureLoader(); 
Texture fontTexture = textureLoader.getTexture("font","data/test.png");


I also declared fontTexture at the top using:
1  
private static Texture fontTexture; 


then in my render part I have:
1  
fontTexture.bind();


everything works fine when I leave the bind() part out, but when I put it in I get the following output:

Loading texture data/test.png to ID: 1 wrap:true mipmapped:false
java.lang.NullPointerException
       at org.lwjgl.examples.Game.render(Game.java:170)
       at org.lwjgl.examples.Game.run(Game.java:115)
       at org.lwjgl.examples.Game.main(Game.java:45)
Press any key to continue...

This should probably go into the Clueless Newbie section, because my main question is of course how the hell do I get a 2d sprite on the screen using lwjgl. I figured on the texture loading, I've done the first 5 nehe tutorials with success. I had a look at the Space Invaders 103 tutorial. But I can't get it to work Sad So I guess I'm clueless, but I'm just missing something.
11  Games Center / Archived Projects / Re: Space Invaders 102 - OpenGL on: 2004-05-01 17:18:05
this one is running a bit smoother than the java2d version, winxp ti4600 512mbr

Hope the tutorial will be up soon Smiley too bad u didnt use lwjgl tho Tongue

12  Game Development / Newbie & Debugging Questions / Re: LWJGL Game Init and Main Loop on: 2004-04-29 19:30:48
EDIT:
sorry for the confusion but everything is working correctly now, I did it all over and I must have made a stupid mistake in the init somewhere
13  Game Development / Newbie & Debugging Questions / Re: LWJGL Game Init and Main Loop on: 2004-04-29 18:31:08
Being the clueless newbie that I am (I read all the basics/essentials from the sun's tutorial and am able to draw some stuff in java2d) I really thank you for putting this up Smiley

I was struggling through some 2d tutorials which introduced me to a lot of methods for getting timers up and getting a gameloop to run at a proper FPS. And finding this was a pleasant surprise. Especially because all the test were working (except the grass, it gives me exceptions even while I have a nvidia card) and I got it into jcreator perfectly. Everything compiles perfectly and is working Smiley So thanks a lot and hopefully I'll be able to make a game in a month or something like that.

Now let's grab some opengl book or some tutorials Smiley

EDIT: I got NeHe's tutorials for java, and I figured a lot of the code just does the window creating which can be done easier since version 0.X. So I copied this code into my render function, but I aint getting any polygons on my screen, no errors either.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
      private static void render() { 
            GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_STENCIL_BUFFER_BIT);
            GL11.glLoadIdentity();                                          // Reset The Current Modelview Matrix
                 GL11.glTranslatef(-1.5f,0.0f,-6.0f);                        // Move Left 1.5 Units And Into The Screen 6.0
                 GL11.glBegin(GL11.GL_TRIANGLES);                              // Drawing Using Triangles
                       GL11.glVertex3f( 0.0f, 1.0f, 0.0f);                  // Top
                       GL11.glVertex3f(-1.0f,-1.0f, 0.0f);                  // Bottom Left
                       GL11.glVertex3f( 1.0f,-1.0f, 0.0f);                  // Bottom Right
                 GL11.glEnd();                                                            // Finished Drawing The Triangle
                 GL11.glTranslatef(3.0f,0.0f,0.0f);                        // Move Right 3 Units
                 GL11.glBegin(GL11.GL_QUADS);                                    // Draw A Quad
                       GL11.glVertex3f(-1.0f, 1.0f, 0.0f);                  // Top Left
                       GL11.glVertex3f( 1.0f, 1.0f, 0.0f);                  // Top Right
                       GL11.glVertex3f( 1.0f,-1.0f, 0.0f);                  // Bottom Right
                       GL11.glVertex3f(-1.0f,-1.0f, 0.0f);                  // Bottom Left
                 GL11.glEnd();                                                            // Done Drawing The Quad
     }
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.

xsi3rr4x (54 views)
2014-04-15 18:08:23

BurntPizza (53 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (151 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!