Well, something
I prefer last pyweek's entry, though I had a couple people who said there was "inappropriate material" in the simple ball game.This game was suitably easy to develop and works. The ending, if you lose (less than 0 cash), is just the game to collapse. Didn't have time to engineer anything better.
It is a fairly difficult game after fine tuning. Hope people like it more than I expect this pyweek!
(log in to comment)
Comments
I did not have these problems when running it. I ran with both python 2 and 3 but I can’t get you their versions or the version of pygame right now.
I don’t know why I didn’t need pygame.mixer.init on my end to run. For some reasons it worked anyways. I had considered adding it when some sounds were breaking, but it turned out to be corrupted sound files, not lacking pygame.mixer.init.
I am pretty certain I made the game frame rate independent by multiplying by dt. I say “pretty” because I always like to give the benefit of the doubt in programming to doubt. I might just not know what I’m doing. but it ran on my system with nice rates so I’m sorry it isn’t working for you.
One group of coins fall at regular intervals. Another two positive groups drop with time delays based on sampling an exponential distribution. If you get the hexagon shaped ones, it creates a barrage of coins to get you cash. There is one negative vale coin. It is a black donut. If you get it, a barrage of fire comes down on you quickly, and you end up losing a lot of cash. If you don’t get it, your cash goes to 0. So it is a tough choice.
Hope you can you the game working. Again sorry, I wish i could fix it. Competition is over now otherwise I would try to handle it.
I did not have these problems when running it. I ran with both python 2 and 3 but I can’t get you their versions or the version of pygame right now.
I don’t know why I didn’t need pygame.mixer.init on my end to run. For some reasons it worked anyways. I had considered adding it when some sounds were breaking, but it turned out to be corrupted sound files, not lacking pygame.mixer.init.
I am pretty certain I made the game frame rate independent by multiplying by dt. I say “pretty” because I always like to give the benefit of the doubt in programming to doubt. I might just not know what I’m doing. but it ran on my system with nice rates so I’m sorry it isn’t working for you.
One group of coins fall at regular intervals. Another two positive groups drop with time delays based on sampling an exponential distribution. If you get the hexagon shaped ones, it creates a barrage of coins to get you cash. There is one negative vale coin. It is a black donut. If you get it, a barrage of fire comes down on you quickly, and you end up losing a lot of cash. If you don’t get it, your cash goes to 0. So it is a tough choice.
Hope you can you the game working. Again sorry, I wish i could fix it. Competition is over now otherwise I would try to handle it.
self.dt = self.clock.tick(30)
I don't know why it runs fine on my machine, but now that I look, Richard Jones tutorial includes the self.clock.tick in every loop.
I've always done it this way, and it has always worked fine. I'm running a MacOS which might make the difference.
I didn’t experience the frame rate problem, so I don’t know what anyone is being frustrated with. I could imagine not scoring a game well if it “worked”, but didn’t really work for me. I crashed the game if it lost, simply because I didn’t have enough time to really make a losing ending to restart. Considering I’ve seen games that have no winning or losing or multiple screens, I figure most players would think “whatever”.
The simple fact is, you can’t really lose the game as long as you know to let the blacks pass if they might wipe you below zero. But if you do, you go back to zero, and essentially are restarting. So the game becomes frustrating. Because of the nature of exponential distributions, you actually don’t know exactly how hard the game will be. In other words, it may seem easier or more difficult, but it is entirely random. If you just play long enough eventually you will win. I tried to make “long enough” as long as this game remains fun. That is honestly about 3 minutes. In 3 to 10 minutes, you should have played the game, beat the game, and moved on with your life.
rdb on 2018/10/29 12:01: