C++ Graphics Tutorial: Creating a bullet class (SFML Part 3)

Поділитися
Вставка
  • Опубліковано 31 жов 2024

КОМЕНТАРІ • 17

  • @thepedrowithin
    @thepedrowithin 7 років тому

    Nice video man, I'm currently working on a Missile Command basic game for learning and I was stuck on firing the Missiles, this logic really helps. I'll try it out.

  • @fernando2011
    @fernando2011 5 років тому +1

    Consider ++i instead of i++. Better performance.

  • @top3hourmusic
    @top3hourmusic 5 років тому

    I made the game regenerate randomly re-positioning after he dies, and so when i go to kill the enemy again it doesn't get re-positioned? I'm trying to make the enemy appear after i kill it.
    Edit: Never mind, found out that when I was killing him the second time, the game kept spawning him in the same location and so it looked as though he was not disappearing. Now I will work on creating bullet direction and Point System ...wish me luck :D

  • @AndrewOBannon
    @AndrewOBannon 7 років тому

    Cool tutorials thanks!

  • @ashwaniyadav3661
    @ashwaniyadav3661 3 роки тому

    really who are those 5 peoples?? They are super but hurt or something

  • @ashwaniyadav3661
    @ashwaniyadav3661 3 роки тому

    ohh finally now i know

  • @Madsycode
    @Madsycode 4 роки тому

    thx

  • @ananastudio
    @ananastudio 4 роки тому

    Great tutorial, but it would be cool to know how to shoot up instead of only right.

    • @augusto5105
      @augusto5105 2 роки тому

      shoot up is easy, you just have to change the void fire() values, its just cartesian plane, if you want to move in up direction, you have to set -y and you have to give the bullet speed value

  • @AndrewOBannon
    @AndrewOBannon 7 років тому

    How does Vector2F accepts moveSpeed that is INT?

    • @adrianwozniak8781
      @adrianwozniak8781 5 років тому

      Float will always accepts ints, but int didnt accept float. Thats the logic of the variables capacity:)

  • @marionan4505
    @marionan4505 6 років тому

    hey cool tutorial but i have a problem i can't see the bullets ?

    • @mircox111
      @mircox111 5 років тому

      i had a similar problem, my mistake was that i drew a background image over the bullets

    • @top3hourmusic
      @top3hourmusic 5 років тому

      ​@@mircox111 put the window.clear(); before the if statement

    • @top3hourmusic
      @top3hourmusic 5 років тому

      put the window.clear(); before the if statement

    • @__hannibaal__
      @__hannibaal__ Рік тому

      Bullet vector allocate too much memory; it s néed to clear it, after using bullet and this also allocate and deallocate too much for cpu and ram; so is very useful to allocate const size of vector and just make it appear and desappear.

  • @ron0gamingplayz102
    @ron0gamingplayz102 5 років тому

    Good Code: check
    Uploads to Pastebin or github: Check
    Commentary: Check
    Explanation: Check
    Subscribed?: Czech