Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to find some "magic numbers" for the classic helicopter game. For example the numbers that determine how fast the helicopter accelerates up and down. Also perhaps the "randomness" of the obstacles (uniformly distributed? Gaussian?). Where can I find these numbers?

p.s. I don't care about the particular platform... Flash on the desktop browser is just as good as some implementation on a mobile device.

share|improve this question

closed as primarily opinion-based by Kromster, bummzack, Anko, congusbongus, Seth Battin Oct 10 '14 at 21:27

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

This question is either too localized ("Where can I find the magic constants for the helicopter game?") or too general ("Where can I find magic constants for all games ever?"). – user744 Sep 28 '10 at 14:57
This is rather a nonsensical question, as Joe points out. Magic numbers make no sense outside of the simulation algorithm you plug them into. Either you have the whole algorithm, including the constant 'tweak' factors that form part of it, or you have nothing. There are questions to be asked along this line (e.g. "is gaussian distribution a good way of placing randomly generated obstacles", "how do I tune gameplay mechanics"), but this question is not usefully answerable in its current form. Vote to close. – MrCranky Oct 1 '10 at 15:28
The answer is 42. – Jonathan Connell Jun 16 '11 at 8:27
possible duplicate of Analysis of Mario game Physics – Seth Battin Oct 10 '14 at 21:27
up vote 8 down vote accepted

Decompile the game to figure them out, but don't use any of their code, I would say the fall rate of an object cannot be copyrighted.

share|improve this answer
Well, if they could they would patent even π, just in case. Actually, I'm not really sure someone didn't do that. – o0'. Jun 15 '11 at 12:36

You have to think like a scientist. How would you determine physical constants in the real world if you didn't know them? Observation!

Here's a good example from Super Mario Brothers:

If you record video of some controlled experiments, you should be able to plot the curves of a game object's motion in a spreadsheet program, and then you can fit curves to it.

share|improve this answer
For what it's worth, I'll mention that in one published platform game I worked on, the gravity on the player was not a constant at all; I had it change over time by about a factor of ten, just in order to get the weighty feel and heavy impact on landing that we wanted. – Trevor Powell Dec 3 '12 at 6:03
I did something similar to get a nice variable-height jump feel in Shank 2. When you let off the jump button, I turned up the gravity a bunch. I'm pretty sure that that's the secret to why Mario's jumps always feel so good, too. – Kevin Dec 3 '12 at 6:41

If you are implementing the game itself, put controls inside the game to tweak it while you play the game. Simple pushbuttons with "+" and "-" will do the job. Start playing and tweak the values as you go until it feels right. Also, remember to print the current value on screen. Whey you found the value, paste it into the code and remove the buttons.

The same for choosing the algorithm, make it possible to switch between them during gameplay and experiment until you figure out which option is the one you prefer.

share|improve this answer

Just try out values and tweak them until it "feels" right.

share|improve this answer

This is a bad question because this is done by experiment. The game developer was likely tweaking gravity/acceleration and horizontal scroll speed right until he finished the game. You tweak it to suit the difficulty you want the game to be at.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.