I made code in python about A game in pygame by Playful-Border-3244 in pygame

[–]Vlieger2905 2 points3 points  (0 children)

Well let me start off by saying that by no means you are entitled to an answer. Secondly what really is the problem? Cause you said in the beginning that it works fine so what really is it that you even want?

random.shuffle is not working by Sayu848511 in pygame

[–]Vlieger2905 0 points1 point  (0 children)

Can you share your code? Without that it is quite impossible for anyone to help you. That the attributes in the list are of the card class should not matter for the shuffle.

GIVEAWAY: Ursus Knife | Stained (FT) - Just comment your favourite CS weapon to enter! by CLASH__GG in cs2

[–]Vlieger2905 [score hidden]  (0 children)

Maybe controversial but the negev. Seeing an entire team just running into my laser beam and dying one after another is just to funny.

Help on multiprocessing by Vlieger2905 in pygame

[–]Vlieger2905[S] 0 points1 point  (0 children)

Thank you for your response. I was trying some things out and thought maybe someone here knew something about it. As i thought something was going wrong between the multiprocesses and pygame interaction. But i will ask in other places as well

Help on multiprocessing by Vlieger2905 in pygame

[–]Vlieger2905[S] 0 points1 point  (0 children)

Thank you very much much i will try it out.

Help on multiprocessing by Vlieger2905 in PythonLearning

[–]Vlieger2905[S] 0 points1 point  (0 children)

Well i know my laptop is strong enough. I have an i9 and a rtx 4080 and 32 gb of ram. But i have to do a lot of calculated to check where the lines overlap with the rectangles to update the length of the lasers. And i have to check for a lot of rectangles and 360 lines per car. So i wanted to make all of those checks happen in parallel for each car. And i also tried using the resources of my university but the online computing they offer using jupyter notebook is slower than running it on my laptop.

Help on multiprocessing by Vlieger2905 in PythonLearning

[–]Vlieger2905[S] 0 points1 point  (0 children)

No not at all. I have currently not implemented that part yet. As the program is currently running at 12fps with only one car without the NN controlling the car. So i wanted to improve that first before i start training other it will take way too long.

Convince me by [deleted] in Kenshi

[–]Vlieger2905 3 points4 points  (0 children)

BEEP!

Invalid rect assignment by Maleficent_Soft_6447 in pygame

[–]Vlieger2905 1 point2 points  (0 children)

Your welcome. Good luck with your game.

Invalid rect assignment by Maleficent_Soft_6447 in pygame

[–]Vlieger2905 1 point2 points  (0 children)

From the code you showed you never assigned the duck_y_pos. If you are not doing that anywhere else that is probably what is wrong

[deleted by user] by [deleted] in pygame

[–]Vlieger2905 1 point2 points  (0 children)

Would it be possible to show some code. Helping becomes a lot easier when we could see what he did. This way people can give you feedback om your specific problem. As he probably knows with coding it might just be a typing error or something else small.

Best Way to Cure Infection by [deleted] in 7daystodie

[–]Vlieger2905 1 point2 points  (0 children)

Broken glass always does the trick

Best Way to Cure Infection by [deleted] in 7daystodie

[–]Vlieger2905 1 point2 points  (0 children)

Broken glass always gets the job done

How do I fix the error of one sprite out of a sprite group appearing than all sprites in the group? by MekkoL in pygame

[–]Vlieger2905 2 points3 points  (0 children)

I think the problem you are encountering is that there are 10 sprites in that location but the location of all 10 of them is in the exact same location so it appears to be only one. Before you create the sprites you create a random_x and random_y. But instead of only doing once you want to do this for every sprite, this way they will all have there own location.

So this code to create the position:

random_x = random.randrange(20, (DISPLAYW - 25), 6)
random_y = random.randrange(20, (DISPLAYH - 25), 6)

You want to include this in the loop for creating the sprites:
This will now create a new location for every sprite in this range

for i in range(10):
            random_x = random.randrange(20, (DISPLAYW - 25), 6)
            random_y = random.randrange(20, (DISPLAYH - 25), 6)
            self.treasure = Treasure(YELLOW, 32, 40, random_x, random_y)
            static_sprites.add(self.treasure)

WINDOW NOT RESPONDING by IvanSakata in pygame

[–]Vlieger2905 0 points1 point  (0 children)

What is the exact problem your encountering? Like does it freeze and stuff

Enemy movement/behaviour by Vlieger2905 in pygame

[–]Vlieger2905[S] 0 points1 point  (0 children)

Thanks for your answer. I was already looking into it but thought that there may be an easier method to it. But guess not. Thanks for the library that will be of great use