Daily Archives

Articles indexed Sunday November 18 2012

Page 13/14 | < Previous Page | 9 10 11 12 13 14  | Next Page >

  • Should I use float, double, or decimal for stats, position, etc?

    - by Ryan Peschel
    The problem with float and double is that they are not exact. If you are to do something like store replays, the values would have to be exact. The problems with decimal is that they are approximately 16x slower (confirmed by searching and personal testing) than floats and doubles. Couldn't Vector2s be another problem because they use floats internally for all the components? How do other games solve this problem? I'm sure they must use floats and doubles but aren't they not deterministic across platforms and different architecture? The replay files for games like SC2 run in a linear fashion so you cannot skip ahead so how do they solve the determinism issue with floating point numbers?

    Read the article

  • Logarithmic spacing of FFT subbands

    - by Mykel Stone
    I'm trying to do the examples within the GameDev.net Beat Detection article ( http://archive.gamedev.net/archive/reference/programming/features/beatdetection/index.html ) I have no issue with performing a FFT and getting the frequency data and doing most of the article. I'm running into trouble though in the section 2.B, Enhancements and beat decision factors. in this section the author gives 3 equations numbered R10-R12 to be used to determine how many bins go into each subband: R10 - Linear increase of the width of the subband with its index R11 - We can choose for example the width of the first subband R12 - The sum of all the widths must not exceed 1024 He says the following in the article: "Once you have equations (R11) and (R12) it is fairly easy to extract 'a' and 'b', and thus to find the law of the 'wi'. This calculus of 'a' and 'b' must be made manually and 'a' and 'b' defined as constants in the source; indeed they do not vary during the song." However, I cannot seem to understand how these values are calculated...I'm probably missing something simple, but learning fourier analysis in a couple of weeks has left me Decimated-in-Mind and I cannot seem to see it.

    Read the article

< Previous Page | 9 10 11 12 13 14  | Next Page >