Hey thank you for that super nice comment! I felt like I covered what I needed to cover nicely in this time but I definitely have a lot of longer PyGame tutorials on the channel too! 😁
Hi, the circle doesn’t flicker for me - check to make sure it’s not underneath some conditional like over indented, sometimes I leave commands that should run every loop indented under the for event in PyGame.event.get()
I'm actually making a fighting game in which the mouse is used for the directional inputs, first, I wonder if there's a way to track the mouse position even if it's not hovering over the screen, in fact, I really want to get the motion of it instead of the position because then it wouldn't be bound by even the size of the monitor, and it would let me set mouse sensitivity to anything I want, instead of what the computer offers, is there any way to track that raw motion?
Yeah basically you would just want an array of the past mouse positions and calculate a vector showing direction and speed based on several past mouse positions! If you watch my video on realistic physics in Python with Pygame I do something exactly like thisb
Hi yeah, try the command .get_rect with your sprite! So sprite_img.get_rect() which will give you the x and y top left coordinates and also the width and height! Goodluck!
Hi, you need to make sure your rect definition is formatted Rect((xstart, ystart), (width,height)) It looks like you may be missing an apostrophe layer around your width and height!
@@lemastertech it's working when i boot like that pygame.draw.rect(surface, (255,255,255), pygame.Rect(30,30, 120, 30)) but i cant figure out how to set mouse position
Hi, if you want to check out my patreon, my patreon subscribers get direct messaging access. When I make a discord server it will probably be available to all tiers of my Patreon supporters!
My computer is 10 years old and the latest python version i can run is 3.4.3 and no modules work when i try to install them. :( I'm having second thoughts about learning Python now....
Well my friend that’s less of an issue with python and more a problem with your computer! If you were to try and run C#, C++, visual studio, Unity, or even sql on a 10 year old machine you may have some compatibility problems! Good luck!
@@lemastertech yeah I just figured if I could download a python version from that time and modules from that time that it would still work. But appently not. Would have saved me a lot of time if they just didn't have the old versions available for download in the first place since I just sunk a month into learning python and finding out I can't do much with it.
@@lemastertech I found the solution. The .whl files are no different than .zip files and they just have to be renamed to .zip and extracted into the Lib\site-packages directory. Seems like this should be among the first things to do when pip doesn't work, rather than all the other useless technical bullshit people recommend. I found only one post mentioning doing this. Everyone else was talking about doing all sorts of complicated crap that didn't work.
Nice short and to the point, good job as usual :)
Thanks Dale! Tried to put together some useful tutorials ahead of time! Seems like the previous one has gotten a bit of attention as well!
amazing video, I can see this video being lengthened to 8 minutes whilst still being quick useful as heck. I honestly wouldn't mind.
Hey thank you for that super nice comment! I felt like I covered what I needed to cover nicely in this time but I definitely have a lot of longer PyGame tutorials on the channel too! 😁
hey just wondering is there a way to make the circle stop flickering
Hi, the circle doesn’t flicker for me - check to make sure it’s not underneath some conditional like over indented, sometimes I leave commands that should run every loop indented under the for event in PyGame.event.get()
Very useful and quick because I was trying to make an
if clicked destroyer game to protect something. Good job
Glad you found it useful, that sounds like an awesome game!! Goodluck making it!
I'm actually making a fighting game in which the mouse is used for the directional inputs, first, I wonder if there's a way to track the mouse position even if it's not hovering over the screen, in fact, I really want to get the motion of it instead of the position because then it wouldn't be bound by even the size of the monitor, and it would let me set mouse sensitivity to anything I want, instead of what the computer offers, is there any way to track that raw motion?
Yeah basically you would just want an array of the past mouse positions and calculate a vector showing direction and speed based on several past mouse positions! If you watch my video on realistic physics in Python with Pygame I do something exactly like thisb
Hello do you know how i can get the position and show the X coordinate and the Y of a sprite? Thanks you very much
Hi yeah, try the command .get_rect with your sprite! So sprite_img.get_rect() which will give you the x and y top left coordinates and also the width and height! Goodluck!
Is there any way to get the position x and position y of the mouse position?
Yes try coords = pygame.mouse.get_pos() it will give you x and y coords as a tuple
@@lemastertech tysm
@@ThangHoang-fl9cg no problem!
thank you!! exactly what I needed :)
Awesome!! You are welcome, thanks for watching! :)
i tried this but it doesn't work
pygame.draw.rect(surface, (255,255,255), pygame.Rect(mouseposition, 120, 30))
Hi, you need to make sure your rect definition is formatted Rect((xstart, ystart), (width,height))
It looks like you may be missing an apostrophe layer around your width and height!
@@lemastertech it's working when i boot like that
pygame.draw.rect(surface, (255,255,255), pygame.Rect(30,30, 120, 30))
but i cant figure out how to set mouse position
@@Dyotar0 well you can find mouse position using pygame.mouse.get_pos(), and that will return the x and y coord of the mouse as a tuple
@@lemastertech sorry that's my first rodeo
@@Dyotar0 no problem! Welcome to the rodeo!
i think you should have made short for this
Might have been a good idea! I am on holiday this whole week traveling so I prerecorded this tutorial!
how can i communicate with you
Hi, if you want to check out my patreon, my patreon subscribers get direct messaging access. When I make a discord server it will probably be available to all tiers of my Patreon supporters!
But if it’s something simple you can always send me a TH-cam comment!
@@lemastertech bro it is not possible for me to be your Patreon supporter
@@Tech_Brigadier that is fine I'm not trying to force anyone to be one!
My computer is 10 years old and the latest python version i can run is 3.4.3 and no modules work when i try to install them. :(
I'm having second thoughts about learning Python now....
Well my friend that’s less of an issue with python and more a problem with your computer! If you were to try and run C#, C++, visual studio, Unity, or even sql on a 10 year old machine you may have some compatibility problems! Good luck!
@@lemastertech yeah I just figured if I could download a python version from that time and modules from that time that it would still work. But appently not.
Would have saved me a lot of time if they just didn't have the old versions available for download in the first place since I just sunk a month into learning python and finding out I can't do much with it.
@@lemastertech I found the solution.
The .whl files are no different than .zip files and they just have to be renamed to .zip and extracted into the Lib\site-packages directory.
Seems like this should be among the first things to do when pip doesn't work, rather than all the other useless technical bullshit people recommend.
I found only one post mentioning doing this. Everyone else was talking about doing all sorts of complicated crap that didn't work.
@@undeadpresident great job!! Thank you for the info I’m glad you found it out, sorry I hadn’t seen that before!!
good job
Thank you! Cheers!