   Simple shoot 'em up problem with Bullet
  Hi allI''m new to game development and gamedev.net but i think it has a good forum so i''ll post my problem here.I''m making a shoot ''em up type game. I have done the scrolling space background and the ship is moveable. But i have some problems for the bullet: 1. To animate the bullet shooting process, I make a function to get the value of the top and left bound of my ship RECT and then the bullet will be launched from that coordinate. But when I''m shooting the bullet and at the SAME TIME move the ships, the bullet always follow the ship, because of this calculation. Here is the code that I use:if(KEYDOWN(VK_SPACE)) {   bullet_source.left= 0;   bullet_source.top= 0;   bullet_source.right= 15;   bullet_source.bottom= 17;// The dest top, left, right , bottom is the bounds of the Ships'' RECT ///   bullet_dest.left   = (dest.left + 25); // I add 25 to make it look like it shoot from the center of the ships ///bullet_dest.top    = (dest.top + 1) - bullet_up;   bullet_dest.right  = (dest.left + 25) + 15;   bullet_dest.bottom = ((dest.top + 1) + 17) - bullet_up;   lpddsprimary-> Blt(&bullet_dest, bullet, &bullet_source, DDBLT_WAIT, NULL);   bullet_up += 5;   if(bullet_dest.top < 10){bullet_up= 0;}}So is there a way to make the bullet look right when it shoot(by modifying this function)?2. The second problem is that when I shoot the bullet by holding the spacebar key, it will looks right. But when I tap the spacebar quicklly(NOT holding it), the bullet will just go up in a short distance and dissapear. This doesn''t look right because all space shoot ''em up type games don''t act like mine do If you need to see the .exe file I''ll e-mail it to you because i don''t know how to post it here If somebody can give me a hint to solve this problem I''ll appreciate it. Thanks. 
Well I hate to say this, but you are going about it all wrong!  The problem with your code is that every time you hit the space bar, you are moving the bullet back to the position of the space ship.In order to make this work, what you need is a little flag that says when a bullet is in the air - if a bullet is in the air, then you can''t fire!  When the bullet goes off screen, the flag goes back to false.Secondly, I cannot see how your bullet can move unless space is down. In your render loop, you need to write:if ( bBulletFired ){   MoveBullet ()   CheckToSeeIfBulletHitsSomethingOrIsOffScreen ()}So basically, your fired flag is all important.;  The thing you are doing right now is that you only update the bullet if space is pressed.What you need to do is that when the spacebar is pressed you only initiate the bullet(i.e. give it coords. like you have done). Then you draw the bullet and update it in the gameloopLike:Gameloop.........if space is pressed   init bullet;.........if there are bullets in play   update position, check collision and draw;Endor something like that. ;  Is there a tutorial about make this kind of game?