i know it has passed such a long time but these videos are helping me so much. Could someone explain me why didnt he put keybord inputs inside the event polling?
I want the cube to slowly move step by step from its current position to the mouse position. How would you do that? I can't seem to get how to delay each step in a for loop - as all the steps happen too fast and it looks like instant jump between the 2 positions.
Hello Hilze Vonck, the compiler that I used is Clion, and when I try to compile my program with the exact codes that you have, but it gives an error says that: "We got a keyboard without any keys (1)", what is the problem?
I have found a solution, but I don't really like it. If you go to 'System Preferences > Security & Privacy > Input Monitoring' and put your app on the list, it will work. However, you have to do it again every time you make a change to the code. If somebody can solve this permanently, please tell
Your character's movement is very clean, how do you do that? When I do it, it seems to have that delay that happens when you write and leave a key pressed, I don't know if you understand what I mean
So my player moves veeery much faster than yours which I guess is because of the different system. Does SFML have some kind of deltaTime that we can multiply the movement with ?
+Sebb subb Yeah, SFML has a clock class which has a Reset().asSeconds() function. If you call this at the beginning of each frame on a clock you will have the delta time. I think that I cover that in episode 10.
I thought the vectors were pixels in unit, but while 'd' is printed on the console ten times the rectangle seems to be moving more than 10 pixels. Why is that?
the 'd's that are printed out when you press and hold a key are _not_ printed once per frame, while the code that checks whether a key is pressed _is_ run once per frame. (Also, the player is moved at 0.1 pixels/frame.) (Also I just realized that you asked this 3 years ago lol)
Your vids are fab. They have really helped me get off the ground, but I got stuck. sf::keyboard is there, but sf::keyboard::key does not exist. I can't find it and the compiler complains when I just type it in and hope. What am I doing wrong? Much appreciated. Moon.
Just to say that I sorted this. Had a brace in the wrong place so the code would only look at the keyboard when the window was being resized or closed. I moved the close brace up and all working ok. There seem to be some syntax variance between this and newer versions too, but nothing massive.
+Tytanium I could do that yeah, but that will mean that it will be harder to find an explanation on a specific subject. Right now it wouldn't be a problem, but the further we get, the longer each subject will take per explanation.
+Tytanium I could do that yeah, but that will mean that it will be harder to find an explanation on a specific subject. Right now it wouldn't be a problem, but the further we get, the longer each subject will take per explanation.
Hilze Vonck But, that will mean more useful info, but Idk, I haven't done a scripted video or anything really in a while... Anyways, all the tutorials have been really good so far, it's really been helpful :)
+Tytanium It would probably work as fine as what I'm currently doing, but I personally like to keep each subject in a separate video. I'm glad that the tutorials have been helpful! :)
Holy shit thank you so much for this comment My program was lagging my computer so hard it could not even play one frame per second, then I used that line and it works very well
these videos are over all amazing i gotta spread the word about this guy
Outstanding videos - beautifully paced, zero bs
understand everything so well, this is the best tutorial ive ever seen on sfml everything makes perfect sense thank you so much, i love this tutorial!
This series is AWESOME!!!! From Vietnam in 2020 :D
Thank you for your videos! Really easy to understand, nice to see some updated SFML Content!.
Subbed and waiting for more :D
l love these tutorials!
l made the player changing color and size when pressing specific keys!!!
this helped me finish my project for school in time, you're awesome!
Thank you for your video. I'm glad to know this channel.
So easy to follow! Thank you so much
you have a very good teaching skill
Your videos are amazing!! :D
I have at least 30 keys, can I detect which key is pressed without using switch or if/elseif and pass the key directly to a single function?
excellent much more fun than using a game engine lol
Thanks great tutorial!
Thank you. thank you! thank you!!
I passed the same floating point values as yours but my player object moves very slow than yours. What's the reason for that?
i know it has passed such a long time but these videos are helping me so much. Could someone explain me why didnt he put keybord inputs inside the event polling?
very useful tutorial
plz help rectangle only moves when i select the console screen and then reselect the graphic window then i can see changes
I want the cube to slowly move step by step from its current position to the mouse position. How would you do that? I can't seem to get how to delay each step in a for loop - as all the steps happen too fast and it looks like instant jump between the 2 positions.
You should look into something called linear interpolation. That will do exactly what you want :)
@@HilzeVonck I want something like time-delay so that we can see as if it is moving, otherwise, it would move so fast
Hello Hilze Vonck, the compiler that I used is Clion, and when I try to compile my program with the exact codes that you have, but it gives an error says that: "We got a keyboard without any keys (1)", what is the problem?
I'm getting the exact same issue (when using MacOS Catalina), did you manage to solve it?
I also have the same issue, MacOS Catalina and CLion...any solution? I will find something
I have found a solution, but I don't really like it. If you go to 'System Preferences > Security & Privacy > Input Monitoring' and put your app on the list, it will work. However, you have to do it again every time you make a change to the code.
If somebody can solve this permanently, please tell
Your character's movement is very clean, how do you do that? When I do it, it seems to have that delay that happens when you write and leave a key pressed, I don't know if you understand what I mean
I already discovered it, I had put all the motion inputs inside pollevents, although I think it shouldn't matter
Can (objectname).move() work with OpenSceneGraph?
Please keep the tutorial videos coming
thank you so much
So my player moves veeery much faster than yours which I guess is because of the different system. Does SFML have some kind of deltaTime that we can multiply the movement with ?
+Sebb subb Yeah, SFML has a clock class which has a Reset().asSeconds() function. If you call this at the beginning of each frame on a clock you will have the delta time. I think that I cover that in episode 10.
You sure did :) Thank you so much for these awesome tutorials I have learned aaalot from them
I thought the vectors were pixels in unit, but while 'd' is printed on the console ten times the rectangle seems to be moving more than 10 pixels. Why is that?
the 'd's that are printed out when you press and hold a key are _not_ printed once per frame, while the code that checks whether a key is pressed _is_ run once per frame. (Also, the player is moved at 0.1 pixels/frame.)
(Also I just realized that you asked this 3 years ago lol)
My shape moves but it returns to his original state. how to fix that?
That probably means that you create the shape in the game loop, not outside
Your vids are fab. They have really helped me get off the ground, but I got stuck. sf::keyboard is there, but sf::keyboard::key does not exist. I can't find it and the compiler complains when I just type it in and hope. What am I doing wrong? Much appreciated. Moon.
Just to say that I sorted this. Had a brace in the wrong place so the code would only look at the keyboard when the window was being resized or closed. I moved the close brace up and all working ok. There seem to be some syntax variance between this and newer versions too, but nothing massive.
Maybe introduce 2 concepts in each video so we don't have to keep waiting for the next episode ;)
+Tytanium I could do that yeah, but that will mean that it will be harder to find an explanation on a specific subject. Right now it wouldn't be a problem, but the further we get, the longer each subject will take per explanation.
+Tytanium I could do that yeah, but that will mean that it will be harder to find an explanation on a specific subject. Right now it wouldn't be a problem, but the further we get, the longer each subject will take per explanation.
Hilze Vonck But, that will mean more useful info, but Idk, I haven't done a scripted video or anything really in a while...
Anyways, all the tutorials have been really good so far, it's really been helpful :)
+Tytanium It would probably work as fine as what I'm currently doing, but I personally like to keep each subject in a separate video.
I'm glad that the tutorials have been helpful! :)
Hilze Vonck :)
Now you've read about COVID-19 even here.
clever
if I don't use
window.setFramerateLimit(60);
then my cpu will run at 100% hahaha
Holy shit thank you so much for this comment
My program was lagging my computer so hard it could not even play one frame per second, then I used that line and it works very well
@@peligros13 Glad it helped someone other than myself! 😍
Why no Sprites?
Because they introduce a level of complexity not needed at this stage. Also, we do not need any special textures, a solid background is good enough.
+1