Man! Must've been really tricky having procedurally created math problems with the correct answers.. I love the visuals, the story, and the overall aesthetic of this game.. I only got trivial integrals to solve.. Was there an entire polynomial integral solver in the code, and I just got lucky with my questions? Great work James!
Viewing post in Math Module jam comments
Thanks for the feedback, and I'm glad you liked the game! Believe it or not, there was a full polynomial integral solver equation in the code, although there is a chance you'll get lucky and just deal with x^0 or x=0 to x=0. I tried to simplify it to an equation so it could easily scale with increasingly complex arguments. In code, it's actually written as
correctAnswer = str( int(floor( argumentOne * (pow(argumentThree, argumentTwo + 1) / (argumentTwo + 1.0) + argumentFour * argumentThree ) )))
Where argument one is the variable coefficient (ex. 4x), argument two is the exponent (ex. x^3), argument three is where the integral ends (as in x=0 to x=argumentThree) and argument four is the constant in the end-game (ex. integral of x + 4).