Check out our blog!
Forumwarz is the first "Massively Single-Player" online RPG completely built around Internet culture.

You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.

You need to be logged in to post and to see the uncensored versions of these forums.

Log in or Learn about Forumwarz

Civil Discussion
Switch to Role-Playing Civil Discussion

Viewing a Post

volatus

Avatar: 80403 Sat Nov 01 01:34:28 -0400 2008
2

Level 25 Hacker

Quit stalking Oda and squawking like a pink monkey bird.

(edit: Expanding on the above inspiration…Log in to see images!

Where “a”, “b”, “c”... represents an 8-bit integer (i.e. 0, 1, 2… 253, 254, 255), let the forum pwnage streak be represented by, for example, afuebwks.

Streak length is determined by the dividing strlen (string length) by 4, since it’s counted in increments of 4. This prevents duplicate awards by only awarding the matching award that will be hit right on the integer when it’s obtained. No need to round or perform calculations. In the above example this will be 2.0, or the second streak increment.

Duplicate detection is determined by searching the streak string for the current forum. So, if I continue the above example, we may have just pwned “e” again. afuebwkse. The search would find that “e” was already pwned, and would chop off from the beginning of the string to, and including, the first (and only at that point) occurrence of “e”, and leave us with bwkse. At this point I don’t know how the administration wishes to handle a decremented pwnage streak – one that was chopped down due to a duplication. If you would like to award the new streak, you could divide strlen by 4 and use the integer result. Or if you prefer not to reward the current streak (unless it matched perfectly with a new increment), you could just break out of the computations and continue.

That should chop the size of your database considerably. Log in to see images!

(edit: This would end up only occupying one table row in the users table for the entire streak calculation algorithm, and would simplify – and error-proof- streak calculation considerably. Log in to see images! )

(edit edit: Also, keep in mind that abcdefg… are just representations of the binary integers that can’t be represented on-screen. This allows for one of up to 255 unique forums to be represented, per byte – now that’s information density at its finest. The information doesn’t need to be presented on screen, so it’s safe to use in a binary table field. Just use string length and string position functions, and call MySQL’s library function mysql_real_escape_string when adding data to the database, to ensure it doesn’t get corrupted.)

volatus edited this message on 11/17/2008 4:32AM
Internet Delay Chat
Have fun playing!
To chat with other players, you must Join Forumwarz or Log In now!