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.
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.
(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?
(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.
(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.
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.
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.