Server Help

General Questions - Max bullet speed

Erf - Wed Apr 21, 2004 5:01 pm
Post subject: Max bullet speed
what is it?
CypherJF - Wed Apr 21, 2004 5:16 pm
Post subject:
is there? even so, either the program - subgame/continuum will put a cap on it.
Erf - Wed Apr 21, 2004 7:59 pm
Post subject:
I figure someone has figured it out at one time or another
Mr Ekted - Wed Apr 21, 2004 8:11 pm
Post subject:
Code: Show/Hide
unsigned short bullet_speed;


Maximum physical value is 65535, which translates to 6553 pixels per second, or 65 pixels per game tick (10ms). This is ludicrous speed (see Spaceballs). You would probably not be able to see them.
Erf - Wed Apr 21, 2004 10:13 pm
Post subject:
well, one of my ships is set at 40000,50000, and 60000.... the bullets actually go backwards
Mine GO BOOM - Wed Apr 21, 2004 10:36 pm
Post subject:
Its a signed value.
Erf - Wed Apr 21, 2004 10:40 pm
Post subject:
translated into non-programming language means?
Mine GO BOOM - Wed Apr 21, 2004 10:46 pm
Post subject:
I spent a good 5 minutes on MSDN trying to find their listing of type sizes and their min/max values, but fuck that shit, that thing is just pure bloat. Then I remembered Google is the best way to find anything.

Bullet speed is a signed short, thus it has a range of -32768 to 32767.
CypherJF - Thu Apr 22, 2004 12:00 am
Post subject:
MSDN is good but often times can't locate the material you need, so yeah just Google :-p .. i feel da pain!
Mr Ekted - Thu Apr 22, 2004 2:32 am
Post subject:
Mine GO BOOM wrote:
Its a signed value.


Bleh, I used an old copy of Catid's structure as a reference. icon_sad.gif
Mr Ekted - Thu Apr 22, 2004 2:33 am
Post subject:
Mine GO BOOM wrote:
I spent a good 5 minutes on MSDN trying to find their listing of type sizes and their min/max values, but fuck that shit, that thing is just pure bloat. Then I remembered Google is the best way to find anything.

Bullet speed is a signed short, thus it has a range of -32768 to 32767.


WTF dude? Can't you calculate the largest signed/unsigned value for any number of bytes?
Dr Brain - Thu Apr 22, 2004 9:47 am
Post subject:
Yah, its -2^15 to 2^15-1

30 seconds tops, none of that 5 mins junk tongue.gif
CypherJF - Thu Apr 22, 2004 10:22 am
Post subject:
I know I wouldn't as I have 2^15-1 million other things to memorize :/ LOL perhaps one day icon_smile.gif
Cyan~Fire - Thu Apr 22, 2004 6:10 pm
Post subject:
Well you have to remember that a short is 16 bits, and the top bit is for the sign. Easy calculation.
Mr Ekted - Thu Apr 22, 2004 7:40 pm
Post subject:
Cyan~Fire wrote:
Well you have to remember that a short is 16 bits, and the top bit is for the sign.


If one doesn't know that, they have no business programming.
Cyan~Fire - Thu Apr 22, 2004 8:56 pm
Post subject:
Or they just don't know much yet?
Mine GO BOOM - Fri Apr 23, 2004 1:05 pm
Post subject:
Mr Ekted wrote:
WTF dude? Can't you calculate the largest signed/unsigned value for any number of bytes?

I was hoping to find their page I found a long time ago that explained all the types very well, with how they are formed, max values, etc.
Mr Ekted - Fri Apr 23, 2004 2:39 pm
Post subject:
signed:

char sxxxxxxx (min -128, max 127)
short sxxxxxxx xxxxxxxx (min -32768, max 32767)
int/long sxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx (min -2147483648, max 2147483647)

unsigned:

char xxxxxxxx (min 0, max 255)
short xxxxxxxx xxxxxxxx (min 0, max 65535)
int/long xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx (min 0, max 4294967295)

Note: On Intel, bytes are stored in reverse order in memory.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group