Python Forum
[PyGame] sound effect delay and program laggy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] sound effect delay and program laggy
#21
I would put the food as a class as well, as that would pull some of that logic out of the main game loop, shortening it even more. And of course im not big on the multiple game states with while loops. But overall, your code is much more easier on the eyes and has some sanity.
Recommended Tutorials:
#22
I managed to fix the sound problem, through minimal editing. I just told the program to initialize pygame.mixer BEFORE pygame and that fixed everything. Just posting this here in case anyone else has the same problem.
#23
(Oct-08-2019, 04:00 AM)xBlackHeartx Wrote: I just told the program to initialize pygame.mixer BEFORE pygame and that fixed everything. Just posting this here in case anyone else has the same problem
You know this answer was stated on post #2 of this thread, right?
Recommended Tutorials:
#24
(Oct-08-2019, 11:19 AM)metulburr Wrote:
(Oct-08-2019, 04:00 AM)xBlackHeartx Wrote: I just told the program to initialize pygame.mixer BEFORE pygame and that fixed everything. Just posting this here in case anyone else has the same problem
You know this answer was stated on post #2 of this thread, right?

Then why did I not see it before? Did you just edit your second post to make it look like you did?

All I remember is you berating me for my programming style, and that I knew nothing about what I was doing, despite spending weeks figuring out how to do this.
#25
(Oct-08-2019, 12:46 PM)xBlackHeartx Wrote: Then why did I not see it before? Did you just edit your second post to make it look like you did?
No the last edit on that was the day the post was made on 9/26. Maybe you were too busy thinking i was berating you instead of actually reading the content i was posting. You could of saved yourself weeks of a headache by taking in what people are trying to teach you instead of being defensive and bullheaded. You will get far by going out of your comfort zone and trying new things. But what do I know? Im just a programmer.
Recommended Tutorials:
#26
You could've modified the date somehow. I've seen people on youtube make posts that were dated far in the future, and sometimes the past. I have no idea how they did it, but I haven't seen it for a few years now, so I would guess they were abusing an exploit that got fixed. Of course, being a mod, you no doubt have access to things that average users like me do not.
#27
No you just overlooked it. At this point this is just going back and forth and not productive to you or anyone who reads this thread in the future so i am closing it.
Recommended Tutorials:


Possibly Related Threads…
Thread Author Replies Views Last Post
  Laggy Game Movement game_slayer_99 12 4,220 Oct-05-2022, 11:34 AM
Last Post: metulburr
Music [PyGame] Chopper wash effect efficiency questions. michael1789 9 4,352 Jan-19-2021, 07:12 PM
Last Post: michael1789
  Appropriately delay this PyGame code kleynah22 2 4,357 Nov-09-2017, 02:00 PM
Last Post: Windspar
  [PyGame] My program is very laggy GamePlanet 6 6,987 Aug-15-2017, 03:00 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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