Python Forum
My game's code works but Python still freezes at random intervals.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My game's code works but Python still freezes at random intervals.
#11
(Nov-25-2021, 02:33 PM)metulburr Wrote: You really should use github so people can run the code without having to downloaded every single file. as well as have access to the images.
I've attached all the Python files, images, sounds, and text files I used to the link below.
https://github.com/GameSlayer99/PepePong
Reply
#12
I also just noticed that I am unpausing the main track every single time the main loop restarts in game_functions.py, line 12. Could this hurt my performance as well?
Reply
#13
I was able to resolve the issue. I moved all sound file loading commands to a single class so that they weren't being loaded every time the sound file is played. I also deleted the line of code that made the main music replay every cycle through the main loop. My game hasn't crashed once since making these adjustments. Thank you all for the help.
nilamo and metulburr like this post
Reply
#14
Glad you fixed it. You made it farther than some who assume python is too slow and switches languages before realizing their mistake. I'm sure they are out there now doing the same bottlenecks in C++ wondering why their game is lagging/crashing.
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  From python game in terminal to a website game using bottle Njanez 0 3,832 Aug-13-2021, 01:11 PM
Last Post: Njanez
  Pygame freezes after certain time GJG 2 5,233 May-06-2021, 10:52 AM
Last Post: GJG
  Game “Pong” I have problems with the code BenBach18 2 3,449 Jan-10-2021, 05:16 PM
Last Post: michael1789
  Bringing My Game Code Into Class Format ZQ12 1 2,163 Dec-22-2019, 05:32 AM
Last Post: michael1789

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020