Jump to content

Masterxilo

Members
  • Posts

    379
  • Joined

  • Last visited

Posts posted by Masterxilo

  1. One single reason why Fortran is faster than C/C++ is that the Fortran compiler will load the values once and store them in registers.

    It can do so because in Fortran pointers/arrays cannot overlap in memory, not even in multi-threading, while in C/C++ the compiler doesn't know if they do, and it takes a seperate copy into memory of all pointer values which might overlap.

     

    How can it be so sure that they won't overlap? Does it do runtime checking (which would be pretty slow...)?

     

    You can promise the C/C++ compiler that two pointers won't overlap using __restrict:

     

    int fast(int * __restrict A, int * __restrict B)
    {
       *A = 5;
       *B = 7; // RESTRICT promises that A != B
       return *A + *B; // no stall; the compiler hangs onto
       // 5 and 7 in the registers.
    }
    
    int slow(int *A, int *B)
    {
       *A = 5;
       *B = 7;
       return *A + *B; // LHS stall: the compiler doesn't
       // know whether A == B, so it has to
       //  reload both before the add
    } 

  2. I think the wiki should be replaced by something using this website design and template (like the tutorials section).

    This would unify things.

     

    Btw. what happened to the planned "official" documentation which was supposed to become a replacement of the wiki?

  3. The lighting just lights what was rendered onto the buffer on

    SetBuffer(buffer); RenderWorld();

    , it doesn't take any changes you make to the world after rendering it into account.

     

    You can easily make an object invisible yet still cast a shadow (meaning what is below won't be affted by the light making it cast a shadow), I think Josh already showed how to in your other thread.

     

    The idea is to use a material that doesn't render anything with it's normal "shader", yet has a "shadowshader" that renders the object solid.

  4. or part1:SetMatrix(mainmodel) in the UpdateMatrix() method if it can't be parented (for example transparent objects).

     

    You can parent objects that are not in the same world to each other.

     

    I don't agree on the gravity center entity, this sounds like a very hack way to do things. What if your objects are below y = -50000?

     

    The rest of it really lists good means to achieve things in my eyes.

  5. It doesn't work for me either. I have to resave them in photoshop. But when I render to texture, I use lossless formats with pretty high resolution only anyways.

     

    You'll be glad you did this later, believe me.

  6. Probably a stupid question, I'm a bit of a newb(post 3 hurray!)

     

    How well does the leadwerks networking module work? Would you say well enough for an rts with hundreds of units(and no client side predicting)

     

    thx :)

     

    Hi, funnyben.

    I don't think you'd even need/want to use any client side prediction with an rts.

     

    Wouldn't you want to use the reliable TCP protocol and only transmit the user interactions (button clicks)?

    Syncing all the unit positions is way too inefficient and inaccurate...

×
×
  • Create New...