Author Topic: Technopolies  (Read 203612 times)

Kamil

  • Guest
Technopolies
« Reply #285 on: January 12, 2006, 06:57:46 pm »
It's normal caleron based on P4. videocard is not integraded.  Hmm car demo from engine zip runs  on averange fps at 75 at 800x600 fullscreen.  

Ok reducing terrain details gives me about 35fps.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Technopolies
« Reply #286 on: January 12, 2006, 07:10:25 pm »
The P4 based Celeron is a weak CPU greatly handicapped by its lack of second level cache (only 128KB). It is especially bad in 3D games/applications and your clock rate is quite low. If lowering the details helps, you are most likely CPU limited. Have you tried Paradroidz? How fast is that one running?
For reference: Technopolies runs at around 40fps (starting position/1024*768/all setting default) on a PIII-866Mhz with 512MB SDRAM and a GeForce4Ti-4400. Due to the weak CPU, it drops down to 15 fps in situations where many many bots are visible, but it remains playable.

Edit: Here's a little benchmark based on the car-example: http://www.jpct.net/download/carbench.zip It can be run in "native" mode (st_opengl.bat) and "awt" mode (mt_opengl.bat). It would be interesting to see what your setup can score in this one (53/48 on the PIII mentioned above).

Kamil

  • Guest
Technopolies
« Reply #287 on: January 12, 2006, 07:28:59 pm »
st_opengl.bat :
fps : 54.10

mt_opengl.bat :
fps : 46.96

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Technopolies
« Reply #288 on: January 12, 2006, 07:55:50 pm »
That's almost on par with the PIII-866...i'll try to get some reference values for a similar machine to see if this is normal for such a setup. I fear it is... :cry:
BTW: The current record in this benchmark are 381fps scored on an overclocked dual core P4 Presler... :shock:

Kamil

  • Guest
Technopolies
« Reply #289 on: January 12, 2006, 08:11:13 pm »
I've just played Paradroid (highscore list 736 ;) ) .  Depends from scene, fps were 50-80, but mostly around 70.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Technopolies
« Reply #290 on: January 12, 2006, 10:56:05 pm »
Speaking of that old PIII, i've tried to run Techno on some old graphics cards lying around here. It runs fine on a Kyro2 chip with 64MB. Slightly slower than on the GF4, but not much. However, blitted text was blured...maybe you are using a texture for that that is too large for the Kyro2 to handle? I couldn't find the chip's exact specs anymore, so i don't really know what max texture size it supports. I remember something like 1024*1024, but i'm not sure. (pic1, pic2)

Edit: Found the specs: It is 1024*1024.

Then, i tried to run it on a Voodoo5-5500...it didn't work... :cry: But neither did Paradroidz. Both started fine in windowed mode but only managed to survive a few seconds before crashing. I've tried different drivers but to no avail. Well, it's a long gone card anyway...

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Technopolies
« Reply #291 on: January 13, 2006, 08:57:41 am »
Yes, I actually use 2048x16 texture for bitmap fonts. Will try to see if if can be changed to 1024x32
Regards,
Andrei

Anonymous

  • Guest
Technopolies
« Reply #292 on: January 16, 2006, 04:07:34 pm »
Quote from: "rolz"
Yes, I actually use 2048x16 texture for bitmap fonts. Will try to see if if can be changed to 1024x32


 :evil: Andrew, it's a good practice to use only (strongly preferable) square textures ;-) so, you'd better use 192x192 texure, and place your font here.

PS. It's Mike :-D

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Technopolies
« Reply #293 on: January 17, 2006, 08:43:33 pm »
- improved texture generation

Textures are now generated using more clever algorithm:

Fine transitions between textures:
*Removed*

Coarse transitions:
*Removed*

Not sure what of these two methods is better, they both make terrain look better than ever before. ;)
« Last Edit: November 07, 2010, 10:45:29 pm by EgonOlsen »
Regards,
Andrei

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Technopolies
« Reply #294 on: January 17, 2006, 11:07:06 pm »
I'm not sure either. I think i prefer the fine transitions when looking at the texture alone but seeing it in game could be a completely different story.

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
New terrain look
« Reply #295 on: January 18, 2006, 01:59:49 pm »
Yes, fine transitions look better when applied to the 3d terrain:
*Removed*

some more additions:

- Olbridge location has been converted to a single big map (it should take about 10-20 minutes to reach from one corner to another)
- It appeared that texture generation takes some time (172 textures, 128x128 each - 10-30sec.), so i decided to generate them at first start and store on disk.
- added some improvements to terrain generator. Basicly, what i want is to generate terrain and decorations on the fly - to allow smooth changes between locations.
« Last Edit: November 07, 2010, 10:45:37 pm by EgonOlsen »
Regards,
Andrei

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Technopolies
« Reply #296 on: January 22, 2006, 05:43:41 pm »
- terrain is now generated on the fly, this will allow maps to be really huge and continuous.
- some improvements for game quests/scenario

Auto generated terrain. Works fine with shadows.
*Removed*

Olbridge Map so far:
(lots of small dots near radford are trees. the small orange square is the bunker)
*Removed*
« Last Edit: November 07, 2010, 10:45:48 pm by EgonOlsen »
Regards,
Andrei

Offline manumoi

  • long
  • ***
  • Posts: 121
    • View Profile
    • http://www.iro.umontreal.ca/~blanchae
Technopolies
« Reply #297 on: January 23, 2006, 03:55:29 am »
As usual, your screenshots are amazing.
I have 2 questions :

Where did you get your trees? Do you know somewhere where i could find free low polygons trees with texture?

Could you explain the algorithm you used for your transitions and for rendering the terrain? And also what is the method you use for shadow?

Thanks

Manu

Offline Uija

  • int
  • **
  • Posts: 52
    • View Profile
Technopolies
« Reply #298 on: January 23, 2006, 09:37:30 am »
I bought lots of tree and other naturestuff in 2 packs from here and I am quite happy with them. There are some free trees too, to test.

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Technopolies
« Reply #299 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);
        }
    }
Regards,
Andrei