Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by gasto

  1. Correct me if I am wrong: root is distributive with respect to division and multiplication but not with respect to addition and subtraction.
  2. If I could parse a phrase or a sentence to the algorithm, how easy would it be to generate a level based on the semantics extracted from the sentence. Especially for a puzzle/adventure game.   Imagine parsing the words: "latent ball in slope" and generate a level that contains a slope where a ball rotates and menaces squashing the player.  
  3. I've read that the human ear can hear up to 22000hz frequency, I suppose that when they write "frequency" they are referring to cycles per second. A standard frequency to store audio files is 44khz because that is the double of 22khz, being needed because of the Nyquist theorem. However, how would this translate in samples per second? imagining a sine wave(or a sawtooth wave) four samples as minimum would be needed to complete a cycle(a sample when sine receives 0?, the next one at ?/2, the next one at 1?, and the last one on the cycle at 3?/2). That results in 22000hz*4samples == 88000 samples per second Am I correct?
  4. How is that "margin" between the highest frequencies and half the sampling rate measured? One is a continuous signal(?) while the other is a digital signal(samples per second.)
  5. Is there a way to Postfix a letter to a numeral, like in the case of a long integer: 2344532L, but for indicating a byte sized numeral?
  6. I would understand it in 32 bit machines, word is 16 bits, so the last assembly statement assigns the first 16 bits of the 32 bit register eax to var2(hence it uses ax.) But in 64 bit machines, is eax 64 bits and ax 16bits?
  7. Yes. For example, If: #include <stdint.h> int main() { uint8_t var = 0xFF; uint16_t var2 = var<<8; return 0; } Checking with the debugger the value of var2 after executing its initialization is 0xFF00, which makes me deduce that the compiler transformed var to a uint16_t or bigger when the bit shift happens.
  8. gasto

    *. not the same as ->

    My mistake, I had positioned the dereferencing asterisk after, not before(as it should be) the complicated expression.
  9. I remember that -> was an alias for dereferencing and field selection, and dereferencing in C is done with : *  field selection with: . So I wonder why is it not compiling when I use *. ?  
  10. Gain is well, how much the wave will be amplified. Amplitude is the level of decibels the wave arrives at each cycle without being influenced by gain. velocity is mostly used for MIDI. Volume is the final mixdown amplitude of all the waves.   Is that correct?
  11. Thanks that was helpful. I guess I need an engineering degree in acoustics to understand volume. Hehehe .
  12. I am not good at math notation. I need  to define a function that calculates the yearly accumulated deposit + interest.   For example I have got $30 in a fixed bank account, with an yearly interest of %10 .  After a year I would possess $33, after another year $36.3, and so on.   x?0; f(x)=(f(x-1)+30·0.1)x   Or some kind of recursive function I can't figure out.
  13. Oh, yes. What an idiot I am. 1.1, I could n't figure that out. [bashes head against desktop] Thanks.
  14. Ordinals are to permutations as cardinals are to combinations.   Is that assertion true?
  15. gasto

    From Python to Android

    Cool, using Pygame games to port it on android. It seems like a dream became true.
  16. Why in some books is there a multivariate function specifying just one variable when it is supposed to take two or more. For example: why f(x)= x²+y²   and not   f(x,y)=x²+y²   Should yield the corresponding value of z.
  17. There has been lurking in my mind a question for way too long, without being able to find a suitable, satisfying answer. How are sin(), cos(), and tan() functions calculated on a calculator or computer? I understand that mathematicians use the famous unit circle to define the trigonometric functions, but if   sin(?/4)=o/1 o= sin(?/4)*1   a=cos(?/4)*1   tan(?/4)=sin(?/4)                _______                 cos(?/4)   So we are still left with the question, how is sine, cosine and tangent computed? All the books and references that I read basically just suggest to use the calculator, in other words computed by magic or dogma.     Edit: I now remember that they use the Pythagorean theorem.   h²=o²+a²   ?=?/4 o=a       1²=2o²   ___ ?1/2 = o        ___ a= ?1/2                  ___ sin(?/4)=?1/2                _____                  1                    ___ cos(?/4)=?1/2                _____                  1                    ___ tan(?/4)=?1/2                _____                ?1/2 But how do they compute the rest of angles?
  18. If PeekMessage() is supposed to do the same thing that GetMessage() does but without waiting for there to be a retriavable message, why would somebody use GetMessage() after PeekMessage() has been called? while ( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )       {         // Translate and dispatch to WindowProc if not WM_QUIT         GetMessage( &msg, NULL, 0, 0 );         TranslateMessage( &msg );         DispatchMessage( &msg );       }
  19.   struct Tile   {     TileType      Type;     unsigned int  Color;     unsigned int  Flags;     Tile( TileType Type = TILE_EMPTY, unsigned int Color = 0xffffffff, unsigned int Flags = 0 ) :       Type( Type ),       Color( Color ),       Flags( Flags )     {     }   };   Can somebody explain to me what on earth is the coder doing here? a struct is being initialized with default parameters within its own definition. I fail to assimilate its semantics and usage.
  20. Non-Static Data Member Initializes, often abbreviated NSDMI. It's just syntactic sugar. These two pieces of code are functionally equivalent: struct foo { int i = 0; }; struct foo { int i; foo() : i(0) {} }; The advantage to NSDMI shines when you have only a default constructor (easier to read) or when you have many constructors (since you don't need to repeat the initializers over and over again. Note that these are _not_ equivalent to the original code that was posted, as the original code allows the user of the class to supply non-default data to the constructor. The above two examples both only supply a default constructor (no parameters). You can use NSDMI with the original example by doing something like: struct foo { int i = 0; foo() = default; foo(int i) : i(i) {} }; Whether you find that an improvement or not is another question.   What does foo()=default; do?
  21. This makes much more sense and is less tautological.
  22. gasto

    Is the Game Industry a Bad Place to Work?

    An article wannabe that ramps up the frustrations of an 'adult' rationalizer. Let's be more specific.     That made no sense. It is a positive feedback loop, as such, it is senseless to type: "I don't agree with the reports."     To discern whether it is sexism or not, It is not crucial to compare the US average of female computer science graduates against the female employees in the computer games industry. I'd focus on why they are choosing to avoid computer science altogether. Is it because of fear of sexism in the workplace, or is it because they feel incapable of such endeavours, or is it because they don't like videogames(etc.)?       That's a no true Scotsman fallacy. There are plenty of adults who do not consider sexual-based entertainment an adult oriented one. People can get in the conference and leave, but they already came inadvertently. It is stupid to expect people to accept such crap in a professional developer gathering.       That's a rationalization, and an appeal to tradition. The fact that other industries do it, doesn't justify its use in the videogames industry, especially when it is completely unrelated with the theme of the game in question.       Again, rationalizing, this time exploitation. The whole article is a waste of time, I would call it a blog entry at most. At worst, it is a defecation exercise.
  23. Why is ?(infinite) not considered a number? I mean, if zero is considered a number, it sounds reasonable to consider infinite a number too.
  24. If you've read this far but don't have a successful game to promote, then consider this article as information that's impractical for now. Yeah, thanks for pointing it out... after almost reading the entire article!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!