Technopolies

Started by rolz, October 21, 2004, 04:03:43 PM

Previous topic - Next topic

raft

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  :?:

r a f t

rolz

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

rolz

- 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

Remo

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.

rolz

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.


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

rolz

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

rolz

- Animation editor redesigned to support custom skeletons

animation editor


naked character
Regards,
Andrei

raft

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
r a f t

rolz

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

rolz

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

EgonOlsen

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.

Remo

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?

rolz

yes. There is no other way to show 2d in openGL mode
Regards,
Andrei

rolz

- added animated characters to the new terrain. a
- added weather conditions to the world



Regards,
Andrei

rolz

- optimized player models (from 1200 to 530 faces)



Regards,
Andrei