DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Mattias's picture

Unregistered

Feeds

aliases

  • Mattias
  • Data33

Mattias

10 months ago

in Building Browsergames: Creating the bank (PHP) on Building Browsergames
An easy way to fix it is to use PHP's abs() function to force the number to be positive :)
1 reply
MrLollige Thanks mattias, that function is helpful!

10 months ago

in Saving Database Space through Bit-masking on Building Browsergames
Might want to note that in order to take off one of the researches (for some unknown reason) you need to AND with the complement of the bit.
For example, if you had picked the g_shield_research and want to degrade it or something you use:

$newPlayerResearch = $element->research &~$g_shield_research;

10 months ago

in Building Browsergames: Creating the bank (PHP) on Building Browsergames
Hi, I just noticed something about your code. If the user is to enter a negative amount and deposit it, they would get more gold than they had in their hand and get a negative bank value.

Just thought I'd point it out.
Returning? Login