Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - AGP

#1546
News / Re: Version 1.18 has been released!
May 27, 2009, 11:25:27 PM
As usual, thanks a whole lot, Egon. I appreciate all your work, and your engine really rocks.
#1547
Support / Re: World.setAllVisible(boolean)
April 28, 2009, 06:42:59 PM
Thanks a whole lot, pal.
#1548
Support / World.setAllVisible(boolean)
April 28, 2009, 01:17:06 AM
Not to rush you in any way, Egon, but I was wondering if you already have a beta of 1.18 with that in so that I don't have to do it differently on my code and have to change it later.
#1549
Support / Re: Hardware jpct-lwjgl Applets
April 24, 2009, 10:29:39 AM
Living and learning. Done.

EDIT: And the Joystick Wiki is gone. Was it because I renamed it (duh!)?
EDIT: Added it again, so don't worry about it.
#1550
Thanks a lot.
#1551
Support / Re: Hardware jpct-lwjgl Applets
April 24, 2009, 09:36:46 AM
I'll add it again. But how did I destroy the main page? And I didn't use tags at all (other than the html tags).

EDIT: Used your <pre> tag suggestion and it looks fine now. Can you create me a new page for the html heap size suggestion?
#1552
No, I know I have to render scene too. Could you guess how much slower it would perform with the software (OpenGL mode) renderer?

And to answer your question, so that I can set only the hero in the game to visible. But in a different scenario, you might be unsure of whether you have invisible objects (or otherwise be sure you have several) and will then get to set everything to visible.
#1553
Support / Re: Hardware jpct-lwjgl Applets
April 24, 2009, 08:07:40 AM
Sure, will do.

EDIT: Done. And I added a bit about specifying the applet heap size via HTML. If somebody could format the whole thing so it looks right, I'd appreciate it.
#1554
Support / Performance Loss With Rendering 3D-2D-3D
April 24, 2009, 04:23:40 AM
I'm writing a 2.5D RPG engine and sometimes a 2D object will have to be in front of some 3D ones, and behind others. I expect I'll draw the FrameBuffer, then get its graphics and draw the 2D object, then set all the behind 3D objects to invisible and draw the buffer again. Is that insanely slow? And Egon, a small request: World.setAllVisible(boolean), so that I need not know what's added to the world to set everything to invisible.
#1555
Support / Re: Hardware jpct-lwjgl Applets
April 24, 2009, 04:18:31 AM
Thanks, maybe I'll change it a little bit (things like addressing the URL instead of the file) and post it there.

EDIT: Then again, I looked at the wiki and it seems that Paulscode has already put a nice example.
#1556
Support / Re: Hardware jpct-lwjgl Applets
April 23, 2009, 09:01:35 AM
Yup, I didn't want to post code, then I figured it was actually a good thing. It's a simple applet and it's nice to have a simple example to show anyone who might be starting.
#1557
Support / Re: Hardware jpct-lwjgl Applets
April 23, 2009, 05:39:59 AM
Thanks, I always seem to get stuck on the little things. theCanvas.repaint() did it. And a little note: I wasn't polling the joystick, so if anyone is looking at this code, before joys.getYAxisValue() is called, joystick.poll() should be.
#1558
Support / Hardware jpct-lwjgl Applets
April 23, 2009, 12:33:47 AM
I'm trying to make hardware jpct-lwjgl applets that use the joystick and 3D hardware. All three of the first ones have failed to render anything to the screen (except for when on the third one I was using jpct's software renderer). Check out the code of this incredibly simple applet and remember it worked on software rendering (without the canvas). As it is, I get a black screen (nothing renders). By the way, although I'm only using ambient light on this one, the other two had other lights positioned around the world.

import java.applet.*;
import java.awt.*;
import com.threed.jpct.*;
import com.threed.jpct.util.Light;
import org.lwjgl.opengl.*;
import org.lwjgl.input.*; //JOYSTICK AND OPENGL-MODE KEYBOARD

public class SimpleApplet3D extends Applet implements Runnable {
      private Object3D object;
      private World theWorld;
      private FrameBuffer buffer;
      private Camera theCamera;
      private boolean keepGoing;
      private Controller joystick;
      private Canvas theCanvas;

      public void init() {
object = Loader.load3DS("c:/MyPrograms/3D/SimpleApplet/Girl.3DS", 1f)[0];
buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
Config.maxPolysVisible *= 3;
theWorld = new World();
theCamera = theWorld.getCamera();
this.add(theCanvas = buffer.enableGLCanvasRenderer());
Controllers controllers = new Controllers();
try {
      controllers.create();
      if (controllers.getControllerCount() > 0) {
joystick = controllers.getController(0);
System.out.println("Got the joystick. Its name: "+joystick.getName());
      }
}
catch (org.lwjgl.LWJGLException e) {}
theWorld.addObject(object);
theWorld.setAmbientLight(65, 65, 65);
keepGoing = true;
      }
      public void start() {
Thread appletLoop = new Thread(this);
appletLoop.start();
      }
      private void draw() {
buffer.clear(Color.black);
theWorld.renderScene(buffer);
theWorld.draw(buffer);
buffer.display(theCanvas.getGraphics());
// buffer.displayGLOnly();
      }
      public void run() {
while (keepGoing) {
      if (joystick != null) {
theCamera.moveCamera(Camera.CAMERA_MOVEIN, joystick.getYAxisValue());
      }
      draw();
      try {
Thread.sleep(50);
      }
      catch (InterruptedException e) {}
}
      }
      public void stop() {
keepGoing = false;
      }
      public void destroy() {}
}
#1559
Support / Re: lwjgl Joystick
April 16, 2009, 10:14:44 PM
Actually, in this case I'm referencing lwjgl directly (no jPCT). But I must be thinking more clearly today than I was yesterday because I solved it. Thanks for your help, pal.
#1560
Support / Re: lwjgl Joystick
April 16, 2009, 09:50:00 PM
I figured it out. Part of it is the fact that although it compiles with just a reference to lwjgl.jar, to run you have to reference jinput.jar. Plus, Vista x64 is giving me a headache. I can't wait for EVERYTHING to be 64-bit already.

Here's another joystick-related question: I wrote years ago a Java 2D game which only used the keyboard. Yesterday I decided to add the lwjgl joystick to it, so instead of drawing into the awt frame I added the AWTGLCanvas to the frame and drew on the canvas. This time I initialize the controllers just fine and even get a Controller instance. But when I poll the joystick for input, its value are always -1. I realize this question belongs in the lwjgl boards but there are a lot more people here.