   Getting a trail of spaceships instead of just one.  Any suggestions?
  I'm working on a console spaceship shooter using just text.  I started with an example program from "Windows Game Programming For Dummies" and have been adding and modifying it to make a full fledged game.  However, I've come upon a problem.   The "X" coordinates work just fine, but for some reason, the player's spaceship is being drawn on every "Y" coordinate in the line containing the "X" coordinate.  If you need a visual to understand what I mean to this, I've posted a screenshot that can be viewed at http://geocities.com/xfiruath/space.jpgTo draw the spaceship (and the background), on the screen, I use this function:inline void Draw_String(int x, int y, char *string){// Draws string at the given x,yCOORD cursor_pos; // used to pass coords// set printing positioncursor_pos.X = x;cursor_pos.Y = y;SetConsoleCursorPosition(hconsole,cursor_pos);// print the string in current colorprintf("%s",string);}  /* --> end Draw_String  */The corresponding function call to draw the spaceship is this :Draw_String(player_x,player_y,"<-*->");I've tried clearing the space immediately behind the spaceship by using this function :inline void Clean_Player(int y, char *string){// Ensure there is not a string of spaceships on the y axis as ship movesSet_Color(15,0);COORD cursor_pos;cursor_pos.Y = y;y = y - 1;SetConsoleCursorPosition(hconsole,cursor_pos);printf("%s",string);}With the corresponding function call (immediately after painting the spaceship):Clean_Player(player_y, "");What am I doing wrong here, and how do I fix this so the spaceship stays in one X,Y coordinate, instead of 1 X coordinate and all Y coordinates?   
  I never use the Console to make a Game.. but for the code everything seem okSo, i dont know how the console is working, but its sure u need a way to clear the screen (or you can redraw it all, or clear the player like u did)For your problem, are you calling Draw_String(player_x,player_y,"<-*->") in a loop of some sort ?This is the only place i can think there can be an error, in the code i dont see ;)Feel free to post a little moreJonathan   ;  Yes, I'm using a while loop.  Here are the pertinent contents of main :void main(void){char playerinput;   // Players Keyboard Inputint player_x = 40;  // Players x positionint player_y = 10;  // Players y positionCreate_Graphics();Clear_Screen();// Game Loop - Get Input, Clean Screen, Redrawwhile(game_running){if (kbhit()){// Get User Inputplayerinput = toupper(getch());// Quit Gameif (playerinput=='Q' || playerinput==27)game_running = 0;// Move Leftif (playerinput=='F')player_x--;// Move Rightif (playerinput=='S')player_x++;// Move Downif (playerinput=='C')player_y++;// Move UPif (playerinput=='E')player_y--;}  // Ensure ship doesn't leave screenif (++player_x > MAX_X)player_x = MAX_X;if (--player_x < 0)player_x = 0;if (++player_y > MAX_Y)player_y = MAX_Y;if (--player_y < 0)player_y = 0;// Draw stars at random positions to scroll bySet_Color(15,0);Draw_String(rand()%88, SCROLL_POS,".\n");// Draw playerSet_Color(rand()%15,0);Draw_String(player_x,player_y,"<-*->");Draw_String(0,0,"");Clean_Player(player_y, "");// Set up frame rate using the sleep functionSleep(40);} /* --> End While  */// Clear Screen, display game over messageClear_Screen();printf("\nG A M E O V E R\n\n");} /* --> End Main    */It's supposed to draw the stars, draw the character, clear the screen.  It seems to be doing that for everything except the Y axis.  I'm kind of new to C/C++, so I'm not really sure what I'm doing incorrectly.   ;  Hummm it compile and work on my side with some modification ;)What happen if you Comment thoses line out// Draw stars at random positions to scroll bySet_Color(15,0);Draw_String(rand()%88, SCROLL_POS,".\n");And those lines too...Draw_String(0,0,"");Clean_Player(player_y, "");And add a Clear_Screen(); After the if (kbhit()) clauseif(bhhit()){...}Clear_Screen();And keep me postJonathan   ;if (++player_x > MAX_X)player_x = MAX_X;if (--player_x < 0)player_x = 0;if (++player_y > MAX_Y)player_y = MAX_Y;if (--player_y < 0)player_y = 0;Try not altering the actual coordinates with the prefix operations.  Instead just do this style to check it: ( player_y - 1 < 0 ).  See if that fixes the problem.   