In short
A game engine is a reusable software framework that supplies rendering, physics, animation, audio, input, UI, scripting, asset management and build tooling so a team builds a game or interactive product instead of writing an engine. Unity (C#, GameObject-Component model) and Unreal Engine 5 (C++ plus Blueprints, Actor model) together hold most of the Indian studio market and are the two engines named in almost every AVGC job advertisement. The topic is examined in B.Sc Animation / B.Des game-design papers as "game engine architecture and pipeline" and tested in placement rounds at Ubisoft Pune/Mumbai, Rockstar India (Bengaluru), Zynga, SuperGaming, Nazara/Nodwin, Dream11, Lakshya Digital (Keywords Studios), Technicolor/Prana, Sumo Video Games and XR firms like Tata Elxsi and Infosys/TCS metaverse units. Marks and interview time go mostly to the component model, the frame budget and the optimisation levers (draw calls, LODs, texture memory), not to tool clicking.
Explained
What an engine is, and its subsystems
- Engine vs game: the engine is the runtime plus editor; the game is data (scenes, assets) plus scripts the engine calls. The same engine ships a game, an architectural walkthrough or a training simulator.
- Core loop: every frame the engine does input → script/gameplay update → physics step → animation → culling → rendering → audio → present. One pass of this is a frame.
- Subsystems: renderer (rasteriser, now also ray tracing), physics, animation, audio, input, UI, networking, asset/resource manager, scripting VM, serialisation, editor and build pipeline.
- Classification: general-purpose (Unity, Unreal, Godot, CryEngine), in-house/proprietary (RAGE, Frostbite, Decima, Anvil), 2D-focused (GameMaker, Cocos2d-x, Defold) and web/instant (Phaser, PlayCanvas).
- Scene graph: a hierarchy of nodes each carrying a transform (position, rotation, scale). A child's world matrix = parent world matrix × local matrix.
- Coordinate conventions (exam favourite): Unity is left-handed, Y-up, 1 unit = 1 metre. Unreal is left-handed, Z-up, 1 Unreal unit = 1 centimetre. Rotations are stored as quaternions internally and shown as Euler angles in the editor.
Unity: architecture and workflow
- GameObject-Component (composition): a GameObject is an empty container; behaviour is added as components (Transform, MeshRenderer, Collider, Rigidbody, AudioSource, custom scripts). Favour composition over deep inheritance.
- MonoBehaviour lifecycle order:
Awake→OnEnable→Start→ (loop)FixedUpdate(physics rate) →Update(per frame) →LateUpdate(after animation, used for cameras) →OnGUI/render →OnDisable→OnDestroy. Coroutines yield at defined points (WaitForSeconds,WaitForEndOfFrame). - Prefab: a saved GameObject template instantiated many times; prefab variants and nested prefabs let one change propagate to all instances.
- Scripting: C# compiled by Roslyn, run on Mono (fast iteration) or converted to C++ by IL2CPP (required for iOS, WebGL, consoles; faster, harder to decompile).
[SerializeField]exposes private fields in the Inspector. - Render pipelines: Built-in (legacy), URP (Universal - mobile, VR, mid-range, scalable) and HDRP (High Definition - PC/console, physical lights in lux/nits, volumetrics). Shaders authored in HLSL or visually in Shader Graph. Pipelines are not interchangeable: materials must be converted.
- Other key systems: Mecanim animator state machine with blend trees, Timeline + Cinemachine for cinematics, Physics (PhysX) and 2D physics (Box2D), Input System package, UI Toolkit / Canvas UI, Addressables for memory-safe asset loading and patching, Burst + Jobs + ECS (DOTS) for data-oriented, cache-friendly code at scale (crowds, RTS units).
- Strengths: 2D and mobile, fast iteration, huge Asset Store, broadest platform list (Android, iOS, WebGL, consoles, Quest), gentler learning curve, dominant in Indian casual/hyper-casual and ad-SDK work.
Unreal Engine 5: architecture and workflow
- UObject / Actor-Component:
UObjectis the reflected base class (garbage collection, serialisation, networking). An Actor is anything placeable in a level; Components attach to it; a Pawn is possessable, a Character adds a capsule and movement component;GameMode,PlayerController,GameStatedefine rules. - Reflection macros:
UCLASS,UPROPERTY,UFUNCTION,USTRUCTlet the Unreal Header Tool expose C++ to the editor, Blueprints and replication.BlueprintCallable,EditAnywhere,Replicatedare common specifiers. - Blueprints vs C++: Blueprint is a node-based visual script, compiled to bytecode on a VM - fast to author, slower per node. Standard practice: systems and heavy loops in C++, tuning and glue in Blueprint, with C++ base classes extended by Blueprint children. Nativisation of Blueprints was removed in UE5.
- UE5 headline features: Nanite virtualised geometry (streams clusters of triangles, removes most manual LOD work for static meshes), Lumen real-time dynamic global illumination and reflections, Virtual Shadow Maps, World Partition with Level Instances and Data Layers (replaced old level streaming), MetaHuman digital humans, Niagara VFX, Chaos physics and destruction, Control Rig and Animation Blueprint, Sequencer for cinematics and virtual production, MetaSounds procedural audio, TSR temporal super resolution (with DLSS/FSR plugins).
- Replication model: authoritative server,
Replicatedproperties, RPCs (Server,Client,NetMulticast) - the reason Unreal dominates multiplayer shooters. - Strengths: photoreal 3D, cinematics, virtual production (LED volumes used in Indian film and ad work), architecture/automotive visualisation, source-code access in C++.
Rendering and performance - the shared engineering core
- Frame budget: a target frame rate fixes the time available per frame; everything (CPU gameplay, physics, animation, render thread, GPU) must fit inside it. Optimise the bottleneck - CPU-bound and GPU-bound problems need opposite fixes.
- Draw call: one command to the GPU to draw a batch. Each costs CPU time; thousands of unbatched objects make a game CPU-bound. Reduce by static/dynamic batching, GPU instancing, SRP Batcher (Unity), Instanced Static Mesh / HISM (Unreal), merging meshes and sharing materials/atlases.
- Culling: frustum culling (outside camera), occlusion culling (hidden behind geometry), distance culling. Culled objects cost nothing to draw.
- LOD (Level of Detail): swap to lower-poly meshes as screen coverage shrinks; LOD0/1/2 + billboard. Nanite largely automates this for rigid static meshes but not for skinned characters, foliage with wind, or translucency.
- Lighting: baked lightmaps and light probes (cheap, static) vs real-time/dynamic lighting and GI (Lumen, ray tracing - costly). Mobile projects still bake.
- Overdraw and fill rate: transparent/particle layers stacked over each other re-shade the same pixels - the top mobile killer along with full-screen post-processing.
- Profiling before optimising: Unity Profiler, Frame Debugger, Memory Profiler; Unreal
stat unit,stat fps,stat GPU, Unreal Insights, GPU Visualizer; plus RenderDoc, Android GPU Inspector, Xcode frame capture.stat unitsplits Frame / Game (CPU) / Draw (render thread) / GPU - the largest number names the bottleneck.
Physics, animation, audio, input, UI
- Fixed timestep physics: physics runs at a constant step (Unity default 0.02 s = 50 Hz; Unreal substepping configurable) while rendering runs variably. Move rigidbodies with forces in
FixedUpdate/substep, not inUpdate. - Delta time: all motion in a per-frame update must be multiplied by
deltaTimeso behaviour is frame-rate independent. - Colliders: primitive (box, sphere, capsule - cheap), convex hull, mesh collider (expensive, static); triggers raise overlap events without blocking; layers/collision matrices and channels decide what collides with what. Continuous collision detection stops fast bullets tunnelling.
- Animation: skeletal (skinned mesh + bones + skin weights), blend trees/blend spaces, IK and retargeting, root motion, morph targets/blend shapes for faces, state machines with transition conditions.
- Audio: 2D vs 3D spatialised sources, attenuation curves, mixers, buses, snapshots; compressed streaming for music, decompressed for short SFX.
- UI: canvas/widget hierarchies, anchors and safe areas for varied Indian phone aspect ratios; UI redraw (canvas rebuild) is a common hidden CPU cost.
Pipeline, platforms and production practice
- Asset pipeline: DCC (Maya, Blender, 3ds Max, ZBrush, Houdini, Substance Painter) → export FBX (meshes, rigs, animation), glTF/GLB (open runtime format), USD (scene interchange, virtual production), Alembic (cached geometry) → engine import settings → runtime-compressed textures.
- Texture compression: ASTC (modern Android and iOS, variable block size), ETC2 (older Android), BCn/DXT (PC/console). Textures must be power-of-two sized for best compression and mipmaps.
- Builds: Android (APK/AAB; AAB mandatory on Google Play), iOS (Xcode), Windows, WebGL/HTML5, Quest/XR via OpenXR. Mobile needs 64-bit ARM, target API level updates and size limits.
- Version control: Git + Git LFS for binaries, or Perforce for large studios; Unity scene/prefab merges need YAML-friendly serialisation plus Smart Merge; Unreal uses binary
.uassetwhich must be exclusively locked, not merged. - Licensing (terms change - verify before quoting in a contract): Unity Personal is free below a revenue/funding threshold (currently USD 200,000) with Pro/Enterprise tiers above it; the proposed per-install Runtime Fee was withdrawn in September 2024. Unreal is free to use, with a 5% royalty on lifetime gross revenue of a product above USD 1 million, and a separate seat-based licence for non-game ("linear content and solutions") use; royalty is waived for titles published on the Epic Games Store.
- Indian context and law: the AVGC-XR national policy and the Indian Institute of Creative Technologies (IICT), Mumbai - the National Centre of Excellence announced under the AVGC-XR Mission - plus state AVGC policies (Karnataka, Maharashtra, Telangana, Tamil Nadu, Kerala) support studios and skilling. The Promotion and Regulation of Online Gaming Act, 2025 prohibits online *money* gaming and promotes e-sports and online social games; GST on online money gaming falls in the 40% slab introduced on 22 September 2025, while software development services are taxed at 18%. Game assets and code are protected as literary/artistic works under the Copyright Act, 1957; engine EULAs, Asset Store/Fab licences and third-party SDK terms must be tracked for every shipped build.
Key points
- Game engine - reusable runtime plus editor supplying rendering, physics, audio, input, UI, scripting and build tooling.
- GameObject-Component (Unity) - behaviour by composing components on a container, not by deep inheritance.
- Actor-Component (Unreal) - Actors are placeable UObjects; Pawn/Character add control and movement.
- MonoBehaviour order - Awake → Start → FixedUpdate → Update → LateUpdate → OnDestroy.
- Prefab / Blueprint class - the reusable template; edit once, every instance updates.
- Blueprint vs C++ - visual bytecode for tuning and glue, C++ for systems and tight loops.
- Delta time - multiply per-frame motion by it, or the game speeds up on faster machines.
- Fixed timestep - physics must run at a constant step; apply forces in FixedUpdate/substep.
- Draw call - one GPU draw command; too many makes the frame CPU-bound.
- Batching and instancing - merge or instance objects sharing a material to cut draw calls.
- LOD and culling - reduce triangles with distance and skip what the camera cannot see.
- Nanite - virtualised micropolygon geometry for static meshes; not for skinned or translucent assets.
- Lumen - real-time dynamic global illumination and reflections in UE5; baked lightmaps remain the mobile choice.
- URP vs HDRP - scalable mobile/VR pipeline vs high-end physically based pipeline; materials are not cross-compatible.
- IL2CPP - converts C# IL to C++ for performance and required platforms.
- Addressables / World Partition - streaming systems that keep memory bounded in large worlds.
- Overdraw - stacked transparent layers reshading the same pixel; the commonest mobile frame-rate killer.
- Royalty model - Unreal 5% above USD 1 million lifetime gross per product; Unity charges by seat/revenue tier instead.
- Profile first -
stat unit/ Unity Profiler tells you whether the CPU or GPU is the bottleneck before any optimisation.
Formulas and examples
Physics steps per frame n = Δt / h (Δt = frame delta time in s, h = fixed timestep in s), clamped by the maximum allowed timestep
Frame-rate independent motion: Δs = v × Δt (v in units/s, Δt in s)
Linear interpolation: Lerp(a, b, t) = a + (b − a)·t, with 0 ≤ t ≤ 1
Uncompressed texture memory M = w × h × (bpp / 8) bytes; with a full mipmap chain M_total ≈ M × 4/3
Triangle throughput = triangles per frame × FPS (triangles per second)
Lightmap texels for a surface = area (m²) × (texels per metre)²
CPU draw-call cost ≈ number of draw calls × cost per call (ms)
Unreal royalty R = 0.05 × (lifetime gross revenue − USD 1,000,000), only if positive
- Frame budget (mobile, 60 FPS): t = 1000/60 = 16.67 ms per frame.
stat unitreports Game 9.0 ms, Draw 5.0 ms, GPU 14.0 ms. The threads overlap, so the frame is limited by the largest: GPU at 14.0 ms → 71 FPS theoretical, inside budget but with only 2.67 ms (16%) headroom - too little for thermal throttling on an Android handset. Fix the GPU (resolution scale, post-processing, overdraw), not the C# code. For a 30 FPS target t = 33.33 ms; for 90 FPS VR t = 11.11 ms; for 120 FPS t = 8.33 ms. - Texture memory: a 2048 × 2048 RGBA8 texture has 2048 × 2048 = 4,194,304 pixels × 4 bytes = 16,777,216 B = 16 MiB; with mipmaps ≈ 16 × 4/3 = 21.33 MiB. The same texture as ASTC 4×4 (8 bpp) = 4,194,304 × 1 B = 4 MiB, with mips 5.33 MiB; as ETC2 RGB (4 bpp) = 2 MiB, with mips 2.67 MiB. So compressing 40 such textures saves roughly 40 × (21.33 − 5.33) = 640 MiB - the difference between shipping and crashing on a 3 GB phone.
- Draw calls: a scene has 800 props each with its own material instance → 800 draw calls at ~0.04 ms CPU per call = 32 ms on the render thread, far over a 16.67 ms budget. Atlasing to 8 shared materials and instancing identical meshes brings it to 70 calls = 70 × 0.04 = 2.8 ms, a 91% cut, with no change to visual content.
- Physics stepping after a hitch: fixed timestep h = 0.02 s. A loading hitch gives Δt = 0.50 s, so n = 0.50/0.02 = 25 physics steps in one frame - a death spiral. Unity's Maximum Allowed Timestep of 0.333 s clamps this to 0.333/0.02 ≈ 16 steps (simulation time slows instead of stalling). Lowering the rate to h = 0.0333 s (30 Hz) cuts physics cost by about 40% (30/50 of the steps) but makes fast collisions less reliable unless CCD is on.
- Unreal royalty: a studio in Pune ships a premium title grossing USD 2.6 million lifetime. R = 0.05 × (2,600,000 − 1,000,000) = 0.05 × 1,600,000 = USD 80,000. At an indicative ₹88 per USD that is about ₹70.4 lakh. The first USD 1 million is exempt per product, so a title grossing USD 900,000 pays nil.
- Lightmap resolution: a 20 m × 15 m floor baked at 10 texels per metre needs 300 m² × 100 = 30,000 texels ≈ a 176 × 176 patch; dropping to 5 texels/m uses one quarter the memory (25 texels/m²) with softer shadow edges.
| Aspect | Unity 6 | Unreal Engine 5 |
|---|---|---|
| Scripting | C# (Mono / IL2CPP), Visual Scripting | C++ plus Blueprints (visual bytecode) |
| Object model | GameObject + Components; ECS via DOTS | UObject / Actor + Components |
| Units, axes | 1 unit = 1 m, Y-up | 1 uu = 1 cm, Z-up |
| Geometry and GI | LOD groups, baked lightmaps, APV, SSGI | Nanite, Lumen, Virtual Shadow Maps |
| Render paths | Built-in, URP, HDRP | Deferred / Forward (+ mobile renderer) |
| Asset files | Text/YAML-friendly, mergeable | Binary .uasset, needs exclusive locking |
| Streaming | Addressables, Scene streaming | World Partition, Data Layers, Level Instances |
| Commercial model | Free Personal tier; paid seats above a revenue threshold | Free; 5% royalty above USD 1 m lifetime gross; seat licence for non-game |
| Typical fit | 2D, mobile, AR/VR, rapid prototyping, ads | Photoreal 3D, AAA, multiplayer, virtual production, archviz |
Where it is used
- Mobile and casual games: Unity dominates Indian studios - SuperGaming (Indus Battle Royale, Unreal/Unity work), Nazara-group studios, Moonfrog, Gametion (Ludo King), hyper-casual and ad-monetised titles built in Unity with Addressables and URP.
- AAA and co-development: Unreal and proprietary engines at Ubisoft Pune and Mumbai, Rockstar India, Technicolor Games, Lakshya Digital/Keywords and Sumo India - roles as gameplay programmer, technical artist, level designer, build/pipeline engineer.
- XR, simulation and training: Unity and Unreal power Quest/HoloLens training apps, defence and railway simulators, medical and industrial training at Tata Elxsi, HCLTech, L&T, DRDO contractors and ISRO-linked visualisation work.
- Virtual production and film/ad work: Unreal Sequencer and LED-volume stages used by Indian VFX and advertising houses; previs, techvis and real-time cinematics.
- Architecture, automotive and real estate: Unreal and Unity Reflect/Twinmotion walkthroughs for builders and auto configurators - large non-game employment segment in Bengaluru, Pune and Hyderabad.
- Digital twins and enterprise 3D: factory and smart-city twins (Siemens-Unity tie-ups, Omniverse-USD pipelines) where engine skills transfer directly out of gaming.
Interview questions
- Q: Why does Unity prefer composition over inheritance? A: Behaviour is added as independent components, so features mix freely at runtime without the fragile deep class hierarchies that inheritance produces.
- Q: What is the difference between Update and FixedUpdate? A:
Updateruns once per rendered frame at a variable interval;FixedUpdateruns at the constant physics timestep, so all force and rigidbody work belongs there. - Q: Why multiply movement by delta time? A: It makes displacement proportional to elapsed real time, so the game moves at the same speed on a 30 FPS phone and a 144 FPS PC.
- Q: What is a draw call and how do you reduce it? A: A single draw command sent to the GPU; reduce it by sharing materials, atlasing textures, static/dynamic batching, GPU instancing and merging meshes.
- Q: Is Nanite a replacement for LODs? A: For rigid static meshes largely yes, since it streams and selects triangle clusters automatically; skinned characters, wind-animated foliage and translucent materials still need authored LODs.
- Q: When would you choose Blueprints over C++? A: For designer-facing tuning, UI logic, level scripting and prototyping; C++ for systems, tight per-frame loops and anything performance-critical or widely reused.
- Q: How do you tell whether a game is CPU- or GPU-bound? A: Profile - in Unreal compare Game and Draw against GPU in
stat unit; if lowering resolution helps it is GPU-bound, if reducing object or script count helps it is CPU-bound. - Q: URP or HDRP for a mobile AR app, and why? A: URP, because it is scalable, single-pass forward-friendly and designed for mobile and XR; HDRP targets high-end PC and console and would not run acceptably.
- Q: What is the Unreal royalty and when does it apply? A: 5% of lifetime gross revenue of a product, charged only on revenue above the first USD 1 million, and waived for Epic Games Store releases; non-game "solutions" use is licensed per seat instead.
- Q: Why is Perforce or exclusive file locking used on Unreal projects? A:
.uassetfiles are binary and cannot be merged, so two people editing the same asset means one loses work unless the file is locked. - Q: What causes overdraw and why does it hurt mobile most? A: Many transparent or particle layers shading the same pixels repeatedly; mobile GPUs have limited fill rate and bandwidth, so pixel work dominates the frame.
- Q: What does IL2CPP do? A: It converts compiled C# intermediate language into C++ which is then compiled natively, giving better performance and satisfying platforms that forbid JIT, such as iOS and WebGL.
Common mistakes
- Writing physics movement (
Rigidbody.AddForce, velocity changes) insideUpdateinstead ofFixedUpdate, giving jittery, frame-rate dependent behaviour. - Forgetting
deltaTime, so the game literally runs faster on better hardware. - Calling
GetComponent,Find,GameObject.FindObjectOfTypeorInstantiate/Destroyevery frame instead of caching references and using object pools. - Optimising by guesswork - reducing triangles when the frame is CPU-bound on draw calls, or batching when the GPU is saturated by post-processing.
- Shipping uncompressed, non-power-of-two textures with mipmaps disabled, then blaming the engine for memory crashes and shimmering.
- Treating Nanite, Lumen or ray tracing as free quality upgrades and enabling them on a mobile or low-end target.
- In exams: confusing the two coordinate conventions (Unity Y-up metres vs Unreal Z-up centimetres), or misordering the MonoBehaviour lifecycle (
AwakebeforeStart,LateUpdateafter animation). - Quoting engine licence terms from memory - Unity's revenue tiers and Unreal's seat licence have both changed recently and must be read from the current EULA.
Related topics
Game design fundamentals · VFX: compositing, rotoscoping and matchmoving · UX research and usability · 3D modelling, texturing and PBR materials · Rigging, skinning and character animation · Real-time rendering and shader programming