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

Pages: 1 2 3 [4] 5 6 ... 19
46
Support / Sorting problems with GLRenderer
« on: February 15, 2006, 11:19:44 am »
Woops, i would like to take back my statements about fullscreen mode only - the problem appears also in windowed mode

47
Support / Sorting problems with GLRenderer
« on: February 15, 2006, 11:00:15 am »
Sure, here is the screenshot:
*Removed*

I've just noticed that the problem occurs only in fullscreen.
Object are not very close to each other (though their X is the same, but Y differs). Actually as you can see on the movie, they are 2 pieces of the wall with a small overlapping area. I've played around with Config.glZbufferDepth but with no results.

48
Support / Texture color inconsistent
« on: February 14, 2006, 10:41:30 pm »
just wanted to say i definitelly like the way JPCT goes for the last two months - with all those improvements and new features. Keep up the good job, well done, Helge

49
Support / Sorting problems with GLRenderer
« on: February 14, 2006, 10:52:54 am »
Helge, i've noticed a bug with overlaping non-transparent objects:

There are two overlapping non-transparent objects with diffent sortOffset. When the camera moves, overlapping is not consistent, e.g. on one frame the object 1 is on top, and on another object 2 is on top.

The problem appears to be in 1.10_pre_xx , with GLRenderer only. When i switch back to 1.9 and AWTGLRenderer the problem goes away.

50
Projects / Technopolies
« on: February 12, 2006, 04:18:54 pm »
finally got some time to work on ui. Ported small part of older UI to GL, this time inventory screen:
*Removed*

51
Support / Blitting performance
« on: February 11, 2006, 01:26:56 pm »
I've done similar research, check it out here:
http://www.jpct.net/forum/viewtopic.php?p=2177

With latest JPCT changes, blitting lots of small components doesnt hurts performance badly, and therefor can be used as it is more convenient than generating/uploading texture every time component changes.

52
Projects / Technopolies
« on: February 09, 2006, 07:54:44 pm »
Wow, MUCH faster now,

old version: 117 FPS
pre_4: 243 FPS

What did you change that influenced performance so much ?

53
Projects / Technopolies
« on: February 09, 2006, 01:31:23 pm »
Yes, I got new GL renderer performing much better on my system.

In average, I get 133-135 fps with new renderer and 75-85 with 1.10_pre3.


Regarding 2D - i would like to stick with JPCT's blitting unless you recomend to do otherwise.


BTW, I need your thoughts regarding blitting text.

After doing some UI benchmarks it appears that in general the UI works just fine except for text rendering - it is rather slow.

For example, the UI with 5 semi-transparent windows with a dozen of buttons
displays at 250-260 FPS.

If i add10 lines of text, 30-symbols per line, fps drops to 160. With 20 lines of text, FPS drops to 85-90.  

I assume that the reason of poor performance is my current text blitting implementation. I load the whole alphabet as a single texture and blit chars as regions of this texture, every char is blitted separatelly as a single polygon.

What are your suggestions on improving text blitting ?

I had ideas of creating a texture effect that would change UI component's texture when UI component's text changes - do you think is it worth trying ?
 Let's say if the texture is 256x256 and text changes every 1-2 sec - will generating/uploading a texture be faster than blitting text as separate chars ?

54
Projects / Technopolies
« on: February 05, 2006, 01:17:45 pm »
The main reason i beleive is just too many people coplaining about problems making the game to run at all. ;(

I had this decision in mind for a long time, but was unsure if it is worth switching from AWTGL to OpenGL renderer. ;(

I liked AWTGL renderer for being able to mix AWT and GL seamlessly, but i see now it has drawbacks. I would not throw it out completelly, it is still used by map viewer and animation editor (with AWT UI), but the game now uses GLRenderer.

55
Projects / Technopolies
« on: February 04, 2006, 05:49:41 pm »
I am going on vacations and will be out of computer for a week. The build is postponed till feb, 15.


New features for today

- switched from AWT GL to GL renderer. Lost most of 2D functionality, but i hope to recover it in a couple of weeks
- started reworking 2d to be based on opengl
- added GLComponent, GLTextArea, and GLButton base classes

Simple UI with a couple of semi-transparent panels and lots of small buttons in the background:
*Removed*

56
Projects / Technopolies
« on: January 30, 2006, 10:07:39 am »
The build is postponed till the next week.

57
Projects / Technopolies
« on: January 27, 2006, 03:41:50 pm »
nope, that's the build/date string for upcoming version.
I increase version number just after the previous release - a reminder for keeping up to the schedule ;)

EDIT:
that is, the next public version is 2 days away.

58
Projects / Technopolies
« on: January 26, 2006, 07:07:10 pm »
a couple of new shots
*Removed*

59
Projects / Technopolies
« on: January 26, 2006, 05:09:20 pm »
sorry for late response folks, i dont have much time lately. ;(

regarding models - trees are quite simple, you can use them. Just unpack client.jar and check resources1/static/trees for model and textures

regarding texture generation, it's actually an RGB filter which i use to mix 4 textures - one per each vertex, here is the code. It's rough and somewhat code dependent but.. anyway - it's enough to explain the idea

Code: [Select]

    private static class MixFilter extends RGBImageFilter {
        BufferedImage [] images;

        int size = 0;

        public MixFilter(Terrain3D []terrains) {
            images = new BufferedImage[terrains.length];
            for (int i = 0; i < terrains.length; i++) {
                Terrain3D terrain = terrains[i];
                images[i] = (BufferedImage) terrain.getImage();
            }

            size = images[0].getWidth();
        }

        public int filterRGB(int x, int y, int rgb) {

            double maxLen = Math.sqrt(2) * size;

            double[]weights = new double[images.length];

            weights[0] = (maxLen - 1 - Point.distance(x, y, 0, 0)) / maxLen;
            weights[1] = (maxLen - 1 - Point.distance(x, y, size, 0)) / maxLen;
            weights[2] = (maxLen - 1 - Point.distance(x, y, size, size)) / maxLen;
            weights[3] = (maxLen - 1 - Point.distance(x, y, 0, size)) / maxLen;

            if (Math.random() > 0.2)
                return getFineRGB(weights, x, y);
            return getCoarseRGB(weights, x, y);
        }

        private int getFineRGB(double[] weights, int x, int y) {
            double r = 0;
            double g = 0;
            double b = 0;
            for (int i = 0; i < weights.length; i++) {
                weights[i] = weights[i] * weights[i];
//                weights[i] = Math.pow(weights[i],2.5);
            }

            double weightsSum = 0;
            for (int i = 0; i < weights.length; i++) {
                double weight = weights[i];
                weightsSum += weight;
            }

            for (int i = 0; i < weights.length; i++) {
                weights[i] = weights[i] / weightsSum;
            }

            for (int i = 0; i < weights.length; i++) {
                double weight = weights[i];
                Color col = new Color(images[i].getRGB(x, y));
                r += (col.getRed() * weight);
                g += (col.getGreen() * weight);
                b += (col.getBlue() * weight);
            }
            return new Color((int) r, (int) g, (int) b).getRGB();
        }

        private int getCoarseRGB(double[] weights, int x, int y) {
            double weightLimit = 0;
            for (int i = 0; i < weights.length; i++) {
                if (i < weights.length - 1) {
                    double lim = 0.2 * (0.5 - Math.random());
                    weights[i] += lim;
                    weightLimit += lim;
                } else {
                    weights[i] -= weightLimit;
                }
            }

            int idx = 0;
            double maxWeight = 0;
            for (int i = 0; i < weights.length; i++) {
                double weight = weights[i];
                if (weight > maxWeight) {
                    maxWeight = weight;
                    idx = i;
                }
            }
            return images[idx].getRGB(x, y);
        }
    }

60
Support / Textures in applets
« on: January 23, 2006, 04:51:33 pm »
Looks like UV coordinates are not assigned properly for this object (box).
try object3D.calcTextureWrap();

Pages: 1 2 3 [4] 5 6 ... 19