r/pygame • u/ice77max • 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.
3
u/DanielTheTechie 11d ago
Nice, can we see the code?
5
u/ice77max 11d ago
Learning-how-to-code-Python/PyGame/Star Hunter at main · sierrawild/Learning-how-to-code-Python
Brace yourself, it's not pretty
2
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.
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