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.

Topics - FireBorn

Pages: [1]
Support / Java Game Programming Question
« on: February 20, 2009, 06:47:44 am »
Hi guys,

I know this forum isn't for Java in general, but I thought since so many of you are working on games, I might as well ask here.

Every once in a while, my applet will hang for a couple seconds. Then continue on fine. I can't really figure out the cause of it. I thought it was maybe a synchronization thing so I tried adding synchronized blocks, but they haven't helped.

Could it be the garbage collector? There are a lot of objects that get orphaned during the course of the game, so could this be a possibility?


Support / Newbie lighting question
« on: February 17, 2009, 02:50:20 am »
Hi guys,

I'm trying to create a game using software mode rendering, as I understand using hardware mode pops up a security warning (am I right?), and I don't want to impose on the user.

The problem I'm having is I create a light source but no lighting is applied. The applet is just black. Using ambient light works fine (uncommenting that setAmbientLight() line would show all the objects correctly), so I know lighting works to some degree. Here's the code in the constructor:

Code: [Select]
world = new World();
frameBuffer = new FrameBuffer(GravityBallApplet.width, GravityBallApplet.height, FrameBuffer.SAMPLINGMODE_NORMAL);

camera = world.getCamera();
camera.setPosition(0, 0, -cameraDistance);
//world.setAmbientLight(50, 50, 50);
world.addLight(new SimpleVector(0, 0, -1000), 20, 20, 20);

And here's the code in paint(Graphics g):

Code: [Select]

I've tried various positions of the light and none worked. Right now it's positioned where the camera is. Any help is much appreciated :) Thanks.

Pages: [1]