Jump to content

Canardia

Developers
  • Posts

    4,127
  • Joined

  • Last visited

Posts posted by Canardia

  1. I always thought tcp was slower because it has to handshake?

    That's what I thought too, because everyone keeps saying that UDP is faster. But when I tested it, TCP was much faster. I think it's because TCP opens a stream and has permanent connection, while UDP must reconnect and find the route over hundreds of servers each time a tiny packet is sent, which takes time.

  2. I tested with winsock that TCP is generally faster than UDP over long distances. I think RakNet supports also TCP, or you can just use winsock, it's cross-platform has all the things built-in for reliable and fast networking. RakNet is essentially just trying to make UDP more reliable, but it's still slower than raw TCP.

  3. I've made a few space simulations with LE2, and had no bigger problems. You should use a quite small scale for models, because of the accuracy limitations of 32-bit floats. Hopefully LE3 can be recompiled as 64-bit float version (and also Newton 3.0) to overcome those limitations. A 64-bit float is not only twice as accurate, but 10 million times more accurate than a 32-bit float (7 vs 15 digits), and since in long range simulations we need also distance, the accuracy is converted into range.

  4. ReInitialize() is just a Cubix game specific reinitialization to create default values for enemies and player:

     

     

    void Cubix::ReInitialize()

    {

    pla=game.scene.SetCurrentPlayer("player1");

    if(NULL==pla->body)Notify("player1 not found");

    pla->SetWeapon("rifle");

    CreateEnemies();

    cubes.at(0).SetGravityMode(false); // prepare first attacking cube

    snd2.Load("Models/Cube1/Cube1.ogg");

    src2.Create(snd2,LOOP);

    src2.SetRange(100);

    src2.SetVolume(0.6);

    src2.Play();

    //SetEntityKey(snd2,"name","snd2");

    //SetEntityName(src2,"src2");

    sounds["exp"].Load("models/cube1/cubedeath.ogg");

    sources["exp"].Create(sounds["exp"],EAX);

    sources["exp"].SetRange(100);

    sources["exp"].SetVolume(0.6);

    sounds["die"].Load("models/player1/playerdeath.ogg");

    sources["die"].Create(sounds["die"],EAX);

    sources["die"].SetRange(100);

    game.scene.framewerk.listener.SetPosition(game.scene.cam.GetPosition(GLOBAL));

    game.scene.framewerk.listener.SetRotation(game.scene.cam.GetRotation(GLOBAL));

    game.scene.framewerk.listener.SetParent(game.scene.cam);

    //Sound::SetEAXEffect(MOUNTAINS); // engine bug: this disables 3D sounds

    game.scene.foregroundworld.Set();

    emitter1=GetFirstEntityByKey("name","emitter_1",ENTITY_EMITTER);

    //TEmitter emitter2=GetFirstEntityByKey("name","emitter_1",ENTITY_EMITTER);

    game.scene.world.Set();

    //if(!emitter2)MessageBoxA(0,"NO EMITTER",0,0);

    //EntityColor(emitter1,Vec4(1,0,0,1));

    //emitter1.SetArea(Vec3(1,1,1));

    //SetEmitterArea(emitter2,Vec3(1,1,1));

    }

  5. Actually the code was not in gamelib, but in cubix. There I have this code to switch to the next level, clearing and recreating framework (it still uses gamelib functions though):

     

     

    #if devel

    Keyboard::I****(KEY_F2) ||

    #endif

    nextlevel )

    { // TODO: This will go to GameLib

    nextlevel=false;

    //game.scene.framewerk.Free();

    game.scene.skyworld.Set();

    game.scene.skyworld.Clear();

    game.scene.skyworld.Free();

    game.scene.world.Set();

    game.scene.world.Clear();

    game.scene.world.Free();

    game.scene.foregroundworld.Set();

    game.scene.foregroundworld.Clear();

    game.scene.foregroundworld.Free();

    FreeEntity(game.scene.outofworldentity["sound_1"].entity); //TODO: free all entities loop

    game.scene.outofworldentity.clear(); // clear the whole map and resize it to 0

    //FreeEntity(game.scene.scene);

    #if devel

    printf("LEVEL2: CLEAR\n");

    CountEntities();

    #endif

    game.scene.ReInitialize();

    game.luat.Create(); // create the LuaTools object

    game.luat.SetScriptObject("fw",game.scene.framewerk); // set the Lua variable fw

    game.scene.LoadMap("maps/level2.sbx");

    ReInitialize();

    SetStats(0); // TODO: Somehow Application should do this

    BeginRender();

    EndRender();

    Flip(1,-2);

    }

  6. Those kind of games are also quite boring and you finish them in 8 hours and rarely play again, maybe once a year. A physics rich game would bring much more variety to the game, and let the game be played over and over again with different styles.

  7. That's because you have some other stuff on your page besides the body field.

    It works with a plain page which has only body tag and nothing else.

    If you use a form tag, then you probably need to apply the radial gradient to the html tag, or to the form tag, but then you also need to put the margins to 0 since the form tag has some default margin of 5 or something.

    I would probably use a div tag which has 100% width and height.

  8. Seems to work for me by default correctly (using Chrome):

     

     

    body

    {

    background: #1e5799; /* Old browsers */

    background: -moz-radial-gradient(center, ellipse cover, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%); /* FF3.6+ */

    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-stop(51%,#207cca), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */

    background: -webkit-radial-gradient(center, ellipse cover, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */

    background: -o-radial-gradient(center, ellipse cover, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Opera 12+ */

    background: -ms-radial-gradient(center, ellipse cover, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* IE10+ */

    background: radial-gradient(ellipse at center, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* W3C */

    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */

    }

     

    Generated with this gradient tool, I use it always for all kind of gradients:

    http://www.colorzilla.com/gradient-editor/

  9. 1) Since you are still in 2-3 year development, you don't need a DLL, since LE3 comes as a static lib.

    2) Shadow distance is a general problem of shadow mapping engines. But nobody seems to use stencil shadows anymore, although I prefer them. Yeah they are too sharp, but rather too sharp than too low distance. If I knew how to solve the shadow problem, I would write my own engine.

    3) Just buy LE2 now to get LE3 cheaper.

    4) I'd say just do single exe apps, without the need for any runtime DLLs. You need mingw64 for that.

  10. Crysis polycounts:

    Weapons (1st person and 3rd person bind models)

    1st person: about 6000 triangles (same as cryengine1; not more really needed ? above, normal maps are not needed)

    3rd person: about 1500 triangles

     

    Characters

    As we are using attachments we have to split the triangle numbers in the separate parts:

    * Heads 3k triangles

    * Body 5k triangles

    * Attachments 1 k triangles

     

    Vehicles

    Max. 20000 polygons is our internal limit

     

    Buildings

    Hard to answer ? put detail were detail is needed. No real need to go crazy. If you only have a few buildings in your level you can spend more triangles, but you should be careful in City maps.

     

    Vegetation

    Between 500 and 2500 triangles for trees ?whereas the ones with 2500 should not be used in a dense forest because of the filtrate ? It heavily depends on the scenery you want to create.

×
×
  • Create New...