In Episode 6 of the Snake Rewind devlog we add a small feature that makes a huge difference: animated score text. With just a bit of scaling, rotation and timing our static “LENGTH: N” label becomes a punchy, reactive UI element that enhances the entire game feel.
What We Covered
- Added a
"LENGTH: N"score label using the arcade font at size 32 - Positioned it top center and adjusted for pixel alignment
- Applied animated scaling and rotation when the score increases
- Reset the animation using a timer and
lerpto bring it back to normal - Ensured the visual feedback is tied directly to game events (eating food)
This kind of micro feedback is what makes Snake Rewind feel responsive and alive.
Design Insights
- UI animations can be small but impactful when timed to player actions
- Text drawing in Raylib requires extra care with alignment (top-left anchor)
rlPushMatrix()/rlScalef()/rlRotatef()give you flexible per element transforms- Using a center aligned origin lets you animate from the middle of the text
Implementation Highlights
DrawTextEx()for rendering custom fonts- Manual origin correction so animations pivot around center
- A
scoreEffect.durationvariable drives animation timing - Lerp used to ease
scaleandangleback to normal over 0.3s
Why This Matters
UI feedback like this makes eating food feel good. The moment you grow, the score text pops and wiggles. It’s subtle, satisfying and immediate. And it’s one of the common steps when building juicy and responsive gameplay.
What’s Next?
In Episode 7 we’ll start layering on shader based postprocessing. We’ll begin with a glowing bloom effect that makes our game world shine.