REGISTER HERE TO JOIN IN! - It's easy and it's free!
 Home » Misc » Computer / Video Games Discussion » Game Math.

Game Math.

 Forum Jump: Please select one: -------------------- Private Messages User Control Panel Who's Online Search Forums Forums Home -------------------- Welcome-- Welcome Community-- General Discussion Forum---- Philosophy Forum---- Religion Forum-- The Off-Topic Forum Movies-- Movie Discussion---- Movie Versus Forum---- Movie Character Respect Forum-- Movie Stars & Celebrities-- Movie Trivia-- DVD Talk Movie Genres-- Sci-Fi / Fantasy-- Animations / CGI-- Anime / Manga---- Anime 'Versus' Forum-- Foreign Cinema-- Horror Movies Movie Franchises-- Lord of the Rings-- Harry Potter---- Appreciation and Anti Threads-- Pirates of the Caribbean-- James Bond Series-- Indiana Jones-- Transformers-- Star Trek-- More Movie Forums---- The Matrix Movies---- The Terminator Movies Comic Book Forums-- X-Men-- Spider-Man-- Batman-- Superman-- Comic Book 'Versus' Forum---- Battlezone-- Comic Book 'Respect' Forum-- Comic Book Movies---- Comic Books Star Wars-- Star Wars: TV Series-- Star Wars: Episode I, II & III-- Star Wars: Episode IV, V & VI-- Star Wars: Literature & Expanded Universe---- Star Wars Versus Forum Misc-- TV Talk Forum---- Smallville Forum---- Heroes-- Music Discussion-- Computer / Video Games Discussion---- Games 'Versus' Forum------ Games 'Respect' Forum-- Sports Forum-- Book Discussion Forum-- Artwork Forum---- Poetry Corner-- Signature Forum---- Signature Duel Forum-- General Fiction Area---- Multi-Author Fiction Area---- Harry Potter Fiction-- Conspiracy Forum Role Playing-- Role Playing Forum-- Unhosted Role Plays-- Star Wars: Role Playing Communications-- News & Questions---- Computer Help Forum

Pages (7): [1] 2 3 » ... Last »   Last Thread   Next Thread
Author
Senior Member

Gender: Male
Location: Bacta Tank.

Game Math.

Question: in a game where you purchase items and the value of the item increments by a certain value every time you purchase it, what is the explicit formula for determining this?

For example:

Items starts at $10. You want to buy 10 of them. It increments by$5 every time you purchase one.

What is the total amount of money that you will need to purchase 10 at once?

$10*5 + ((10 *$5) * 5) + 5 *5 = $325 Is that the right formula? Let's check: 10+15+20+25+30+35+40+45+50+55 = 325 It might be. Sum up the formula: (Iv * t/2) + (t * i) * i) + (t/2 * i) = Fv Iv = initial value t = times the item purchased (we wanted 10, in the xample) i = the amount the item increments with each purchase Fv = final value after the purchase is complete I know this is a lot of math but this keeps on bothering me and a recursive formula is far too easy to make but difficult to just randomly employ. I need an explicit one so I don't have to keep track of previous values. I don't think the above is correct. Replace with other items to test: Iv = 20 i = 10 t = 15 Fv = (20 * 15/2) + (15 * 10) * 10) + (15/2 * 10) Fv = 1725 Check: 20 + 35 + 50 + 65 + 80 + 95 + 110 + 125 + 140 + 155 + 170 + 185 + 200 + 215 + 230 = 1875 Nope. So I screwed up somewhere. ((n(n-1))/2) + Iv calculates the final value of the 10th item (in the first example). n = number of items (9*10)/2+10 = 55 We know it will cost$55 for the final item.

So I believe I'm onto something there.

Surely there's a much quicker way to go about calculating this.

Edit - Gauss did a calculation similar to the thing I'm looking for when he was in elementry school. 100+1, 99+2, etc. 101*50 = 5050 which is all the number 1-100 added up.

Maybe I could approach it from that angle. I'll try it.

Edit 2 - That works but it requires I figure out the final item's purchase value before I can make the calculation using Gauss's method. There's got to be an explicit formula for the whole thing.

__________________

Last edited by dadudemon on Jun 30th, 2011 at 12:31 AM

Jun 30th, 2011 12:17 AM
Tzeentch
#gottem

Gender: Male
Location: Morgan's Maxim

No. tbh I only made it halway through your post though. Could you summarize it?

__________________

"The Daemon lied with every breath. It could not help itself but to deceive and dismay, to riddle and ruin. The more we conversed, the closer I drew to one singularly ineluctable fact: I would gain no wisdom here."

Last edited by Tzeentch on Jun 30th, 2011 at 12:21 AM

Jun 30th, 2011 12:19 AM
Senior Member

Gender: Male
Location: Bacta Tank.

quote: (post)
Originally posted by RE: Blaxican
No. tbh I only made it halway through your post though. Could you summarize it?

I can't. You can read the first portion and read the conclusions but the stuff in between is an example of what I'm talking about which makes it kind of important to understand the rest.

Many games have incremental purchase prices for their items. It prevents people from buying too much of one item as they get more money in the game.

Sometimes, the increment is a factor, not an exact value. (Iv * 1.2 versus Iv + n*x, for example.)

But, I figured it out using Gauss's method. It's still not complete as you have to figure out one set before you can use it in the second set. That's clunky and not elegant. I want a complete, single, formula for figuring this out. I could also re-work it to use factors and not an exact value. You know what I mean?

__________________

Jun 30th, 2011 12:35 AM
Nephthys
The Gr8est!!!!!!!!

Gender: Male
Location: The End

What the fvck kind of games do you play?

__________________

Jun 30th, 2011 12:38 AM
Digi

Gender: Unspecified
Location:

I thought maybe this was about game theorycrafting, which can be fun.

__________________

Jun 30th, 2011 01:11 AM
ares834
Senior Member

Gender: Male
Location: United States

To add up all the numbers from 1 to 100 one can use the equation (n(n+1))/2. Thus we can use this however, since the first number equals 0 we actually want ((n-1)(n-1+1))/2 or (n(n-1))/2.

Here is what I came up with (Iv *t) + (t(t-1))/2*i = FV

quote: (post)
Iv = 20
i = 10
t = 15

20 + 35 + 50 + 65 + 80 + 95 + 110 + 125 + 140 + 155 + 170 + 185 + 200 + 215 + 230 = 1875

Hmmm this is incorrect. You appear to be adding 15 everytime rather than 10.

Really it should be 20+30+40....= 1350

Jun 30th, 2011 02:15 AM
Senior Member

Gender: Male
Location: Bacta Tank.

quote: (post)
Originally posted by Nephthys
What the fvck kind of games do you play?

It's mostly RPG games that do stuff like this.

They keep incrementing the value of items so you don't stack up too much on one particularly good item or don't become too powerful early on.

And example of incrementing purchases: the Gemcraft series. It increments quite a bit by factors creating almost a "soft cap" for many of the upgrades.

quote: (post)
Originally posted by Digi
I thought maybe this was about game theorycrafting, which can be fun.

It can be. This is all about game math, questions about it, or ideas. The first portion is just one of many things we can talk about.

quote: (post)
Originally posted by ares834
To add up all the numbers from 1 to 100 one can use the equation (n(n+1))/2. Thus we can use this however, since the first number equals 0 we actually want ((n-1)(n-1+1))/2 or (n(n-1))/2.

Here is what I came up with (Iv *t) + (t(t-1))/2*i = FV

I'll test this in just a second.

quote: (post)
Originally posted by ares834
Hmmm this is incorrect. You appear to be adding 15 everytime rather than 10.

Really it should be 20+30+40....= 1350

You're right. I incremented by 15, 15 times. In that example, you can just change the "i" to a 15 rather than changing the whole set.

Edit - YUP! It works. That's what I was looking for. Exactly what I was looking for. Ares...you are now my new favorite poster.

(Iv *t) + (t(t-1))/2*i = Fv

This can be altered to use a factor instead of an increment. I'll rework this to do increments, in a while. Feel free to take these equations and put them into your own RPG game code.

__________________

Last edited by dadudemon on Jun 30th, 2011 at 03:16 AM

Jun 30th, 2011 03:10 AM
Digi

Gender: Unspecified
Location:

quote: (post)
It can be. This is all about game math, questions about it, or ideas. The first portion is just one of many things we can talk about.

Cool. I do a fair amount of WoW theorycrafting, it's a good time. It's kind of leaked into my other gaming habits, and I think in terms of optimization. Most of it is paper napkin math, but I've worked out a few formulas and do a lot of in-game testing.

It's sometimes hard to model an ideal attack strategy (whether it's a sequence of attacks/spells/whatever, a specific combination of forces, formations, etc.), regardless of the game (shooter, strategy, RPG), and the best games leave too many variables to nail down a "best" because a lot of the strategy is context specific. But it's usually easy to identify a clear winner between two possibilities. Such binary comparisons, if done on a near-constant basis, can over time hone your approach into a few really, really good options. That's generally how I approach games, since I enjoy taking them seriously and getting a lot out of my characters, units, armies, etc. The actual formulas behind the mechanics are rarely transparent though, so it's an inexact art most times.

__________________

Last edited by Digi on Jun 30th, 2011 at 04:23 AM

Jun 30th, 2011 03:53 AM
Senior Member

Gender: Male
Location: Bacta Tank.

quote: (post)
Originally posted by Digi

Cool. I do a fair amount of WoW theorycrafting, it's a good time. It's kind of leaked into my other gaming habits, and I think in terms of optimization. Most of it is paper napkin math, but I've worked out a few formulas and do a lot of in-game testing.

It's sometimes hard to model an ideal attack strategy (whether it's a sequence of attacks/spells/whatever, a specific combination of forces, formations, etc.), regardless of the game (shooter, strategy, RPG), and the best games leave too many variables to nail down a "best" because a lot of the strategy is context specific. But it's usually easy to identify a clear winner between two possibilities. Such binary comparisons, if done on a near-constant basis, can over time hone your approach into a few really, really good options. That's generally how I approach games, since I enjoy taking them seriously and getting a lot out of my characters, units, armies, etc. The actual formulas behind the mechanics are rarely transparent though, so it's an inexact art most times.

Those players that can stop and think about the math involed in the game will always have an advantage over their competitors.

I used to be part of a large alliance of players in an RTS game. Whenever they would release the new unit stats for each patch they released, I'd calculate all of the numbers that maximized upkeep costs to defense and attack ratios. This maximized our forces per unit gold spent and we were literally the number one alliance on the server due in part to our unit efficiency.

Some people get pissed and say you shouldn't bring "schoolwork" to play. I love those types because they provide some hilarious victories. Spending an hour to workout the best possible strategy with some math is really cool when it gives you an advantage. Then they get mad and say you're cheating.

__________________

Jun 30th, 2011 07:53 AM
Morridini
Morridini

Gender: Male
Location: Norway

quote: (post)
This can be altered to use a factor instead of an increment.

If the price is changed by a factor f after each purchase instead of an increment, then I believe the following formula will work;

Fv = Iv*(1-f^t)/(1-f)

or since I hate to write math like that, let me use TeX syntax;

F_v = I_v \frac{1-f^t}{1-f}

__________________
GoldenEye for XBLA!!

Thanks to Raoul for the sig!

Last edited by Morridini on Jun 30th, 2011 at 09:14 AM

Jun 30th, 2011 09:10 AM
S_D_J
Bane

Gender: Male
Location: Coming to Gotham

I prefer Randy Marsh's TMI equation:

__________________

"When﻿ Gotham is ashes, you have my permission to die." -BANE

Jun 30th, 2011 03:25 PM
Morridini
Morridini

Gender: Male
Location: Norway

EDIT: nvm (why can't I delete my own post?)

__________________
GoldenEye for XBLA!!

Thanks to Raoul for the sig!

Jun 30th, 2011 04:54 PM
Digi

Gender: Unspecified
Location:

quote: (post)
Those players that can stop and think about the math involed in the game will always have an advantage over their competitors.

I used to be part of a large alliance of players in an RTS game. Whenever they would release the new unit stats for each patch they released, I'd calculate all of the numbers that maximized upkeep costs to defense and attack ratios. This maximized our forces per unit gold spent and we were literally the number one alliance on the server due in part to our unit efficiency.

Some people get pissed and say you shouldn't bring "schoolwork" to play. I love those types because they provide some hilarious victories. Spending an hour to workout the best possible strategy with some math is really cool when it gives you an advantage. Then they get mad and say you're cheating.

That's awesome.

__________________

Jul 1st, 2011 12:46 AM
Tzeentch
#gottem

Gender: Male
Location: Morgan's Maxim

No it's not, it's nerdy. You guys are nerds.

__________________

"The Daemon lied with every breath. It could not help itself but to deceive and dismay, to riddle and ruin. The more we conversed, the closer I drew to one singularly ineluctable fact: I would gain no wisdom here."

Jul 1st, 2011 12:58 AM
Digi

Gender: Unspecified
Location:

quote: (post)
Originally posted by RE: Blaxican
No it's not, it's nerdy. You guys are nerds.

Yes. Yes we are. I just wrote a trinket comparison for the newly-dropped 4.2 patch for WoW, that got posted to a popular class-specific website as a guide.

I am a nerd.

__________________

Jul 1st, 2011 01:09 AM
Senior Member

Gender: Male
Location: Bacta Tank.

quote: (post)
Originally posted by Digi
Yes. Yes we are. I just wrote a trinket comparison for the newly-dropped 4.2 patch for WoW, that got posted to a popular class-specific website as a guide.

I am a nerd.

No-no...THAT'S awesome. That big-time for WoW players.

quote: (post)
Originally posted by Morridini
If the price is changed by a factor f after each purchase instead of an increment, then I believe the following formula will work;

Fv = Iv*(1-f^t)/(1-f)

or since I hate to write math like that, let me use TeX syntax;

F_v = I_v \frac{1-f^t}{1-f}

That's awesome. I may test that out.

There are games, like Gemcraft, that use factors with each "purchase" so the factor version will be useful.

quote: (post)
Originally posted by RE: Blaxican
No it's not, it's nerdy. You guys are nerds.

And you're the type of person that is fun to pwn...cause you get all ragey on the mic and accuse us of cheating. Meow.

__________________

Jul 1st, 2011 03:12 AM
Digi

Gender: Unspecified
Location:

Heh. Well, it IS geeky, so there's only so much I can take pride in it. But I enjoy it. I have a semi-regular spot on a heavily-trafficked hunter website. The guy who runs it updates every weekday (so 5 articles/posts a week). I pop in occasionally with articles, and also take over for brief stretches of time when he goes on vacation and such.

__________________

Jul 1st, 2011 03:22 AM
Senior Member

Gender: Male
Location: Bacta Tank.

quote: (post)
Originally posted by Digi
Heh. Well, it IS geeky, so there's only so much I can take pride in it. But I enjoy it. I have a semi-regular spot on a heavily-trafficked hunter website. The guy who runs it updates every weekday (so 5 articles/posts a week). I pop in occasionally with articles, and also take over for brief stretches of time when he goes on vacation and such.

Off-topic...but how do you have time for WoW gaming, WoW geeking, teaching (I assume you're still a teacher?), working out, KMC posting and modding, AND a dating life? Do you not sleep much? [Back on topic...]The math just doesn't add up.

__________________

Jul 1st, 2011 04:06 AM
Digi

Gender: Unspecified
Location:

quote: (post)
Off-topic...but how do you have time for WoW gaming, WoW geeking, teaching (I assume you're still a teacher?), working out, KMC posting and modding, AND a dating life? Do you not sleep much? [Back on topic...]The math just doesn't add up.

Heh. My degree is in teaching, I actually work as the director of communications for an organization. Writing, editing, marketing, pr, etc. Not unrelated to my English background, but not teaching. Just as busy day-to-day, but I don't take much work home, which is nice.

I don't work out. I'm naturally sexy .

I make it a rule never to allow WoW to override my social life or work though. I keep my priorities aligned. It's surprising what you can do with not much play-time though. I just don't do anything frivolous. I don't grind useless things like achievements or mounts, anything I do has a tangible benefit to my play (which is primarily raiding, I don't PvP...though I do other things like extreme soloing and hunter-tanking, which are basically the same skills as raiding). As long as you've done your homework, and play with a specific focus, you don't need to sink epic amount of time in. So I raid 2 nights a week for 3 hours each night (weekdays, so usually nothing else going on). Then I'll put in time on weekends when I have spare time, so my overall playtime varies.

But I don't f--- around with alts (literally 2 toons ever with more than an hour of gameplay, and the other is mostly there to support the main with professions), and I enjoy the game when I'm getting the most out of my class and my performance, and that shows when I play.

But as a result, it takes me a long time to work through other games, or books I'm reading, stuff like that.

I'm also deceptive with KMC. I pop into my forums that I mod or frequent, post maybe 5 posts a day, check the reports, ban a sock or two, and am out in 10-15 minutes. I never spend long on here. If I'm ever "online" for longer than that, which is often, I probably just left my browser up and went to wank do something else.

__________________

Last edited by Digi on Jul 2nd, 2011 at 12:57 AM

Jul 2nd, 2011 12:34 AM
Burning thought
Restricted

Gender: Male
Location: The end of eternity

Account Restricted

Ok, I have a calculation here but the formula is under scrutiny. I am calculating force used in someone flipping 300 tons, roughply 4 meters in 1 second;

quote:
mass= 272235.422

Speed= 4 meters over 1 seconds

velocity= 4 divided by 1= 4

Velocity squared= 16

Multiply squared velocity with Mass= 272235.422 x 16

Kinetic energy= 4355766.752 x 0.5= 2177883.376 joule

2177883.376 / 1.3558179483314004 = Pounds per square foot

Pounds per square foot of force= 1606324.3436777866507306658200642 (803.162172 tonnes)

Pounds per square inch (PSI)= 11155.030164429073963407401528224 (5.57751508 tonnes)

Is there a flaw in this calculations formula? regardless of the actual numbers used, is the formula sound? What can improve it or a counter formula that can fix errors?

__________________

Jul 25th, 2011 10:37 PM
 All times are UTC. The time now is 10:36 AM.
 Pages (7): [1] 2 3 » ... Last » Last Thread   Next Thread

Home » Misc » Computer / Video Games Discussion » Game Math.

 Forum Jump: Please select one: -------------------- Private Messages User Control Panel Who's Online Search Forums Forums Home -------------------- Welcome-- Welcome Community-- General Discussion Forum---- Philosophy Forum---- Religion Forum-- The Off-Topic Forum Movies-- Movie Discussion---- Movie Versus Forum---- Movie Character Respect Forum-- Movie Stars & Celebrities-- Movie Trivia-- DVD Talk Movie Genres-- Sci-Fi / Fantasy-- Animations / CGI-- Anime / Manga---- Anime 'Versus' Forum-- Foreign Cinema-- Horror Movies Movie Franchises-- Lord of the Rings-- Harry Potter---- Appreciation and Anti Threads-- Pirates of the Caribbean-- James Bond Series-- Indiana Jones-- Transformers-- Star Trek-- More Movie Forums---- The Matrix Movies---- The Terminator Movies Comic Book Forums-- X-Men-- Spider-Man-- Batman-- Superman-- Comic Book 'Versus' Forum---- Battlezone-- Comic Book 'Respect' Forum-- Comic Book Movies---- Comic Books Star Wars-- Star Wars: TV Series-- Star Wars: Episode I, II & III-- Star Wars: Episode IV, V & VI-- Star Wars: Literature & Expanded Universe---- Star Wars Versus Forum Misc-- TV Talk Forum---- Smallville Forum---- Heroes-- Music Discussion-- Computer / Video Games Discussion---- Games 'Versus' Forum------ Games 'Respect' Forum-- Sports Forum-- Book Discussion Forum-- Artwork Forum---- Poetry Corner-- Signature Forum---- Signature Duel Forum-- General Fiction Area---- Multi-Author Fiction Area---- Harry Potter Fiction-- Conspiracy Forum Role Playing-- Role Playing Forum-- Unhosted Role Plays-- Star Wars: Role Playing Communications-- News & Questions---- Computer Help Forum
Search by user:

Forum Rules:
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is OFF vB code is ON Smilies are ON [IMG] code is ON

Text-only version

< - KillerMovies.com - Forum Archive - Forum Rules >