New answers tagged

0

I would try making sprites, but if your new to pygame and python that can be a complicated idea. What I wuld do then is draw a rect around your paddles that have the same position as your paddles so the rects will follow the paddle. Afterwords Id put a rect around the ball. Then make a collision detection that sais. if ball_rect.collidepoint(x,y): ...


2

Ok so first follow this tutorial. Then i wrote some code to try and test it out. C# code. I used the editor example from the tutorial but you can make it run during runtime or what ever: [MenuItem("Python/LoadFromFile")] public static void ReadFile() { var ScriptEngine = IronPython.Hosting.Python.CreateEngine(); var ScriptScope = ...


0

Yes you can, but instead of working directly with pywin32 for Windows which is a pain in the ass you can use pywinauto, it allows you to send mouse and keyboard actions to windows accesing their widgets/controls directly, which is better but it's not crossplatform just for Windows. Or you can use PyAutoGUI for (Windows, OSX, Linux), which instead of sending ...


0

I hope I understood your question correctly. What I gathered was that you have an Unity game, and you want to have a Python script that provides input to the game instead of a human playing the game. Is that right? In that case, yes, you can use a Python script to provide input to the game. The task isn't very pleasant, but yes, it can be done. Basically ...



Top 50 recent answers are included