# Thread: Videogame math (ratios, algebra)

1. ## Videogame math (ratios, algebra)

Hey guys,

I think this problem belongs to advance algebra. I know it involves some sort of ratios. I'm trying to figure out the equation or formula to this.

Let's say that one army attacks another army in a video game. Like, one country invading another country. Player 1 attacks with certain offense points. And player 2 defends with certain defense points.

Here is the information I have:
If player 1 attacks with 15,000 offense points, and player 2 defends with 20,000 defense points, the outcome of this battle is such that player 1 will fail the attack because player 1 will lose 55% of army (that were doing the attacking) and player 2 will lose 45% of army (that were defending)

How do I come up with an equation that lets me enter the offense points from player 1 and the defense points from player 2, and then that equation lets me solve how much troops player 1 loses and player 2 loses?

Thanks. I've been spending days on this problem. I can't solve it!

2. ## Re: Videogame math (ratios, algebra)

Giving a single battle's statistics is not enough to figure out an entire system.

3. ## Re: Videogame math (ratios, algebra)

Hi SlipEternal, What if I were to have two battle statistics? How would this be set up? Is it a system of linear equations? Thanks!

4. ## Re: Videogame math (ratios, algebra)

Given any finite number of data points there exist an infinite number of formulas that will give those points. If you assume the formula is linear then two data points suffice.

5. ## Re: Videogame math (ratios, algebra)

Yes I do assume this is linear. But it seems to involve ratios. My mind can only go so far