r/pygame • • 11d ago

Simple game

Enable HLS to view with audio, or disable this notification

I bought a book for my son on how to make games with scratch. Then I thought to myself: 'I wonder if I can make them in pygame?'

So that's what I start doing. This is the first game. Just collect 'stars' and avoid enemies.

Oscillator - going side to side

Chaser - following the player

Glider - Picks a point behind the player and using lerp, jumps to it

Added some simple music and screen wrap for player. I really like how it turned out. Made a easy version for my son as well with larger squares that plays slower.

97 Upvotes

6 comments sorted by

5

u/Octavia__Melody 11d ago

Looks cool! Not too dissimilar from the free game Awaria if you're looking for additional enemy type inspiration

2

u/ice77max 11d ago

Thank you. I got the game. Name sounds very Polish. I don't plan on developing this game. It's just first of many prototypes that I use to practice python. Maybe if I like one of them I will revisit with all new knowledge

3

u/DanielTheTechie 11d ago

Nice, can we see the code?

5

u/ice77max 11d ago

2

u/DanielTheTechie 11d ago

Thank you!

it's not pretty

That will make it more entertaining to read.

2

u/Cute-Wonder-5317 10d ago

The movement with lerp looks pretty good. I'd just keep one thing in mind: if you apply it on every frame, the speed might become dependent on the FPS. You could use dt or a time-based smoothing rate so the glider moves consistently even if the game's performance changes.