|
From: Brian S. <blu...@at...> - 2003-03-12 00:16:21
|
Hello, I'm programming my first game and need a little help. Well I'm making a = simple (well it was supposed to be simple lol) two player shooter game. = Each player uses a series of keys on the keyboard to move/fire the ship. = Well my first problem (that I was able to solve on my own - go me!) was = that the ships were slowing each other down when they were both moving = at the same time. I fixed this by placing a rest() function at the end = of each getInput functions instead of at each key input. (I have two = getInput()'s - One for each player) My problem now is, I'm wondering how = to incorporate the shoot functions. I have two functions (One that = shoots up, and another that shoots down) to handle the shooting. They = are simple and only involve drawing a circle that increases or decreases = its y-axis. If I place a rest() or vsync() every time it redraws, it = hinders either ship from moving (because it is caught in that loop). How = can I incorporate it so that the bullet can still be moving up and I = would still be able to maneuver the ship(s) and/or fire again? Any help = would be greatly appreciated! Thanks! -Brian |