Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualslicer4ever

Posted 11 October 2012 - 11:57 AM

edit: nvm, i re-looked at your math, and i originally mistook it as being the culprit, could your provide a better detail of what's the problem your seeing?

#2slicer4ever

Posted 11 October 2012 - 11:52 AM

this is a simple parts over base = rate over percent problem.

your part is your player position which is (PlayerPos+UpperOffset)(which in your case is 4096x4096)
your base is the map's dimensions which is 8096x8096

your rate is x which you need to solve for
and your percent is the target size, which is 1024 in your current case:

so it'd look like this:

PlayerPos    x
------------ = ---------
HL2MapSize    TargetImageSize

solving for x is simply cross multiply

so PlayerPos*TargetImageSize/HL2MapSize = x

#1slicer4ever

Posted 11 October 2012 - 11:49 AM

this is a simple parts over base = rate over percent problem.

your part is your player position which is (PlayerPos+UpperOffset)(which in your case is 4096x4096)
your base is the map's dimensions which is 8096x8096

your rate is x which you need to solve for
and your percent is the target size, which is 1024 in your current case:

so it'd look like this:

PlayerPos    x
------------     = ---------
HL2MapSize    TargetImageSize

solving for x is simply cross multiply

so PlayerPos*TargetImageSize/HL2MapSize = x

PARTNERS