Help an Independent Game Developer Solve a Problem!

In summary: This inconsistency is due to the fact that the velocity is not constant. When you plot velocity against distance, it looks like the graph is decreasing, but when you plot distance against velocity, it looks like the graph is increasing.So, the inconsistency is due to the fact that the velocity is not constant.
  • #1
jcsopko
2
0
Hi, I'm an independent game developer (currently in college) and have been trying to solve a problem and get an equation for use within my physics engine.

Homework Statement


Here's the problem/situation illustrated through two graphs and a diagram: http://i.imgur.com/qHAsU.jpg


Homework Equations


unknown


The Attempt at a Solution


Through the help of others in other forums I think we've solved the problem with force as it increases linearly with the following equation:

t_2 = Log[(B + A d_2 + Sqrt[A d_2 (2 B + A d)])/B]))/Sqrt[A]

It appears to give a reasonable answer although I have no way of double-checking it until it's implemented in the physics engine, however it does not work for decreasing linear force (you typically will get a negative within the squareroot).

If you guys could help me out I'd be forever grateful.

Thanks for your time and consideration!
 
Physics news on Phys.org
  • #2


Hello!
First of all, your 2 graphs are inconsistent. If force is linearly decreasing by time, it is not linearly decreasing by distance, because velocity is not constant.

Let's suppose that 1st graph is the one defining your problem. Your force is like

[tex]F=4-\frac{3}{x}t .[/tex]

Where x is the unknown time you are searching for. Acceleration is force divided by mass, let's suppose for simplicity that mass is equal to 1. Since we have dependence of acceleration (which is time derivation of velocity) on time, we can directly integrate it to obtain velocity:

[tex]v=v_0 + 4\cdot t -\frac{3}{2x}t^2[/tex]

Now let's suppose (for simplicity) that initiall velocity ( v(0)=v_0) is zero. We can integrate again to obtain distance traveled by time t:

[tex] s =2t^2 - \frac{t^3}{2x}[/tex]

Now just put t=x and s = 20 and solve the equation.
 
  • #3


Hi FroChro!

First off, thanks for taking the time to help me out. I read your post and did as instructed and obtained ~3.65 seconds for the time, which sounds reasonable. I have a couple questions though.

1. Looking at your first equation for force I'm unable to figure out how you got it. What equations did you use to arrive at it?

2. You said the two graphs are inconsistent, but I do not understand your logic for that conclusion. You said it's because velocity is not constant, however force linearly decreasing with distance does not imply constant velocity; by my understanding it implies linearly decreasing acceleration which implies the opposite (an increasing velocity at a progressively lower acceleration over time and distance). Keep in mind it is always moving to the right, the force never goes negative because the all force ceases as soon as the distance of 20 meters is reached (and there at 20 meters the force is equal to 1N), the only thing I need is to find the time it takes to reach the 20 meters. I apologize if the confusion was due to my inability to illustrate what was occurring, I hope this short rant clears it up. If not feel free to ask any questions so I can try to understand what you're saying, I haven't taken physics since high school and it was a bit of a joke class. Also I can explain the in-game application of this problem as it may help you better understand.

Again, thanks for the help, I've been working on this for two weeks now and I'm still struggling.
 
Last edited:
  • #4


jcsopko said:
1. Looking at your first equation for force I'm unable to figure out how you got it. What equations did you use to arrive at it?
Your force is linearly decreasing with time. Linear function means that if you change independent variable x by adding a number c to it [x->x+c], value of function/dependent variable y will change in following fashion: y-> y + a*c, where a is constant independent of number c. This actually means that if you know a value of linear function in one point x_0, and you know value of constant a, you have complete information about that linear function. (Because y(x)=y(x_0) + a*(x - x_0).) You can simplify last equation and get an expression y(x)=a*x+b, where b is y(x_0)-a*x_0 . Therefore you can see that linear function is determined by values of 2 constants a,b. This is also in agreement with the fact that a graph of linear function is a "straight line" (because everything I wrote so far is true also if you change the word "linear function" for a word "(graph) of straight line"). Straight lines can be altered in two ways: changing their slope or shifting them.

So we need to determine constants a and b. (This time y=a*t+b, we have symbol x reserved for one constant, but yet undetermined value of time.)We know that F(0)=4 and F(x)=1. It's quite straightforward to do so. 1st equation tells us b=4 and second one, after substituing value of b, a= -3/x.
jcsopko said:
2. You said the two graphs are inconsistent, but I do not understand your logic for that conclusion.
Let's say you have some observable quantity "o" that is linearly dependent on time. For simplicity let's b=0, a=1, so we have o(t)=t. If you are moving with constant velocity, "o" is also linearly dependent on distance passed, o=t=(s/v) . But changing velocity v, you are changing constant "a", therefore altering slope of function o(s), which is no longer linear. Having o=t, this can be also seen quite intuitively, if you are changing speed, you are changing also the dependence of time passed on distance passed. So, to summarize, you can't have linear dependence on both time and distance unless the dependence between time and distance is also linear - unless you have a constant velocity.

Also, most of what I wrote should be familiar to you if you know mathematics on the level let's say that of calculus. In general, if you know a dependence of acceleration on time, you need to know how to integrate it to obtain functions v(t) and s(t); therefore, knowledge of calculus is quite needed here. To solve more general problems of kinematics, you will need some knowledge of differential equations.

I hope this hepled.
FroChro
 
  • #5


Hello there! As a fellow scientist, I completely understand the importance of finding a precise and accurate equation for your physics engine. It's great that you have already reached out to others for help and have come up with a working equation for increasing linear force. However, as you mentioned, it does not work for decreasing linear force.

One suggestion would be to try using a different equation that takes into account both increasing and decreasing force. There are many equations that can be used for this purpose, such as the inverse-square law, which states that the force between two objects is inversely proportional to the square of the distance between them. Another option could be using the power law, which states that the force is proportional to the product of the masses and inversely proportional to the square of the distance between them.

In order to find the most suitable equation for your specific situation, it may be helpful to consult with a physics expert or conduct some experiments to gather data on the force and distance relationships. This will give you a better understanding of the underlying physics principles at play and help you choose the most accurate equation for your physics engine.

I hope this helps and wish you the best of luck in finding a solution to your problem! Keep up the great work as an independent game developer. Your dedication and persistence are truly admirable.
 

1. How can I support an independent game developer?

There are several ways to support an independent game developer. You can purchase their games, leave a positive review, share their games on social media, and participate in crowdfunding campaigns. These actions help generate revenue and increase visibility for the developer.

2. What challenges do independent game developers face?

Independent game developers face a variety of challenges such as limited resources, lack of funding, and competition from larger game companies. They also have to handle all aspects of game development, from coding to marketing, on their own.

3. How can I help an independent game developer solve technical problems?

If you have technical expertise, you can offer to help an independent game developer solve their technical problems. This could include providing advice, troubleshooting, or even collaborating on the development process. You can also refer them to online forums and communities where they can get support from other developers.

4. Is it important to support independent game developers?

Yes, it is important to support independent game developers. They bring unique and innovative ideas to the gaming industry and provide diversity in game options. Supporting independent developers also helps to promote a more competitive and fair marketplace.

5. How can I show my appreciation for an independent game developer's work?

There are many ways to show your appreciation for an independent game developer's work. You can leave a positive review, share their games on social media, and recommend their games to friends and family. You can also consider supporting them on crowdfunding platforms or purchasing merchandise from their online store.

Similar threads

Replies
1
Views
38
Replies
2
Views
861
  • Advanced Physics Homework Help
Replies
2
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
4K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
2K
  • Advanced Physics Homework Help
Replies
4
Views
2K
  • Advanced Physics Homework Help
Replies
3
Views
1K
  • STEM Academic Advising
Replies
24
Views
2K
  • Advanced Physics Homework Help
Replies
4
Views
3K
Back
Top