Search:

Type: Posts; User: ninebit

Page 1 of 5 1

1. Thread: 32 vs 64 float

by ninebit
Replies
9
Views
1,465

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. Thread: is tha good method?

by ninebit
Replies
27
Views
6,244

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. Thread: is tha good method?

by ninebit
Replies
27
Views
6,244

You forgot that INT_MAX is half of 4294967295...

You forgot that INT_MAX is half of 4294967295...
4. Thread: is tha good method?

by ninebit
Replies
27
Views
6,244

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. Thread: is tha good method?

by ninebit
Replies
27
Views
6,244

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. Thread: is tha good method?

by ninebit
Replies
27
Views
6,244

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. Thread: A little confused about binary files.

by ninebit
Replies
2
Views
817

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. Thread: clear collisions

by ninebit
Replies
4
Views
1,452

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. Thread: clear collisions

by ninebit
Replies
4
Views
1,452

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

by ninebit
Replies
8
Views
2,001

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. Thread: difference between 0 and null

by ninebit
Replies
23
Views
2,880

#define NULL (void*)0

#define NULL (void*)0
12. Thread: u got me wrong fellas

by ninebit
Replies
4
Views
1,626

* 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. Thread: How to add data and function as the program is running

by ninebit
Replies
9
Views
1,044

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;

14. Thread: slow std::string?

by ninebit
Replies
28
Views
2,519

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,389

half an int

Hello all, just a quick quest:

is half an unsigned int 0x80000000 or 0x7FFFFFFF?

0xFFFFFFFF / 2 = 0x7FFFFFFF

but

0x7FFFFFFF * 2 = 0xFFFFFFFE

by ninebit
Replies
11
Views
1,602

SDL
17. Thread: get system precise time

by ninebit
Replies
6
Views
1,728

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. Thread: is there an infinitely large integer type?

by ninebit
Replies
7
Views
1,469

max for unsigned long long is...

max for unsigned long long is 18446744073709551615... i hope you realise how large that number is... hehe...
19. Thread: Which comes first...delete [] or NULL?

by ninebit
Replies
13
Views
1,870

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; }

by ninebit
Replies
2
Views
1,140

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. Thread: posting data to webpage...

by ninebit
Replies
2
Views
939

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 donät know why you want to build a form before you...
22. Thread: The private game

by ninebit
Replies
2,805
Views
158,507

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

linux...

has anyone read all these questions??
23. Thread: memory max if any

by ninebit
Replies
6
Views
801

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. Thread: OBJ TDS files .. what are they ?

by ninebit
Replies
1
Views
1,443

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. Thread: SORRY need my hand holding with linked lists

by ninebit
Replies
4
Views
698

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