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 - FireBorn

#1
Support / Re: Performance problems
April 01, 2009, 03:20:53 AM
This sounds like an issue I was having that I posted about in another thread. Unfortunately, the project has been on hold for a while so I haven't been able to find a solution yet. I'll let you know if I find one, though. :)
#2
Support / Java Game Programming Question
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?

Thanks,
Ken
#3
Support / Re: Newbie lighting question
February 17, 2009, 06:42:47 PM
Thanks guys, that helped. I also had to turn off Config.fadeoutLight to get the desired effect.

I have another question. Is it possible to give the user the option to change the rendering mode to hardware from within the applet?
#4
Support / Newbie lighting question
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:


world = new World();
World.setDefaultThread(Thread.currentThread());
frameBuffer = new FrameBuffer(GravityBallApplet.width, GravityBallApplet.height, FrameBuffer.SAMPLINGMODE_NORMAL);

world.addObject(interceptor.threeDee);
camera = world.getCamera();
cameraDistance = DEFAULT_CAMERA_DISTANCE;
camera.setPosition(0, 0, -cameraDistance);
world.getLights().setOverbrightLighting(Lights.OVERBRIGHT_LIGHTING_DISABLED);
world.getLights().setRGBScale(Lights.RGB_SCALE_2X);
//world.setAmbientLight(50, 50, 50);
world.addLight(new SimpleVector(0, 0, -1000), 20, 20, 20);


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


frameBuffer.clear();
world.renderScene(frameBuffer);
world.draw(frameBuffer);
frameBuffer.update();
frameBuffer.display(g);


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.