Procedural Animations in Mobile Apps: Implementation and Optimization

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Procedural Animations in Mobile Apps: Implementation and Optimization
Complex
~3-5 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    745
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1161
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    563

Imagine a user dragging a finger across the screen, leaving a trail of 500 particles—each reacting to speed and direction with a 100 ms delay. Or a background pattern smoothly deforming without repetition at 120 FPS. Keyframes fall short for such tasks; you need a different approach. We specialize in algorithmically generated animations that run on the GPU and keep the UI responsive. We guarantee a smooth 60 FPS, even on devices five years old. Our tech stack includes Metal and OpenGL ES, with Flutter using Impeller. With over 50 successful projects featuring procedural animations—from games to educational apps—we deliver cost savings of up to 40% compared to frame-by-frame effects. Our solutions cover iOS, Android, Flutter, and GPU animations across all platforms.

When to Use Procedural Animations

Procedural animations are justified when:

  • The animation reacts to input in real time (touch, accelerometer, microphone)
  • The animation depends on data unknown ahead of time (weather charts, heart rate)
  • Infinite variation is needed—keyframes are impractical
  • A "living" background or ambient animation is desired

How Procedural Animations Solve Dynamic Content Problems

Procedural animations compute every frame algorithmically rather than playing back pre-recorded frames. This yields infinite variation without increasing app size. For example, Verlet integration simulates inertia and springs for "stretching" elements that follow the finger with a delay. Perlin noise creates organic patterns without obvious repetition.

Particle Systems Across Platforms Comparison

Platform Built-in tools Custom implementation Performance
iOS (Swift) CAEmitterLayer + CAEmitterCell Metal compute shader Excellent: GPU acceleration, 120 FPS
Android (Kotlin) No built-in particle engine OpenGL ES GLSurfaceView, Canvas + Choreographer Good: requires manual optimization
Flutter (Dart) particles_flutter, flame CustomPainter + AnimationController Good: supports Impeller GPU
React Native (TS) react-native-confetti react-native-skia (Skia Canvas) Average: depends on bridge

On iOS, Apple's documentation notes CAEmitterLayer as the most performant for simple emitters—twice as fast as SpriteKit on CPU. However, each particle is identical; for unique behavior we write Metal shaders. On Android, we use OpenGL ES for complex systems. In Flutter, recent GPU API support accelerates noise animations by 30%. On older devices like iPhone 6s, frame time stays under 8 ms.

Physics Simulation: Springs and Inertia

Procedural animation based on physics goes beyond spring(dampingRatio:). It involves numerical integration of equations of motion each frame.

A basic spring system (Verlet integration):

// Update every frame via CADisplayLink
func update(dt: Double) {
    let springForce = (targetPosition - currentPosition) * stiffness
    let dampingForce = velocity * -damping
    let acceleration = (springForce + dampingForce) / mass
    velocity += acceleration * dt
    currentPosition += velocity * dt
}

This yields behavior not limited by library parameters: you can set any mass, stiffness, damping. Used for "stretching" elements following the finger with delay, hair/tail animation, flags.

Implementation details on Android On Android, we use `ValueAnimator` with a custom `TypeEvaluator` for numerical integration. For complex systems, we employ `RenderScript` or OpenGL ES compute shaders. Example spring settings: `stiffness = 100`, `damping = 10`, `mass = 1`.

Noise Algorithms for Organic Motion

Perlin noise and Simplex noise are the foundation for organic ambient animations: a background "breathing" without repeating patterns, a shape slowly deforming, a color smoothly shifting.

Algorithm Dimension Performance Application
Perlin noise 2D/3D Medium (CPU > GPU) Textures, landscapes
Simplex noise 2D/3D/4D High (GPU friendly) Organic motion, fluids

Example noise calculation on iOS via simd:

// Simplex noise function → float value in [-1, 1]
let noiseValue = simplexNoise2D(x: Float(time * 0.3), y: Float(index) * 0.5)
let yOffset = noiseValue * amplitude

In Flutter—use the noise package or write in Dart. In Flutter shaders (with GPU support)—float noise(vec2 p) directly in GLSL.

What's Included in the Work

  • Define the animation algorithm based on specs or references.
  • Implement with optimization for target FPS. Goal: frame time < 8 ms for 120 Hz, < 12 ms for 60 Hz.
  • Integrate with the app's event system (input, data updates).
  • Profile via Instruments or Android Studio Profiler.
  • On iOS—GPU utilization < 60% at idle.

Want such animations? Get a consultation for your project.

Work Process

  1. Analysis: clarify requirements, references, target devices. Determine target FPS—typically 60 or 120 Hz.
  2. Algorithm design: choose method (particles, physics, noise) and estimate performance.
  3. Implementation using native stack (Metal, OpenGL ES, Skia).
  4. Testing on real devices with profiling.
  5. Deployment with CI/CD integration.

Timeline: from 3 to 5 days depending on complexity of the physics model and number of platforms. Cost is calculated individually—contact us to evaluate your project.

Our team has 10+ years of experience in mobile development and has completed over 50 projects with procedural animations. We guarantee compliance with App Store Review Guidelines and high code quality.

Order procedural animations for your app—get a consultation for your project today. We help implement dynamic effects without performance loss.

Animations in Mobile Apps: Lottie, Rive, Spring, and Reanimated

We've built animations for dozens of projects — from game interfaces to bank-grade applications. We know how to achieve 120 fps even on Android with ProGuard. If an animation stutters, the problem isn't the tool but the approach. Below we show how we choose between Lottie and Rive, why Spring physics beats UIView.animate, and how Reanimated 3 pushes 60 fps on older devices. Get a consultation for your project — we'll assess the animation layer for free.

Why does UIView.animate break on complex scenarios?

UIView.animate(withDuration:) and ObjectAnimator on Android are fine for simple transitions. But as soon as the animation becomes interactive (user drags an element, speed depends on gesture), a different approach is needed.

On iOS, the right tool for gesture-driven animation is UIViewPropertyAnimator. It allows pausing, reversing, and modifying the animation in progress. A typical use case: a bottom sheet that follows the finger, continues with inertia after release, and snaps to the nearest position. With UIView.animate, this is either not possible or requires manual physics.

In SwiftUI, withAnimation works out of the box, but interactivity is limited — there's no direct analog to UIViewPropertyAnimator. A workaround is using .gesture(DragGesture()) + @GestureState + explicit position calculation. Or move to SwiftUI Animations API with Animation.spring(duration:bounce:) from iOS 17.

How does React Native Reanimated bypass the JS bridge?

React Native Animated API executes animations on the JS thread — this causes jank when the bridge is busy. Reanimated 3 solves this with worklets: functions that compile and run directly on the UI thread without crossing the JS bridge.

Example: parallax scroll header. With basic Animated.Value, fast scrolling drops FPS to 40-45 on mid-range Android. With Reanimated using useAnimatedScrollHandler, it stays at a stable 60 fps because all position calculations happen on the UI thread.

Reanimated 3 with useSharedValue, useAnimatedStyle, and withSpring/withTiming is the current standard for animations in React Native. Gesture Handler v2 is tightly integrated: useAnimatedGestureHandler replaces PanResponder and also runs on the UI thread.

Why can Lottie reduce FPS on Android?

Lottie exports After Effects animation as JSON. On iOS with lottie-ios it's stable, but on Android, complex effects (blur, particles, gradients) via Canvas rendering can cause drops to 30-40 fps. The solution: either simplify the animation or use Rive with hardware rendering. We tested: a 5 MB Lottie file with blur on Xiaomi Redmi Note 10 gave 48 fps, while the same animation in Rive (.riv 400 KB) gave 60 fps.

Lottie vs Rive: What to choose for interactive interfaces?

Both tools solve the task of "designer creates animation, developer adds the file." But they differ fundamentally.

Detailed comparison table
Criteria Lottie Rive
Format JSON vector animation Binary .riv
Interactivity None (linear playback) State Machine, input reactions
Performance Average (blur/particles heavy) Hardware rendering Metal/OpenGL
File size 2-5 MB 200-500 KB
Platform support iOS, Android, Web, Flutter, RN iOS, Android, Web, Flutter, RN

The choice is simple: static decorative animation (splash screen, onboarding illustrations) — Lottie. Interactive UI elements with states — Rive. For example, a button with hover, pressed, loading, success states — one Rive animation with four states versus four separate Lottie files.

Spring physics and Hero transitions: how to achieve naturalness?

Spring animation feels natural because it simulates physics — mass, stiffness, and damping. In SwiftUI: Animation.spring(response:dampingFraction:). In Android Compose: spring(dampingRatio = Spring.DampingRatioMediumBouncy).

For Hero transitions (an element "flies" between screens), on iOS use UIViewControllerTransitioningDelegate + UIViewControllerAnimatedTransitioning. In SwiftUI with iOS 17 — matchedTransitionSource + navigationTransition(.zoom). On Flutter — Hero widget, which works out of the box.

How to avoid common mistakes in Hero transitions?

The animation starts fine, but on the target screen the element "jumps" to the final position. The reason: AutoLayout constraints are applied before the animation completes. Solution: call layoutIfNeeded() inside the animation block or use transform instead of frame changes.

What's included: animation layer turnkey

  • Integration of Lottie/Rive files into the design system
  • Code for gesture-driven transitions (bottom sheets, drawers, carousels)
  • Testing on real devices (iOS 15–17, Android 10–14)
  • Animation documentation (architecture, state keys)
  • Support for design updates (30-day warranty)

We have 5+ years of experience in mobile development, over 30 projects with animations, certified iOS/Android developers.

Timelines

  • Basic screen transitions and micro-interactions — 1 week.
  • Lottie/Rive integration with design system — 3-5 days after receiving final files.
  • Custom gesture-driven interactivity (sheet, drawer, physics carousel) — 1-2 weeks.

Contact us — we'll add animations turnkey in 2 weeks. First consultation is free.