Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

173 Neutral

About stannic

  • Rank
  1. stannic

    breakout lives

    Can you explain why you are calling:   brick(); paddle(); ball();   inside your drawBitmapText function.     Also can you explain what brick_collision() does?   Though my guess is that you are clearing the screen every frame, however you are only drawing the "num" for one frame when the "y" leaves the screen.
  2. I could be mistaken but I think Vertex and TexCoords are linked together such that index n will reference the vertex at n and the texCoord at n.   However you seem to be trying to reference the vertex at n but reference the texCoord at count.
  3. stannic

    Peer-to-Peer (UDP) Issue

    Check to see if you ip from ipconfig/ifconfig and from a website such as whatismyipaddress.com gives the same ip. You could be under an ISP NAT.
  4. stannic

    2D scrolling game

    if playerpos = (400,0) and camerapos = (800,0) and the player is still centered on the screen, then something is wrong. It should be drawing the player at (-400,0) relative to the center of the screen, which should be on the left side of the screen.   As to why it works, since playerpos = camerapos, playerpos-camerapos = (0,0). So then when you add half your screenDimension, which is the center of the screen, it will center the player onto the screen.
  5. stannic

    2D scrolling game

    You move the player normally then center the camera onto the player (camerapos = playerpos)
  6. stannic

    2D scrolling game

    As state above but you also need to center 0,0 to the middle of the screen in 2d so addhalf your screen dimension   camerapos = playerpos   for all objs    draw obj at objpos-camerapos+(screenDimension/2)
  7. Rewrite your compare functions such that if left is greater than right return 1 or some number greater than 1 else if left is less than right return -1 or some number less than 1 else return 0 if its the same.   or as a hack, just use a double as the return type.
  8. stannic

    C# DeWitters implementation inconsistent

    I can't see anything wrong. What exactly is inaccurate? that your numbers aren't all near 33ms?
  9. stannic

    Camera/screen moving

    What I meant by move was that when drawing you displace the objects when drawing.   for eg displace. = playerpos for all obs   draw obj at  objpos - displace
  10. stannic

    Camera/screen moving

    Shouldn't you just displace everything by where you want to look at.   So if you want to look at the player just displace everything by the players position.   If you are at 200,300 then move the everything by -200,-300   So you draw yourself at 0,0   If you want 0,0 to be the center then add screenWidth/2 and screenHeight/2
  11. stannic

    Fixed Time Step Game loop (again..)

    Seems like  lastUpdate = nextUpdate So I'd probably replace lastUpdate with nextUpdate, though lastUpdate would probably be a more correct term here. So you don't really need the line lastUpdate = currentTime;  
  12. stannic

    Fixed Time Step Game loop (again..)

    lastUpdate = currentTime; should be moved inside the update loop.   lastUpdate will then need to be init with the SDL_GetTicks() before ever looping.   UPDATES_PER_SECOND should probably be renamed to MILLISECONDS_PER_UPDATE then have it equal to 1000/UPDATES_PER_SECOND
  13. stannic

    Rotate 4x4 matrix formula

    My guess is that your problem has something to do with notation and order of operations.     Remember that  [A][X][Y] != [Y][X][A] != [X][Y][A] != [A][Y][X]
  • 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!