Group Abstract Group Abstract

Message Boards Message Boards

Reverse engineer video game function/formula

Posted 5 years ago
POSTED BY: Paul Loht
6 Replies
Posted 5 years ago

I was reading about a nonlinear staircase the other day that looked promising, but I haven’t been able to bend it to my will. I played with changing the exponent but couldn’t get there.

POSTED BY: Paul Loht
Posted 5 years ago

That's close but it doesn't work for all 18 sample points.

Show[Plot[{91 - n + Floor[(n - 1)/4]}, {n, 1, 18}], ListPlot[data[[All, 3]]]]

Prediction of dx

POSTED BY: Jim Baldwin

How about this:

data = {90, 89, 88, 87, 86, 86, 85, 84, 84, 83, 82, 81, 81, 80, 80, 79, 78, 78};

Show[
 Plot[{91 - n + Floor[(n - 1)/4]}, {n, 1, 10}],
 ListPlot[data]]

enter image description here

POSTED BY: Gustavo Delfino
Posted 5 years ago

Use ListPointPlot3D:

data = {{1100, 1000, 90, 100}, {1200, 1000, 89, 110}, {1300, 1000, 88, 120}, {1400, 1000, 87, 130},
   {1500, 1000, 86, 140}, {1600, 1000,  86, 150}, {1700, 1000, 85, 160}, {1800, 1000, 84, 170}, 
   {1900, 1000, 84, 180}, {2000, 1000, 83, 190}, {2100, 1000, 82, 200}, {2200, 1000, 81, 210},
   {2300, 1000, 81, 220}, {2400, 1000, 80, 230}, {2500, 1000, 80, 240}, {2600, 1000, 79, 250},
   {2700, 1000, 78, 260}, {2800, 1000, 78, 270}};
ListPointPlot3D[data[[All, {1, 2, 3}]]]

But with y being constant, it's not a very interesting display.

And my point about needing y to vary is that IF the formula depends on y you can't get there from here if y doesn't vary. It might end up that y isn't used at all in the formula but one can't know that either without varying y.

POSTED BY: Jim Baldwin
Posted 5 years ago

Hi Jim,

I noticed the stairstep appearance, but I haven’t found a function yet which would produce the inconsistent height.

I have been thinking that plotting the values along an x, y, and z axis might reveal something, but I haven’t figured out how to do that yet. It sounds like a stretch anyway.

I had assumed that keeping y constant would simplify deriving how dx decreased as x increased, but it sounds like you’re saying that may obscure the solution.

I’ll give that a try, in the meantime, thanks for the tip.

POSTED BY: Paul Loht
Posted 5 years ago
POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard