Author |
Message |
-Smong- Guest
Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Thu Jul 22, 2004 4:08 pm Post maybe stupid Post subject: |
 |
|
|
|
What were the 2 values? If they are both unsigned, they can never be < 0 after a subtract. I think you misread what I was saying. _________________ 4,691 irradiated haggis!
|
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Thu Jul 22, 2004 4:55 pm Post maybe stupid Post subject: |
 |
|
|
|
Smong is making a client :/ ? _________________ Performance is often the art of cheating carefully. - James Gosling
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Thu Jul 22, 2004 5:01 pm Post maybe stupid Post subject: |
 |
|
|
|
The comparison (nextGreenTick < now) will fail over a wrap.
|
|
Back to top |
|
 |
Confess Zone Hoster
Joined: Feb 10 2004 Posts: 532 Offline
|
Posted: Thu Jul 22, 2004 5:09 pm Post maybe stupid Post subject: |
 |
|
|
|
wtfs up with the text? its all the way on the right side
|
|
Back to top |
|
 |
-Smong- Guest
Offline
|
Posted: Thu Jul 22, 2004 5:30 pm Post maybe stupid Post subject: |
 |
|
|
|
I think I may have muffed up one of the [ code ] tags
Lemme see if this helps --> [/code] <-- [ /code ]
Both 'now' and 'nextGreenTick' are both unsigned int's. The GetTickCount thing is like system uptime right? (as opposed to something like milliseconds since 1970).
Also I think maybe greens aren't spawned after a set delay, probably something to do with the ss random number generator (because PrizeFactor 1000 = 1 green per person).
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Thu Jul 22, 2004 6:21 pm Post maybe stupid Post subject: |
 |
|
|
|
If one value is 0xffffffff and the other is 0x00000001, then 0x00000001 - 0xffffffff = 2, and 0xffffffff - 0x00000001 = 0xfffffffe. It will never be < 0.
If you need to know when an interval passes, save NOW. At some point in the future you have the current TIME. TIME - NOW will always be >= 0 and you can compare to an interval. This works because you have guarateed the relationship between the 2 values based on when you set them.
Greens in SS are pretty complicated. Exactly when and how many you should "create" is based on the timestamp and green key security packet, and the number of greens you currently have on the map (previously created greens, death greens, ships picking up greens). No 2 clients ever show the same greens. The system is inherently flawed.
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Thu Jul 22, 2004 6:23 pm Post maybe stupid Post subject: |
 |
|
|
|
Btw, can you edit your first post and fix the broken tag, whatever it is?
|
|
Back to top |
|
 |
-Smong- Guest
Offline
|
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Fri Jul 23, 2004 5:39 am Post maybe stupid Post subject: |
 |
|
|
|
but keep at it...
|
|
Back to top |
|
 |
|