SFML community forums

General => SFML projects => Topic started by: Pacman on November 15, 2014, 05:49:19 am

Title: How to make a space ship shoot bullets ??
Post by: Pacman on November 15, 2014, 05:49:19 am
I am new to SFML. I just started a space game project.
I have made good progress.
I would like help as to how do i make my ship shoot bullets using STL containers.
I have no idea how i should start.


if you wouldnt mind maybe you could be my mentor, we could talk on keep in touch on facebook.  i am from the caribbean .
I would appreciate the help.

void bullets()
{


}
Title: Re: How to make a space ship shoot bullets ??
Post by: Gambit on November 15, 2014, 06:25:33 am
Generally what you would do is listen for a keypress event. When, lets say the spacebar, is pressed, you create a new bullet object and set its direction and velocity and so on.