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: Implementing an FPS Camera [solved, thanks irc :D] on: 2012-10-21 16:50:17
I solved it Smiley

The key was that i got my game loop like:

1  
2  
3  
4  
while (running) {
     clear(); // clear the view and such, move the camera
    render();
}

And the Display.sync method was inside the render() method, so clear() was working in a different fps than the rendering.

Thanks all !!
2  Java Game APIs & Engines / OpenGL Development / Re: Implementing an FPS Camera on: 2012-10-21 16:11:12
thanks for replying

What i mean is that it works bad. So if I press "W" to go forward, it does 1 "step" and then stops, after a few seconds, does another one, and such, while what it has to do is walk forward. If u download the source and run it you will see what I mean. It don't works smoothly
3  Java Game APIs & Engines / OpenGL Development / Implementing an FPS Camera [solved, thanks irc :D] on: 2012-10-21 14:23:36
I'm trying to implement Lloyd's FPS camera in my coude but it works very bad, dont know why.
I've tried to put the functions that moves the camera into a while (Keyboard.next()) loop but works worst when I do it...
I realy dont know what to do here :S. The game isn't laggy, works at 60fps Sad

here is the source code: http://www.mediafire.com/?da5z2akca1jnnda

the "important" classes are: Game.java and FPCameraController. There's actually a "InitGL" method into Screen class and I dont know if has the appropiate settings for this setup.

Well, I hope somebody can help me Cheesy Thanks!
4  Java Game APIs & Engines / OpenGL Development / Having problems to understand OpenGL view method... [solved] on: 2012-10-21 01:04:31
Hello!

I'm trying to make a 3D game with LWJGL and right now I got the movement basics in 2D (moving a cube upwards when pressing "W" and such...) but now I want to move the camera so I get a nice 3D view. I'm trying to do it with gluLookAt()  but it just don't have any result at all... I've drew the cube at 0,0,0 and I wanted to go a bit far so I can see it completely but gluLookAt does nothing. I don't actually know exactly after what MatrixMode I have to write it, MODELVIEW or PROJECTION? >.<

I'm using this:

1  
2  
3  
GLU.gluLookAt(0.0f, 0.0f, -5.0f,
                 0.0f, 0.0f, 0.0f,
                 0.0f, 1.0f, 0.0f);


I've tried using it after

1  
2  
3  
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glMatrixMode(GL_PROJECTION);


and after

1  
2  
3  
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);

but no one works. I've actually tried using gluPerspective but I need to change the view's angle so...

I've also tried to use glRotatef(30.0f, 1.0f, 0.0f, 0.0f) and glTranslatef(0.0f, 0.0f, 5.0f) but had 0 effect xD

I need a bit of help here! Help please Smiley



edit: So i searched thru google (i did that before "-.-) and finally find a piece of code that worked well for me:

1  
2  
3  
4  
5  
6  
7  
8  
glMatrixMode(GL_MODELVIEW);
       glLoadIdentity();
       GLU.gluLookAt(0, 1, 5,
                     0, 0, 0,
                     0, 1, 0);

       glPushMatrix();
       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );


And after that put all the cube's code.
5  Game Development / Newbie & Debugging Questions / Re: Any JOGL complete game creation tutorial/guide? on: 2012-10-19 22:29:20
wow x)
thanks for the replies

I got some mindf**ks trying to port JOGL 1 to JOGL2 so porting LWJGL to JOGL2 .______. ...
I'll give it a try but, someone has JOGL2 ones? Tongue
6  Game Development / Newbie & Debugging Questions / Any JOGL complete game creation tutorial/guide? on: 2012-10-19 16:41:29
Hi! I'm starting with JOGL and I've seen multiple tutorials about geometry and thouse with JOGL and now I need some tutorial or guide about the creation of a complete (simple) game.
I've search it but I can't find it so... someone knows about some webpage with tutorials like that or some ebooks?

Thanks!
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 (64 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (216 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!