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.


Messages - Minigame

Pages: 1 2 3 [4]
46
Support / blurred text upon resize?
« on: January 13, 2013, 02:26:31 am »


Whenever I resize the client application, it seems that text blurs.

Here's the bit of code I am using for this feature:
Code: [Select]
// Handle resizing
if (Display.wasResized()) {
buffer.resize(Display.getWidth(), Display.getHeight());
buffer.refresh();
app.getSettings().setWidth(Display.getWidth());
app.getSettings().setHeight(Display.getHeight());
mouseYOffset = buffer.getOutputHeight();
}

To draw the text Strings I am using an implementation of raft's GLFont class, so I figured maybe somebody here has used it and could tell me if  I am doing something wrong?

Updated:
Sometimes when I resize the application I get these random lines? I didn't notice this when I originally posted, but it is relevant to the original post so I shared it on this thread as well..

47
Support / Re: gl in jframe
« on: January 07, 2013, 09:33:32 pm »
...so...it's the software renderer!? In that case it's only natural that it's slower, because rendering is done by the CPU instead of the graphics card now. If you are using a multi-core CPU, you can try to do this:

Code: [Select]
Config.useMultipleThreads=true;
Config.loadBalancingStrategy=1;
Config.maxNumberOfCores=<number of cores available>;

Edited: The above code helped with performance quite a bit. Switching to OpenGL hardware would use the GPU though, correct?

48
Support / Re: gl in jframe
« on: January 07, 2013, 09:03:28 pm »
How are you doing the rendering into the JFrame? AWTGLRenderer, software renderer or an image taken from the FrameBuffer?

I'm just creating the frame buffer instance after the jframe is created
            buffer = new FrameBuffer(app.getSettings().getWidth(), app.getSettings().getHeight()-125, FrameBuffer.SAMPLINGMODE_NORMAL);

this is how I'm getting the 2D graphics to display in the buffer, or whatever
         graphics = (Graphics2D) getBufferStrategy().getDrawGraphics();

and in the update loop, I'm just cycling this bit of code to render the scene

               // Clear the previous frame
               graphics.clearRect(0, 0, getWidth(), getHeight());
               buffer.clear(Color.BLACK); // app.getSettings().getBackgroundColor());
               
               app.getCurrentState().display3D(buffer); // This is the jPCT world..
               buffer.update();
               buffer.display(graphics); // 2D graphics
               app.getCurrentState().display2D(graphics);

Sorry for the lack of technicality in details.. I'm still learning

49
Support / gl in jframe
« on: January 07, 2013, 08:50:24 pm »
I've written a few jPCT based client applications and have gotten them to run @ 120fps but they have used lwjgl display and input handling.
The latest project of mine though, only gets up to 35fps, and I'm wondering if it's because I am using jPCT solely to render the 3D scene, which is drawn inside of a JFrame, and uses Java2D (AWT functions) for game interfaces, user input, etc.
The way scene processes is just as efficient as previous clients, so I have to wonder if what I'm doing (the jframe thing) is bad?

50
Support / Re: Noobest Question Ever?
« on: November 29, 2012, 10:51:01 am »
If the weapon is only used for the same model, or all the animations for the models using it are the same, you could just animate the model and then parent it, matching the animation of the parent to the weapon. That's the old school method, and it tends to work in most situations. However, if that won't work then you'll have to actually find out where to position the weapon a complex way.

The complex method is to locate the polygon of the model you want the weapon to follow, then using the polygon manager of the object update the weapon to match that polygon's position from the rest of the model, and move the weapon to match. The problem with this method is you have to know the index of the polygon you are going to follow.

If you are using skeletal animations I believe there is a much easier method, but I have no experience with such.

Thanks for taking the time to reply, the old school method worked perfectly..

51
Support / string on bill board
« on: November 28, 2012, 07:28:33 am »
I've gotten the basic setup for name tags implemented into my client application:


My goal is to generate name textures, and set them as the bill board texture. I'm not sure how to approach so tips for something efficient would be greatly appreciated.

52
Support / Noobest Question Ever?
« on: November 21, 2012, 09:46:36 pm »
What is the best approach for adding a weapon to a player's hand? Or attaching items such as hats, etc. I've never tried this, and I'm very unsure of where to start. I would need to animate it with the parent model as well.

53
Projects / Re: Forgotten Elements 3D
« on: November 14, 2012, 09:29:09 pm »
I'm not much of a gamer but out of curiosity I did play this game and I have to say I am very impressed with how well it is coming along. It's nice to see original creations that actually make it somewhere bigger than just a project thread!
Not a huge fan of the website template or how the forums aren't on the same domain, but I am just being constructive here, don't take it offensively :D

54
Support / Re: Level of detail
« on: November 14, 2012, 09:24:29 pm »
No, not build in. Mainly because for almost every game related application, this isn't used anymore. It was popular back in 2000 when hardware wasn't able to push much polygons. Today, hardware can easily process millions of polygons per frame and it actually suffers from constantly updating a mesh with the "loded" polygons more than it suffers from simply rendering a detailed but static mesh.

I see.. I'm an amateur with 3D development, and I've only used your library (no raw gl other than input/display) so how would I go about implementing a feature like this using jPCT?

Another question: Would fogging help keep frame count healthy? I've toyed with jPCT fogging, but I don't know the technical details behind it like how it truly effects performance.

55
Support / Level of detail
« on: November 14, 2012, 06:15:44 pm »
Is there a way to manipulate the level of detail in the world scene, based on distance from the camera?
Example: http://www.youtube.com/watch?v=kNVne97Ti7I

Pages: 1 2 3 [4]