SFML Quick Setup - Everything You Need To Get Started Making a Game In C++ - Episode 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ต.ค. 2024
  • Want to start making videos games with C++, but don't know where to start?
    In this video, I go step-by-step from nothing to drawing something on the screen using SFML. Once you can start drawing things on screen, you're ready start programming your game.
    Github For This Project: github.com/And...
    Written Instructions:
    1 - Download visual studio community : visualstudio.m...
    2 - Download SFML for Visual C++ 17(2022) : www.sfml-dev.o...
    3 - Create new empty C++ console application project.
    4 - Open project properties setting.
    5 - In All Configurations, Under Properties-Configuration Properties-C/C++-General : Add Additional Include Directory YourPathHere\SFML-2.6.1\include
    6 - In All Configurations, Under Properties-Configuration Properties-Linker-General : Add Additional Library Directory YourPathHere\SFML-2.6.1\lib
    7 - In Debug Configuration, Properties-Configuration Properties-Linker-Input : Add Additional Dependencies sfml-window-d.lib sfml-graphics-d.lib sfml-system-d.lib
    8 - In Release Configuration, Properties-Configuration Properties-Linker-Input : Add Additional Dependencies sfml-window.lib sfml-graphics.lib sfml-system.lib
    9 - Paste in the following test code from SFML www.sfml-dev.o...
    #include "SFML/Graphics.hpp"
    int main()
    {
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);
    while (window.isOpen())
    {
    sf::Event event;
    while (window.pollEvent(event))
    {
    if (event.type == sf::Event::Closed)
    window.close();
    }
    window.clear();
    window.draw(shape);
    window.display();
    }
    return 0;
    }

ความคิดเห็น • 33

  • @airwegax
    @airwegax หลายเดือนก่อน +2

    Thank bro, I watched 2 videos and only this help me.

  • @PlayGame-ir5br
    @PlayGame-ir5br 6 หลายเดือนก่อน +2

    THANK YOU SOOO MUCH
    IT TOOK ME 4 HOURS TO RUN THE SFML LIBRARY UTILL I FOUND YOUR VIDEO, I WAS ABLE TO REPLICATE SFML FOR 32 (only difference being that there is no x64 file created and you can directly add the required files in the debug and release folder) BIT AND IT WORKS GREAT!

  • @DeathChronx
    @DeathChronx 6 หลายเดือนก่อน +2

    Thank you! Very helpful, got setup relatively easily with these directions.

    • @AndrewCodesGames
      @AndrewCodesGames  6 หลายเดือนก่อน

      You're very welcome! Glad the video helped :)

  • @mohamedtamer9041
    @mohamedtamer9041 25 วันที่ผ่านมา

    amazing

  • @saaskanga
    @saaskanga 5 หลายเดือนก่อน +1

    Thanks dude 👏

  • @sriman1
    @sriman1 2 หลายเดือนก่อน +1

    Thanks alot you really help me

  • @hoykan1903
    @hoykan1903 3 หลายเดือนก่อน +1

    currently is working useful video

  • @Arifindepayjr1010
    @Arifindepayjr1010 3 หลายเดือนก่อน +1

    Thanks

  • @hridoy4785
    @hridoy4785 3 หลายเดือนก่อน

    please make tutorial about collision and how the player movement stop after collision from 4 diffirent side

    • @AndrewCodesGames
      @AndrewCodesGames  3 หลายเดือนก่อน

      I'll add some basic collision detection in my next tutorial!

  • @Viso-code471
    @Viso-code471 26 วันที่ผ่านมา

    Do we have to do the same for each project? cause once I messed up the first project in the repo the setting is not updated for the other new project

  • @terrormapu
    @terrormapu 2 หลายเดือนก่อน +1

    Seems C++ library management is worse than Java

  • @AhmedDesignerShowerOfNaples
    @AhmedDesignerShowerOfNaples 2 หลายเดือนก่อน

    Hello, when I right click on solution and go to properties, I don't have a left menu like you do. All I have is Common properties and configuration properties. Why is that?

    • @AndrewCodesGames
      @AndrewCodesGames  2 หลายเดือนก่อน

      Hi Ahmed, hard for me to say without seeing it myself. From a Google search, it looks like maybe pressing Ctrl-S with the properties window selected might fix it?
      stackoverflow.com/questions/32262557/visual-studio-2015-properties-window-is-blank-sometimes
      Maybe sanity check that you're right clicking on the solution and not opening some other settings?

  • @IAN-no2wf
    @IAN-no2wf 2 หลายเดือนก่อน

    release file is not showing under the x64 file for me

    • @IAN-no2wf
      @IAN-no2wf 2 หลายเดือนก่อน

      nevermind lol

  • @sriman1
    @sriman1 2 หลายเดือนก่อน

    this setup for uncoming projects or only applied for one project

    • @Viso-code471
      @Viso-code471 26 วันที่ผ่านมา

      how did it go seems like we have to do it each time

  • @calfttv9788
    @calfttv9788 26 วันที่ผ่านมา

    Hi sir i am getting this error,
    Error LNK1181 cannot open input file 'sfml-window.lib' ConsoleApplication1
    Microsoft says that it may be because the file is unreachable or doesnt exist?

  • @ryanmichelson218
    @ryanmichelson218 4 หลายเดือนก่อน

    When I open the solution properties pages, there is no c++ selection and I can’t change the configuration… what am I doing wrong

    • @AndrewCodesGames
      @AndrewCodesGames  4 หลายเดือนก่อน

      Did you install the C++ desktop development modules? Happens at 2:25 in the video

  • @omarabdelnabi5784
    @omarabdelnabi5784 6 หลายเดือนก่อน +1

    hello dear i have aproject in university about to make agame by sfml can u help me

    • @AndrewCodesGames
      @AndrewCodesGames  6 หลายเดือนก่อน +1

      Of course, i'd love to help! Is there a specific topic I could cover in a video?

    • @omarabdelnabi5784
      @omarabdelnabi5784 6 หลายเดือนก่อน

      @@AndrewCodesGames thank you that is great how can i communicat with u do u have discord

    • @AndrewCodesGames
      @AndrewCodesGames  6 หลายเดือนก่อน

      I'd prefer to keep the communication on TH-cam. I plan on continuing this sfml from scratch series. So if there's something in particular you want to see/learn about, just leave me a comment!

  • @DevinAvery-nt2yb
    @DevinAvery-nt2yb 3 หลายเดือนก่อน

    Do the SMFL files have to be on the C: drive?

    • @AndrewCodesGames
      @AndrewCodesGames  3 หลายเดือนก่อน

      Should be fine on any drive as long as your path specifies it ":D/:E/etc."