Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to make a space ship shoot bullets ??  (Read 1997 times)

0 Members and 1 Guest are viewing this topic.

Pacman

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
How to make a space ship shoot bullets ??
« 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()
{


}
« Last Edit: November 15, 2014, 05:50:56 am by Pacman »

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Re: How to make a space ship shoot bullets ??
« Reply #1 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.

 

anything