Multivariate Calculus for a Game World

In summary, the conversation discusses the use of math and physics in a fictitious universe, specifically in relation to a character's ability to use telekinesis. The issue at hand is an integral with two changing variables, which the speaker is unable to formulate or solve. They seek help from someone knowledgeable in multivariate calculus. The conversation also mentions the idea of using "spirit energy" to add heat explosively to matter and the need for rules to regulate its use. The formula for calculating spirit energy cost is provided, but the speaker is unsure of the integral and how to solve it.
  • #1
gibberingmouther
120
15
Okay, I never took calculus 3 so I don't know how to write/solve an integral for a power I made up.

I want to flesh out my game world with math because it's cool and I can. Like Chester wrote some of the physics for the Bizarro universe. Applying physics and math to a fictitious universe is both ... bizarre ... and fun!

The issue is this integral has two changing variables.

So the power I'm working on now is telekinesis. As the distance from the TK user increases, the "spirit energy cost" goes up. So spirit energy cost = the limit of the sum of (spirit point constant for the game world) * (n * distance from character's body) * (displacement of the object) * (force applied to accelerate object), where the sum is for the instantaneous values of (distance from character's body) and (displacement of the object). These are the two variables in the integral I can't formulate or solve. n is just a number that, like the "spirit point constant", depends on how I want to set up the game world.

So let's say it takes all of a person's "spirit power" to move a 1500kg car 1 m in 1 second for a distance of 1 m to a distance of 2 m from the person's body.

Then I can write a sum for that. (spirit energy cost) is approximately equal to [(spirit point constant) * (force applied = 3000 N)]*[0*0 + 1.1*.1 + 1.2*.2 + 1.3*.3 + 1.4*.4 + 1.5*.5 + 1.6*.6 + 1.7*.7 + 1.8*.8 + 1.9*.9 + 2*1] = (spirit point constant) * 28050 J*m.

What I don't know is the integral for this or how to solve it, so I'm asking for help from anyone who knows multivariate calculus!

I also want to write the rules for using "spirit energy" to add heat explosively to air or other matter. So that should be fun! I guess I should learn multivariate calculus at some point ... it's not required for my major or possible minor, though, I don't think.

So the idea is that a person has a power rating which determines how much "spirit energy" they can use over a given time interval. In terms of game rules, this just means you can do more or less on your turn depending on the power rating. But I want to write rules for it and it gets tricky. It seems like you need some wiggle room in your rate of spirit energy application unless you have a smallest unit of time you want to use. Which, now that I think of it, is probably how I want to do things.
 
Physics news on Phys.org
  • #2
Maybe if you assign those variables a symbol and write down the things it might be more helpfull to us see the solution or help.
 
  • Like
Likes gibberingmouther
  • #3
gibberingmouther said:
O
The issue is this integral has two changing variables.

So spirit energy cost = the limit of the sum of (spirit point constant for the game world) * (n * distance from character's body) * (displacement of the object) * (force applied to accelerate object), where the sum is for the instantaneous values of (distance from character's body) and (displacement of the object). These are the two variables in the integral I can't formulate or solve. n is just a number that, like the "spirit point constant", depends on how I want to set up the game world.
First move would be to factor the spirit point constant and n out of the integral. They are constants.

So the cost is proportional to current distance times incremental displacement times force applied. At first glance one can take the dot product of incremental displacement and force applied to get work done. So this formula makes at least some level of sense.

But we want to tack on a scaling factor for distance from the source. That seems reasonable -- it takes twice as much spirit power to do work on an object when it is twice as far away.

You have to carefully squint your eyes and look away when it comes to spirit power doing work on an object that is nearby. The work done can be as large as you please and the required spirit cost can be as small as you please as long as the target is very close. It is almost a prescription for perpetual motion.

Then I can write a sum for that. (spirit energy cost) is approximately equal to [(spirit point constant) * (force applied = 3000 N)]*[0*0 + 1.1*.1 + 1.2*.2 + 1.3*.3 + 1.4*.4 + 1.5*.5 + 1.6*.6 + 1.7*.7 + 1.8*.8 + 1.9*.9 + 2*1] = (spirit point constant) * 28050 J*m.
If you want a constant 3000 N force, this should be...

0.1 meter incremental distance times 1.05 meter cost multiplier times 3000 N to get from 1.0 to 1.1 meters
0.1 meter incremental distance times 1.15 meter cost multiplier times 3000 N to get from 1.1 to 1.2 meters
0.1 meter incremental distance times 1.25 meter cost multiplier times 3000 N to get from 1.2 to 1.3 meters
[...]
0.1 meter incremental distance times 1.95 meter cost multipler times 3000 N to get from 1.9 to 2.0 meters

This is the product of incremental displacement times current distance times current force integrated over displacement.

$$S\ n\ \int{|x-x_0| ( F(x) \cdot dx )}$$
Where ##S## is the spirit cost multiplier, ##n## is your other factor, ##x_0## is your spirit user's location, ##x## is the target's position and ##F(x)## is the force applied at position x. You should worry about dimensions. Your spirit cost multiplier will likely have units of spirit cost per Joule-meter.

Taking ##x_0## = 0 and ##F(x)## as a constant 3000N, we are talking about integrating ##3000x## to get ##1500x^2##. Evaluating that from x=1.0 to x=2.0 yields 1500*4 - 1500*1 = 1500*3 = 4500 Joule-meters times S times n. [Barring any errors on my part]

Your spirit force user could have an advantage by pushing very hard at the start, supplying enough kinetic energy at the 1.0 meter displacement to allow the target to coast the rest of the way. That would only cost 3000 Joule-meters times S times n.
 
  • Like
Likes gibberingmouther
  • #4
jbriggs444 said:
You have to carefully squint your eyes and look away when it comes to spirit power doing work on an object that is nearby. The work done can be as large as you please and the required spirit cost can be as small as you please as long as the target is very close. It is almost a prescription for perpetual motion.
Any ideas how I can fix this? I now realize that since your "spirit body" channels the energy from your "divine spark" inside your "spirit nucleus" (about where your solar plexus is), if you're using telekinesis on yourself my current logic would imply you could apply infinite force to make you punch, like, as fast as the speed of light would allow. I don't want any glaring inconsistencies (or "logic discontinuities" is the wording I have used) in my game logic. This level of detail is more for the lore than for actually playing the tabletop version of the game, since the rules are written out in game terms, not math terms for that version of the game.

Why don't you have this problem with Coulomb's law? Is it because the charge is at the center of an electron/proton, so you have a buffer that prevents the value of the radius in Coulomb's law from being too small? I guess I would have to have a similar buffer for my game world's logic?
 
  • #6
jbriggs444 said:
Gravity and electromagnetism are not without their own concerns if one pushes them down to the realm of the infinitely small.

https://www.physicsforums.com/insights/struggles-continuum-part-1/
Cool! Yeah I realized I can just make it so there is a minimum value for the telekinesis. Not sure what the mathematical definitions would look like off the top of my head, but I'll probably sort that out later. Right now I'm still fleshing out the game world and lore.
 

1. What is multivariate calculus and how is it applied in a game world?

Multivariate calculus is a branch of mathematics that deals with functions of multiple variables. In a game world, it is used to analyze and model complex systems and behaviors, such as character movement, physics, and game mechanics. It allows game developers to create more realistic and immersive gaming experiences.

2. What are the key concepts in multivariate calculus that are important for game development?

The key concepts in multivariate calculus that are important for game development include partial derivatives, multiple integrals, vector calculus, and optimization techniques. These concepts are used to analyze and solve problems involving multiple variables and to create realistic and dynamic game environments.

3. How does multivariate calculus help with character movement in a game?

Multivariate calculus is used to model and analyze the trajectory, velocity, and acceleration of a character in a game. By using the principles of calculus, game developers can create smooth and realistic movements for characters, as well as incorporate factors such as collisions, friction, and gravity into the game mechanics.

4. Can multivariate calculus be used to simulate physics in a game world?

Yes, multivariate calculus is essential for simulating physics in a game world. It is used to model and analyze the motion, forces, and interactions of objects in the game environment. By using calculus, game developers can create realistic and accurate physics simulations, which are crucial for creating immersive gaming experiences.

5. Are there any practical applications of multivariate calculus in game development?

Aside from character movement and physics simulations, multivariate calculus has many other practical applications in game development. It is used to optimize game mechanics, design game levels, and create realistic and dynamic environments. Additionally, calculus is also used in artificial intelligence algorithms and machine learning techniques for creating intelligent and adaptive game characters.

Similar threads

  • Science and Math Textbooks
Replies
10
Views
2K
Replies
1
Views
942
  • Science and Math Textbooks
Replies
9
Views
3K
Replies
16
Views
2K
Replies
13
Views
2K
Replies
3
Views
1K
  • Calculus
Replies
3
Views
2K
Back
Top