Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
bleh

 
Post new topic   Reply to topic Printable version
 View previous topic  New SSZ zone, Tank Warefare! Post :: Post SSP Tactix  View next topic  
Author Message
-Smong-
Guest


Offline

PostPosted: Thu Jul 22, 2004 3:30 pm   Post maybe stupid    Post subject: bleh Reply to topic Reply with quote


That was done using
Code: Show/Hide
if (now - nextGreenTick > 0)
(what Mr.Ekted said to use in another post).

Going back to my usual way fixed it:
Quote:
if (nextGreenTick < now)
Probably something to do with signed/unsigned.



binarypr9-oops.png - 20.89 KB
File downloaded or viewed 10 time(s)
Back to top
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Thu Jul 22, 2004 4:08 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Thu Jul 22, 2004 4:55 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Smong is making a client :/ ?
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Thu Jul 22, 2004 5:01 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

The comparison (nextGreenTick < now) will fail over a wrap.
Back to top
View users profile Send private message Add User to Ignore List
Confess
Zone Hoster


Joined: Feb 10 2004
Posts: 532
Offline

PostPosted: Thu Jul 22, 2004 5:09 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

wtfs up with the text? its all the way on the right side
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
-Smong-
Guest


Offline

PostPosted: Thu Jul 22, 2004 5:30 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

I think I may have muffed up one of the [ code ] tags icon_redface.gif
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:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Thu Jul 22, 2004 6:21 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Thu Jul 22, 2004 6:23 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Btw, can you edit your first post and fix the broken tag, whatever it is?
Back to top
View users profile Send private message Add User to Ignore List
-Smong-
Guest


Offline

PostPosted: Fri Jul 23, 2004 5:06 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

I think I get it, something like:
Code: Show/Hide
if (now - lastGreenTick > prizedelay)
{
    ...
    lastGreenTick = now;
}
Where all variables are unsigned.

I can't edit a post if I'm not logged in (someone's fixed it now anyway).

@Cypher
If you look here http://forums.minegoboom.com/viewtopic.php?t=2484 You can see I haven't done much since I started (about 5 months and I only just added greening, incorrectly too).
Back to top
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Fri Jul 23, 2004 5:39 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

icon_smile.gif but keep at it...
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 31 page(s) served in previous 5 minutes.

phpBB Created this page in 0.646620 seconds : 36 queries executed (84.3%): GZIP compression disabled