Math Blog
This week in game design, I had to rely heavily on Boolean algebra and have a deep understanding of Boolean algebra to refactor code that allows the player to attack with their main-hand weapon from 4400 characters of code, down to 2200 while still keeping full functionality. The code snippet below shows two boolean statements used within the new code, along with comments explaining what each part does.

Along with boolean algebra, I needed to have a deep understanding of probability and random numbers to add code that determines when a bleed effect is added to an enemy with a random chance, along with the damage and duration that the bleed effect will last.
Leave a comment