Terraria clone. What do I need to learn

Started by
10 comments, last by frob 8 years, 7 months ago

Tangletail: I understand that parts of these fields play a role in randomly generating a world, but my point was that saying something like "you have to study advanced mathematics. Study trig, algebra, calculus, discrete mathematics..." isn't helpful. For example, discrete mathematics covers everything from set theory, to number theory, to information theory, to game theory—which are all huge fields in and of themselves, and wildly different. Some of the most prominent theoretical mathematicians study "discrete mathematics," while some of the earliest high-school classes teach it.

As much as I love and encourage learning of mathematics, I'd be sorry to see someone who just wants to randomly generate a world undertake such an enormous endeavor of study, thinking it will teach them how to do so. On the other hand, your most recent book suggestions are much better; they're specific to game design.

Might I suggest a process to OP, which I find pretty helpful: Start with (very) small things and work your way up. You know you want to randomly generate [complex] worlds. Start with simple, 2D cave generation (read the link that SimonForsman posted above) and slowly work your way up from there.

Advertisement

First off, this is For Beginners. So the posting guidelines about keeping it on topic and answering the specific question asked still apply.

To be fair, my list is basically the same as Tangletail's.

I've got not idea what the original poster knows, so I tend to assume minimal existing knowledge

That unknown person wants to make a very small version of Terraria, an action-adventure 2D side scroller.

The question is what math topics they should know. As a 2D side scroller, you need:

* Solid algebra skills, as needed for nearly all programming. If you can't manipulate variables, you've no business programming.

* Solid trigonometry and geometry skills, as you are manipulating objects in 2D these are the math realms of 2D motion.

* Statistics, since games rely heavily on probabilities. You may be able to eke through without formal stats, but you are better with more.

* Discrete mathematics does not require mastery of all sub-fields, it is used in many branches of study. Both the ACM and MAA recommend discrete mathematics as a mandatory course for computer science majors, to be taken during first or second years of study. Nearly all computer processing deals with discrete mathematics, manipulating individual items and discrete numbers, tables, and sets rather than manipulating continuous math functions.

* Additional computer theory topics are useful, such as state machines (often covered as part of discrete mathematics), data set manipulation to determine what stays in memory and to know what goes to disk (again, often covered in discrete mathematics), and some game theory when tuning your game (discrete mathematics..., so, there's that.) Many types of procedural generation rely on these as well.

* Economics, at least some basics of it, for balancing your game and building in-game economies.

Nice to know but not essential:

* Linear algebra is essential for 3D games, since it is the mathematics of 3D manipulation, but since this is a 2D game it isn't really necessary.

* Basic physics will be useful even if you don't use real-world physics in your game. You can survive without it, but the knowledge will help.

* Calculus is often useful but many game programmers don't use it when they should; you can use iterative methods to solve problems when a little bit of calculus on paper during implementation would reduce the computational work significantly. Nice but not essential.

* Fractal math isn't really necessary for most procedural generation, but it is useful for others. Understanding self-similar systems can help, but isn't essential. (... Also, fractals are often mentioned in discrete mathematics courses as fractal art is a practical application of the math ...)

Not math directly, but you need to know the basics of how to program for your system. You'll need to know how to get data to and from files, how to get data on screen, and how to interact with the human at the machine.

You'll also need art and audio to make a good game, those weren't asked about. Assuming you want to do something with the game after it is finished, business skills and marketing will also both be necessary.

This topic is closed to new replies.

Advertisement