Find Jobs
Hire Freelancers

Planetary Alignment Formula

$30-100 USD

Closed
Posted about 14 years ago

$30-100 USD

Paid on delivery
I am attempting to develop a space-based game; the universe consists of locations: empty space, a planet, or anomaly such as a black hole, meteor shower, etc.. While much of the universe is empty space, I want a calculated formula to change this. The "galactic center" is 0,0. There are then four "quadrants": 0,1 to 65535,65535; ; 0,-1 to 65535,-65536; -1,0 to -65536, 65535 and -1,-1 to -65536, -65536.; you can treat locations in universe as either signed 32-bit or two signed 16-bit numbers. I need a calculated formula, given location, generates a number from 0 to 12 (or 0 to 15 if it makes it easier) , 0 meaning empty space, 1 through 9 being planetary levels, and 10 and above anomalies. Should make planets more likely closer to 0, location at 20,75; 20,-75; -20,75; or -20,-75, is more likely planet than one at 2000,1000 etc. Probably "weight" levels for level 1 planets more common than level 2, so on up to level 9. It doesn't matter what the calculations produce for 0,0; that one will be ignored. I know this isn't hard because I saw a formula for it about 25 years ago. I've done programming for decades but I don't have the math background to do the calculation myself. Note that this is a *calculated* formula, not a random one; the location of planets (or other anomalies) should be the same every time someone plays the game. So if 104,322 generates a level 6 planet, the formula generating the value for that location should *always* calculate 6. Does not use data storage; idea is to determine the locations of planets and other space anomalies programmatically as a calculated value rather than by reading a database. This may either be a simple formula or a multiline procedure. The target language will probably be PHP but anything that produces the desired result that I can translate is ok; I can read code in Basic, Fortran, C, Pascal, Javascript, Python,and PHP languages. What you can do to show your formula works is that if I input a series of locations, it shows the value it would generate, and if later I input the same location it would return the same value for that location. So you could write a simple program in Basic or a PHP-enhanced web page or whatever you want to generate the result. ## Deliverables Again, I want, in effect, a function that, given the location in the universe, consistently returns the same value which tells whether that location is empty space, a planet from level 1 to 9, or an anomaly (values 10 and up). The location can either be treated as two 16-bit numbers or one 32-bit number. It should be a short function, probably no more than 5 or 10 lines (but the size is not critical, I just want to show for someone with the math background that it's not a huge project). * * *This broadcast message was sent to all bidders on Wednesday Apr 7, 2010 9:57:29 AM: I wish to thank all of you for the time you spent bidding on this proposal. To paraphrase a line from the play *A Chorus Line*, "I wish I could have used all of you, but unfortunately, I can't." I now understand what he meant by that statement, as all the proposals were interesting. I had a bit of a time choosing but in the end I made a decision, and, again, thank you all for your bid. Paul
Project ID: 3269190

About the project

7 proposals
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
7 freelancers are bidding on average $46 USD for this job
User Avatar
See private message.
$68 USD in 14 days
5.0 (128 reviews)
5.9
5.9
User Avatar
See private message.
$191.25 USD in 14 days
5.0 (12 reviews)
5.3
5.3
User Avatar
See private message.
$12.75 USD in 14 days
4.9 (22 reviews)
3.3
3.3
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (9 reviews)
3.2
3.2
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (5 reviews)
3.1
3.1
User Avatar
See private message.
$8.50 USD in 14 days
5.0 (3 reviews)
0.8
0.8
User Avatar
See private message.
$12.75 USD in 14 days
5.0 (4 reviews)
0.5
0.5
User Avatar
See private message.
$17 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$21.25 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
University Park, United States
5.0
1
Payment method verified
Member since Mar 8, 2010

Client Verification

Other jobs from this client

Voicemail Content
$30-250 USD
Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.