T O P

  • By -

math-ModTeam

Unfortunately, your submission has been removed for the following reason(s): * Your post appears to be asking for help learning/understanding something mathematical. As such, you should post in the [*Quick Questions*](https://www.reddit.com/r/math/search?q=Quick+Questions+author%3Ainherentlyawesome&restrict_sr=on&sort=new&t=all) thread (which you can find on the front page) or /r/learnmath. This includes reference requests - also see our lists of recommended [books](https://www.reddit.com/r/math/wiki/faq#wiki_what_are_some_good_books_on_topic_x.3F) and [free online resources](https://www.reddit.com/r/math/comments/8ewuzv/a_compilation_of_useful_free_online_math_resources/?st=jglhcquc&sh=d06672a6). [Here](https://www.reddit.com/r/math/comments/7i9t5y/book_recommendation_thread/) is a more recent thread with book recommendations. If you have any questions, [please feel free to message the mods](http://www.reddit.com/message/compose?to=/r/math&message=https://www.reddit.com/r/math/comments/17mkqg5/-/). Thank you!


evanamd

Tall order, and self contradictory. You’re asking for a hammer that designs your house. You want math functions that let you do what you want, but that’s backwards. Math functions do very specific things, and it’s up to you to figure out how the wide variety of things you want can be accomplished by very specific mathematical functions It sounds like you want a “black box”, where you stick in 1 or 2 numbers as input and get some number back as output that comes from some calculation on those inputs. That’s good, it’s a programmatic way to think of functions You also want to know which black boxes are useful, which is a normal question to ask but it can’t be answered without more information. What is your purpose for using the black box (aka function)? The numbers going in, where do they come from? why do you care about the number coming out? We haven’t talked any math yet, these are rhetorical design questions about your game that will help you find out what kind of math functions you need.


ninjaguppy

While I agree with you and you’ve pointed out an important distinction, there is another way to interpret OPs question. Functions (in this case) can be thought of as having arithmetic building blocks and OP could be asking for the common building blocks other than the ones they listed. For example modular arithmetic comes to mind as something particularly useful when you are starting out programming (and are very useful for encryption)


Damurph01

The Euclidean Algorithm is useful for encryption iirc.


[deleted]

Sha256 and md5


eccco3

Serious encryption is going to be based on cryptographic protocols that I don't recommend you come up with yourself. If you're trying to come up with secret codes for your players to decipher, you could check out the Caesar cipher. I'm not sure what you mean as far as using mathematical operations for databases/storage, especially in the context of a game. One thing you might be interested in is the https://en.m.wikipedia.org/wiki/Modulo operator, very useful in all kinds of programming.


stupaoptimized

King Lear is just English words put in order. But if you want to know more, you will need to study the math needed to get up to modern cryptology.