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;
}
Thank bro, I watched 2 videos and only this help me.
Glad it helped!
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!
Yay! Glad to hear it!
Thank you! Very helpful, got setup relatively easily with these directions.
You're very welcome! Glad the video helped :)
amazing
Thanks dude 👏
No problem 👍
Thanks alot you really help me
currently is working useful video
Thanks
you're very welcome!
please make tutorial about collision and how the player movement stop after collision from 4 diffirent side
I'll add some basic collision detection in my next tutorial!
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
Seems C++ library management is worse than Java
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?
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?
release file is not showing under the x64 file for me
nevermind lol
this setup for uncoming projects or only applied for one project
how did it go seems like we have to do it each time
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?
getting same did you solved
When I open the solution properties pages, there is no c++ selection and I can’t change the configuration… what am I doing wrong
Did you install the C++ desktop development modules? Happens at 2:25 in the video
hello dear i have aproject in university about to make agame by sfml can u help me
Of course, i'd love to help! Is there a specific topic I could cover in a video?
@@AndrewCodesGames thank you that is great how can i communicat with u do u have discord
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!
Do the SMFL files have to be on the C: drive?
Should be fine on any drive as long as your path specifies it ":D/:E/etc."