pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
773 stars 120 forks source link

Add game_popit.py in examples #2798

Open snowfruit opened 2 months ago

snowfruit commented 2 months ago

PopIt

About A beginner pygame example about clicking on balls.

Features

Starbuck5 commented 2 months ago

A bunch of the examples are games, they don't start with game_. Therefore I don't think this one should either.

Starbuck5 commented 2 months ago

What value does this example provide when we have other "basic game" examples like chimp and aliens?

snowfruit commented 2 months ago

A bunch of the examples are games, they don't start with game_. Therefore I don't think this one should either.

Fair. But finding things in the examples are not easy as a young beginner.

"Is arraydemo.py a game? It says demo and on steam a demo is a game. Oh a demo can be a kind of example."

While making "game_popit" I was asked if I knew where the monkey punching game were. The person did not know that chimp is "monkey".

snowfruit commented 2 months ago

What value does this example provide when we have other "basic game" examples like chimp and aliens?

I believe that many of the examples that are here now requires you to know more python than a person just discovering pygame might know. If the code is easy to copy/paste and can be built upon with ease maybe more people will find pygame fun at first try. I tried to write a recognizably, beginner and entry level game that you could copy/paste.

I think chimp is a perfect example for pygame. It is clean, works great. But questions I got when showing it was: "What is os.path.split and os.path.join? Why do I need image = image.convert(). I just loaded my image."

snowfruit commented 2 months ago

Thank you for all the feedback!

Starbuck5 commented 2 months ago

I think chimp is a perfect example for pygame. It is clean, works great. But questions I got when showing it was: "What is os.path.split and os.path.join? Why do I need image = image.convert(). I just loaded my image."

Those are good questions for a beginning user to be asking, because those are important things to know for writing pygame-ce games.

snowfruit commented 2 months ago

I think chimp is a perfect example for pygame. It is clean, works great. But questions I got when showing it was: "What is os.path.split and os.path.join? Why do I need image = image.convert(). I just loaded my image."

Those are good questions for a beginning user to be asking, because those are important things to know for writing pygame-ce games.

I agree. But the questions are being asked the same way a teenager ask why they should make their bed or brush their teeth.

I'm sharing the experience I had using pygame to inspire a young person to learn python. The person was curious but not motivated. Pygame is an excellent way to learn basic python and I tried to sneak in something extra. Such as classes and pooling to see how far I could push it.

Not trying to justify or hype my code, just wanted to share the experience.

Appreciate all the feedback and thanks for taking the time to look at the code. If it don't fit the project, don't hesitate to close/cancel the merge.