new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Godot 4 Patterns · all subjects

animations & tweens

16 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Cursor pulse for text games

Example GDScript for a blinking cursor (▮) indicator at the end of text: make the Cursor node visible and create an infinite looping tween that alternates modulate:a between 0.0 and 1.0 over 0.5 seconds each.

Juice is micro-feedback, not visual noise

Juice refers to sound on every action, tiny animations on click, camera shake on impact, color burst on success, and anticipation before reveal. Two games with identical mechanics can feel completely different based on the presence of juice. Juice makes actions feel responsive rather than being visual noise.

Seven layers of feedback for game feel

Game feel consists of seven layers: (1) audio on every action, (2) visual response to hover/click, (3) anticipation animations, (4) screen shake, (5) particle bursts on success, (6) hit-pause, and (7) color shift on state change.

Button hover and press feedback with tween

Example GDScript code for button feedback: connect mouse_entered to brighten the modulate property (Color(1.1, 1.1, 1.1) over 0.1 seconds) and mouse_exited to return to Color.WHITE over 0.1 seconds using tweens.

Anticipation animation before reveal

Before showing a big reward, build tension by setting particle_burst to invisible (modulate:a = 0.0), pausing for 0.3 seconds (anticipation), then emitting a burst callback and fading in the reward_label over 0.4 seconds.

Screen shake implementation with falloff

Screen shake applies randomized offsets to the camera based on a falloff curve over duration. The offset magnitude decreases proportionally to elapsed time (falloff = 1.0 - t) to create a decaying shake effect. Update every 0.05 seconds. Restore original offset when complete.

Screen shake in narrative games should be subtle

In narrative games, screen shake can be subtle—just a tiny offset on tense reveals rather than dramatic camera movement.

Particle burst at position example

Example GDScript: create a reusable particle pool with GPUParticles2D. To emit at a position, set global_position to the target position, call restart(), and set emitting = true.

Animated text feedback with bounce and fade

Example GDScript for animated text feedback (e.g., '+1 Item'): create a Label, set initial modulate.a to 0.0 and scale to Vector2(0.8, 0.8). Use a parallel tween to fade in modulate:a to 1.0 and scale to Vector2(1.0, 1.0) with EASE_OUT and TRANS_BACK over 0.2 seconds. Chain an interval of 1.0 second, then fade out modulate:a to 0.0 over 0.4 seconds and queue_free.

Hit-pause for impact moments

Example GDScript for hit-pause: set Engine.time_scale = 0.0, await a timer created with get_tree().create_timer(duration, true, false, true).timeout, then set Engine.time_scale = 1.0. A 0.05 second pause feels like a punch. Use only for impact moments, not routine actions.

Color tinting for state changes

Example GDScript: gradually tint elements based on game state. For low health, tint toward Color(1.0, 0.7, 0.7) (reddish). Apply tint to WorldRoot.modulate or similar. In narrative games, tint the terminal background slightly during tense scenes.

Typewriter effect for text games

Example GDScript: set RichTextLabel.visible_characters = 0 and text = target text. In a loop, increment visible_characters and await get_tree().create_timer(speed).timeout (default speed 0.02 seconds per character) until visible_characters reaches text.length().

Per-character audio during typewriter effect

While executing a typewriter effect, play a soft 'tick' sound every 3 characters by checking if (label.visible_characters % 3) == 0 and calling audio.play_sfx('type_tick').

Audio layer hierarchy for richness

Organize audio into layers: master, music (loops, soft), ambient (room sounds, wind, hum), sfx (UI clicks, action confirms), and voice (character speech). Each layer should have its own volume slider in settings so players can control each independently.

Polish checklist before release

Pre-release polish checklist: all buttons have audio on press and hover state; all text appears with consistent timing; all transitions have fade or animation; all actions have visual or audio feedback; no harsh sounds; no 'dead air' silence; volume sliders tested at 0% and 100%; achievements don't interrupt action; loading screens under 500ms disappear without showing.

Reference games for juice study

Study these games for juice: Vampire Survivors (every kill/item/level has audio + visual), Celeste (instant visual response to input), Disco Elysium (subtle skill-check pause, card-flip animation, satisfying sounds), Citizen Sleeper (dice roll has audio + visual + slight pause).

Give your agent this brain