Search:

Type: Posts; User: ninebit

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: 32 vs 64 float

    by ninebit
    Replies
    9
    Views
    1,477

    32 vs 64 float

    Does anyone know if there are any difference in execution time for calculations using 32 bit float vs 64 bit double? Intiution says double should be slower for 32 bit processor and float slower on 64...
  2. Replies
    27
    Views
    6,333

    And Salem... it is faster... by using same...

    And Salem... it is faster...

    by using same way of thinking as you:

    pure + - ops does not need to be optimized by compiler its already as fast as it can be.
    the compiler can and will rearrange...
  3. Replies
    27
    Views
    6,333

    You forgot that INT_MAX is half of 4294967295...

    You forgot that INT_MAX is half of 4294967295...
  4. Replies
    27
    Views
    6,333

    Nope it does work both computational and...

    Nope it does work both computational and mathematically



    #include <stdio.h>
    #include <limits.h>

    int main(void) {
    int a = INT_MAX;
    int b = 20;
  5. Replies
    27
    Views
    6,333

    Oh, and by the way, xor swap does work with...

    Oh, and by the way, xor swap does work with signed values... as opposed to what some other people here says... bit-fields does not care about what number it represent... just run this smal program...
  6. Replies
    27
    Views
    6,333

    If you are swaping ints (signed or unsigned) this...

    If you are swaping ints (signed or unsigned) this functions works, and doesn't use an temporary variable (thus faster):

    a = a + b;
    b = a - b;
    b = a - b;

    Proof:

    a = -5
    b = 2
  7. Replies
    2
    Views
    819

    the only big difference when read a file in...

    the only big difference when read a file in normal vs binary is excactly what you said, the system characters are treated as just bytes and nothing else. reading a line from a binary file would prove...
  8. Replies
    4
    Views
    1,454

    I agree that circle (sphere) should be used f...

    I agree that circle (sphere) should be used f possible, since it easy and fast.

    pixel precise, would be for a 2d game to test each pixel of the two collidion objects (bitmaps?) to see if there is...
  9. Replies
    4
    Views
    1,454

    The way to do it is to use collision in time. ...

    The way to do it is to use collision in time.

    Say you have two objects with pos and vel as follows:
    p1 = (x, y) + t(a, b)
    p2 = (z, w) + t(c, d)

    where x, y (and z, w) is last frame pos, and...
  10. Thread: Snes!

    by ninebit
    Replies
    8
    Views
    2,015

    Weeell chaps! That would depend on yer compiler...

    Weeell chaps! That would depend on yer compiler wouldn't it?!? I meen: a pc program doesn't run in c code or even asm code, its run i machine code. Same things would apply to any console, handheld or...
  11. Replies
    23
    Views
    2,986

    #define NULL (void*)0

    #define NULL (void*)0
  12. Replies
    4
    Views
    1,635

    * you dont need to know about linked list to make...

    * you dont need to know about linked list to make a game.
    * you dont need to know math to make a game.
    * you dont need to know c/c++ to make a game.

    You don't need to know c/c++ to know how to...
  13. maybe you want to use virtual function tables...

    maybe you want to use virtual function tables (code your own) and dito for variables...


    something like:



    map<string, function_type> function_list;

    addFunction(function_pointer,...
  14. Replies
    28
    Views
    2,524

    I've written my own string class, and compared...

    I've written my own string class, and compared that with std::string... I find it pretty hard to beat performance of the std::string... For some operations: yes, but overall? no way... If anyone...
  15. Thread: half an int

    by ninebit
    Replies
    1
    Views
    2,412

    half an int

    Hello all, just a quick quest:

    is half an unsigned int 0x80000000 or 0x7FFFFFFF?

    0xFFFFFFFF / 2 = 0x7FFFFFFF

    but

    0x7FFFFFFF * 2 = 0xFFFFFFFE
  16. Replies
    11
    Views
    1,609

    SDL

    SDL
  17. Replies
    6
    Views
    1,740

    yes they use the RDTSC on some level, but then it...

    yes they use the RDTSC on some level, but then it would be better/faster to use RDTSC directly, if you know how...

    otherwise, use timeGetTime() under windows...easy to use, precision down to 5 ms...
  18. Replies
    7
    Views
    1,476

    max for unsigned long long is...

    max for unsigned long long is 18446744073709551615... i hope you realise how large that number is... hehe...
  19. Replies
    13
    Views
    1,913

    do this: delete szBuffer; szBuffer = NULL; ...

    do this:

    delete szBuffer;
    szBuffer = NULL;

    this macro is usefull:

    #define SAFE_DELETE(p) if(p){ delete p; p = NULL; }

    #define SAFE_DELETE_ARRAY(p) if(p){ delete [] p; p = NULL; }
  20. Thread: Start?

    by ninebit
    Replies
    2
    Views
    1,146

    ansi/iso c++ professional programmers handbook...

    ansi/iso c++ professional programmers handbook (the best... =)
    design patterns for games on gamedev.net
    game architecture and design
    open gl specifications/documents
    dirctx SDK (all you'll ever...
  21. Replies
    2
    Views
    942

    the way i have done it is not to post a form but...

    the way i have done it is not to post a form but to build the requeststring (like "\sendsms.asp?recipent=12345&msg=hello")and then request it. I dont know why you want to build a form before you...
  22. Replies
    2,805
    Views
    159,420

    linux... has anyone read all these questions??

    linux...

    has anyone read all these questions??
  23. Replies
    6
    Views
    804

    The memory max should be the total of what the...

    The memory max should be the total of what the computer have in RAM and windows swap... if you wanna test, make a program that loops and allocates more memory every loop, the program will stop when...
  24. Replies
    1
    Views
    1,447

    when the compiler compiles the code, it creates...

    when the compiler compiles the code, it creates obj files that are later linked together into the exe or dll or whatever...
  25. When you know how to do your own list, stop...

    When you know how to do your own list, stop reinventing the weel and use the std::list instead... easy, painless, optimized, portable...
Results 1 to 25 of 116
Page 1 of 5 1 2 3 4