Aerodactyl55

Members
  • Content count

    71
  • Joined

  • Last visited

Community Reputation

152 Neutral

About Aerodactyl55

  • Rank
    Member

Personal Information

  • Interests
    Audio
    Programming

Social

  • Steam
    tomberry64
  1. C++ Writing char arrays (binary)

    I made a mistake, it should have been char* not myType*. I don't see a structure in your post but usually a vector struct is a POD. You can read the vector array in a single call as well. Krohm already posted the problems you may face.
  2. C++ Writing char arrays (binary)

    I believe, for a POD struct, you can just call write( (myType*)myArray, sizeof (myType) * SizeOfArray(myArray)). You can read the data back in a similar way.
  3. Precision Problems with bouding sphere

    I think you need to compute the amount of intersection between the spheres and use that to push either one sphere or both of them away from each other so they stop intersecting.
  4. Resources to get good at math?

    A matrix is not the only way to solve it, you can solve for one variable and then solve for the other like this: h = 24/w ; h = 10 -w 24/w = 10 - w; -> 24 = 10w - w^2; w^2 -10w + 24 = 0; Then solving this quadratic equation we get: w = 6 or w = 4; then: h = 4 or h = 6; I skipped some steps for the sake of brevity. Now to solve it using a matrix would probably involve using Cramer's Rule.
  5. 3D IDirect3DSurface9 flickers seriously

    Where are all these functions that you mention? If you show your code, there is a good chance someone will be able to help you.
  6. tic-tac-toe review request

    You say the AI is primitive but it is impossible to beat. Is that intentional? Maybe you can add a small chance for the AI to make a mistake, as an 'improvement'.
  7. DX11 Member function as callback

    As far as I know there is no way to assign a member function to lpfnWndProc. The author of the book assigned a proxy function to lpfnWndProc, and that function calls the member function MsgProc. Static member functions, as you said, can't be virtual but you can design it so that it calls virtual member functions for each message type (OnCreate, OnPaint, OnDestroy, etc).
  8. Help with Missile Command

    If it's not related to the current topic then it may be better to open a new topic.
  9. Polyominoes

    Hello everyone, I decided to share a game I just completed to get some feedback. The game is Polyominoes, and you can find the files attached. The objective is to pack the pieces (polyominoes) inside a rectangle. Controls: Left Mouse Button: Pick (and then drag with the mouse); Right Mouse Button: Remove polyominoes from the rectangle; <Q>, <E> Keys: Rotate the picked polyomino; <W> Key: Mirror the picked polyomino; Enjoy! Polyominoes.7z
  10. Help with Missile Command

    The sign of the z-component (for 2D games) of that perpendicular vector will tell you the direction (left/right) to rotate.
  11. Help with Missile Command

    I believe you need two vectors for this type of targeting system: The first, from the center of your cannon to the mouse hotspot position; and the second is the current orientation of the cannon. Then you can use the dot product to find the angle between these two vectors and then use the cross product to find the direction to rotate.
  12. IDXGIFactory::MakeWindowAssociation has no effect

    I believe you are looking for the DXGI_MWA_NO_ALT_ENTER flag.
  13. ID3DXSprite::Begin()/ID3DXSprite::Draw()/ID3DXSprite::End must be called inside a IDirect3DDevice9::Begin()/IDirect3DDevice9::End() Block.
  14. game loop

    After so much frustration this is what worked for me: [CODE] int accumulator = ( int )( ( ( tNow - tPrev ) * 1000 ) / tFreq ); tPrev = tNow; while( accumulator > 0 ) { Update( DELTA_TIME ) accumulator -= UPDATE_TICKS; } //Compensate for the extra update loop that consumes the remainder if( accumulator != 0 ) Sleep( abs( accumulator ) ); Render(); [/CODE] And i removed the interpolation. Thanks everyone.
  15. game loop

    Khatharr, your pseudocode seem to suggest a variable time step which i have used in previous projects, and it works. The problem is if the game slows down a big delta time is passed to Update(), which may result in missed collisions. [quote name='Khatharr' timestamp='1354743715' post='5007534'] Try this: [code]lerp = (float)accumulator / UPDATE_TICKS;[/code] [/quote] Doesnt help.