Author Topic: Technopolies  (Read 205169 times)

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Technopolies
« Reply #60 on: May 12, 2005, 07:08:23 am »
i've logged in but welcomed with an almost empty screen. the chat, inventory and character screens are there, but i couldnt go any further  :?:

Code: [Select]
r a f t

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Redesign.
« Reply #61 on: May 20, 2005, 12:02:00 pm »
The technopolies game model is going through intensive redesign.
 It is now meant to be 3Dimensional  and realtime, close to what World Of Warcraft offers.
It would take a couple of weeks to make working version of server/client, provided the load on my day job wont be too pressing.
Regards,
Andrei

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Development
« Reply #62 on: May 23, 2005, 07:55:49 am »
- Techno Server was redesigned to operate in realtime.
- Maps are no longer tiled structures but realtime 2D terrain.
- added terrain generator which generates relief terrain from GIF images

server map viewer


server map viewer#2



Original map image


Generated map


Same map with clouds and fog


It is still needed to port previous objects (buildings & misc) onto the new terrain:

opengl'ed:

Regards,
Andrei

Offline Remo

  • int
  • **
  • Posts: 64
    • View Profile
    • http://www.opsdirector.com/3dart
Technopolies
« Reply #63 on: May 23, 2005, 10:58:42 am »
Wow man... When I first saw this project I tought it was going great but now I see it like a very very strong project man. Keep up the good work. Im looking forward to check your game out :).


Edit: I just drooled at your terrain generator for like 5 minutes wondering If I can achieve something like that for my project.

Edit II: I was wondering what server technology are you using for technopolies??? Im really new to server side programming so I want to start with something that will help me with my game project so I can learn and use the most of it.

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Terrain code
« Reply #64 on: May 23, 2005, 12:52:54 pm »
Sand storm on the surface ... 8)


Here is the terrain generator code that uses images to generate 3D terrain. ClientFactory.addPlane() generates rectangle by 4 points, the code should be somewhere here in one of the forums.

Code: [Select]

//load map image and grab pixels data
        Image map = ClientFactory.getImage("/resources6/test_map2.gif").getScaledInstance(MAP_WIDTH, MAP_HEIGHT, Image.SCALE_SMOOTH);
        PixelGrabber pg = new PixelGrabber(map, 0, 0, MAP_WIDTH, MAP_HEIGHT, true);
        pg.grabPixels(0);
        int[] pixels = (int[]) pg.getPixels();

        //create terrain object
        ground = new Object3D(pixels.length * 4);

        //store map heights
        int[][] cols = new int[MAP_HEIGHT][MAP_WIDTH];

        for (int i = 0; i < pixels.length; i++) {
            int x = i / MAP_WIDTH;
            int y = i % MAP_WIDTH;
            int col = getCol(i, pixels);
            cols[x][y] = col;
        }

        //preload random textures for map tiles
        String[] textures = new String[]{
            "/resources6/test_texture.jpg",
            "/resources6/test_texture2.jpg",
            "/resources6/test_texture3.jpg",
            "/resources6/test_texture4.jpg",
            "/resources6/test_texture5.jpg"
        };
        for (int i = 0; i < textures.length; i++) {
            ClientFactory.getTexture(textures[i]);
        }
       
        //add polygons to Ground
        for (int i = 0; i < MAP_HEIGHT - 1; i++) {
            for (int j = 0; j < MAP_WIDTH - 1; j++) {

                int nw = cols[i][j];
                int ne = cols[i][j + 1];
                int se = cols[i + 1][j + 1];
                int sw = cols[i + 1][j];

                int x = j;
                int y = i;

                int textureId = TextureManager.getInstance().getTextureID(textures[(int) (Math.random() * textures.length)]);

                ClientFactory.addPlane(ground,
                        new SimpleVector(x * CELL_SIZE, y * CELL_SIZE + CELL_SIZE, HEIGHT_PER_UNIT * sw), //sw
                        new SimpleVector(x * CELL_SIZE, y * CELL_SIZE, HEIGHT_PER_UNIT * nw), //nw
                        new SimpleVector(x * CELL_SIZE + CELL_SIZE, y * CELL_SIZE, HEIGHT_PER_UNIT * ne), //ne
                        new SimpleVector(x * CELL_SIZE + CELL_SIZE, y * CELL_SIZE + CELL_SIZE, HEIGHT_PER_UNIT * se), //se
                        CELL_SIZE,
                        textureId);

            }
        }

        ground.calcNormals();
Regards,
Andrei

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Server technology
« Reply #65 on: May 23, 2005, 01:17:40 pm »
The server is build on top of java NIO and its own scalable lightweight framework. Earlier applet versions used j2ee server which turned out to be the overkill. Some later i had to switch to a home made solution.

I did some research on game servers and did not found anything for outright use. Most of techs are either in the prototype stage or are expensive or lack documentation and proven successful usage facts.

1. Java Game Server - http://www.gridtoday.com/04/0329/102930.html SUN demoed it a year ago and since then i did not hear anything about this technology. Still it looks very promising due to it's innovative resource management approach.

2. GREX engine http://www.grexengine.com/ claims to have same features. I did not managed to find a decent doc or demo or whatever that proves that it is worth using. Costs $5.000-$500.000 depending on the license type
Regards,
Andrei

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Animation Editor update
« Reply #66 on: May 23, 2005, 01:24:36 pm »
- Animation editor redesigned to support custom skeletons

animation editor


naked character
Regards,
Andrei

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Technopolies
« Reply #67 on: May 23, 2005, 05:54:57 pm »
hey rolz,

can u say more about that animation editor ? what does it do exactly ? and may we use it ? ;-)

the links seem nice but i'm quite unsure if such a 'network engine' worths that much. for karga, up to now it wasnt the networking and and other server side stuff but client side 'mathematics' that challenged me.  for instance deciding a direction and making a character step to that direction smoothly is god damn harder than broadcasting server events to clients. it maybe because of i was experienced on those stuff but i'm not sure

your shots seem cool as always
Code: [Select]
r a f t

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Animation
« Reply #68 on: May 24, 2005, 03:33:14 pm »
Technopolies animation is simplier than skeletal (Cal3D ) or mesh animaton (which is supported by JPCT).

I used rot angles between body parts to define each frame. Then rotate all specified parts to some interpolated values on playback.
Animation editor is a visual tool for recording/previewing animations.

The pros of using own animations framewor are that it is really simple and lightweight. The cons are that you cannot mix several animations for same body parts (while it is still possible to mix separate animations for, say legs, arms and chest).

You may also want to check Cal3D as it should be more mature (in fact i am looking into switching to it someday on low priority), try googling for Fuze3D and java port of Cal3D
Regards,
Andrei

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Texture map
« Reply #69 on: May 24, 2005, 04:50:07 pm »
Added texture maps to map builder.
Different textures could be bound to colors of pixels on texture map


this is how the relief map looks like:


texture map that defines textures for map squares:


and the result:
Regards,
Andrei

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Technopolies
« Reply #70 on: May 25, 2005, 01:04:59 am »
Nice progress on the 3D/realtime version...i can't wait to see how all this fits together graphical and gameplay wise. And i don't think that your animation system is simpler than jPCT's. It's just different and it has a lot of pros on its side compared to mesh interpolation.

Offline Remo

  • int
  • **
  • Posts: 64
    • View Profile
    • http://www.opsdirector.com/3dart
Technopolies
« Reply #71 on: May 25, 2005, 09:57:08 am »
Oh man, thanks for that.

All this stuff looks great!!!! You are doing a great job! Thanks for all the information.

Edit: Is all the 2D stuff blitted onto the screen?

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Technopolies
« Reply #72 on: May 25, 2005, 02:48:57 pm »
yes. There is no other way to show 2d in openGL mode
Regards,
Andrei

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Animated characters
« Reply #73 on: May 25, 2005, 07:36:43 pm »
- added animated characters to the new terrain. a
- added weather conditions to the world



Regards,
Andrei

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
new models
« Reply #74 on: May 29, 2005, 01:34:05 pm »
- optimized player models (from 1200 to 530 faces)



Regards,
Andrei