+ All Categories
Home > Mobile > How we did 60FPS in our 3D RTS mobile game

How we did 60FPS in our 3D RTS mobile game

Date post: 11-Jul-2015
Category:
Upload: dannie-sim
View: 884 times
Download: 2 times
Share this document with a friend
39
How We Did 60fps In Our 3D RTS Mobile Game Daniel Sim - Senior Developer Nonstop Games - A King studio Oct 2014
Transcript
Page 1: How we did 60FPS in our 3D RTS mobile game

How We Did 60fps

In Our 3D RTS Mobile Game

Daniel Sim - Senior Developer

Nonstop Games - A King studio

Oct 2014

Page 2: How we did 60FPS in our 3D RTS mobile game

● Quick Intro

● 3D RTS on Mobile

● Q&A

● Hands-on + Lunch

Overview

Page 3: How we did 60FPS in our 3D RTS mobile game

About Me

● Started Game Programming in 1987

● Was a “3D Artist” in a previous life (7 years)

● Made game that hit #23 What’s Hot Role

Playing Games for iPad (U.S. App Store)

● MMO Gamer - WoW, EVE Online

● 2009 Singapore Champion - Radio

Controlled Helicopter Aerobatics

Page 4: How we did 60FPS in our 3D RTS mobile game
Page 5: How we did 60FPS in our 3D RTS mobile game
Page 6: How we did 60FPS in our 3D RTS mobile game

● Founded in 2011 - Teemu, Henrik, Juha,

Henrico 17 of us - Passionate about Making Games Gamers

Love

o Encourage Innovation, Individuality

About Nonstop Games

Page 7: How we did 60FPS in our 3D RTS mobile game

● Real-time Map Strategy War Game (2D)

● App Store Feature (> 100 countries)

Heroes of Honor

Page 8: How we did 60FPS in our 3D RTS mobile game
Page 9: How we did 60FPS in our 3D RTS mobile game

About the Kingdom

● Maker of Candy Crush, Farm Heroes, Pet

Rescue, and more!

● 6 Studios in Europe

● Nonstop Games is King’s 1st Studio in Asia!

● Bi-annual Infomarket

Page 10: How we did 60FPS in our 3D RTS mobile game

● Induction in Europe (Berlin)

● Brand New Office in the City

● Access to network of artist and developers

(Platforms to Share Knowledge)

● And more!

Kingdom Perks

Page 11: How we did 60FPS in our 3D RTS mobile game

Global Kingdom of Fun

● 345 Million Monthly UNIQUE Users

● 1.2 Billion Average Daily Game Plays

● Truly Free-to-play

Page 12: How we did 60FPS in our 3D RTS mobile game

Nonstop Games - A King Studio

● Independent Studio

● Fun, Innovative Games

● Beyond Traditional Casual Genre

● Bring Best of East to the Global Market

● Amazing Games in the pipeline

Page 13: How we did 60FPS in our 3D RTS mobile game

Introducing Our Tech Demo

● FLEET - Naval RTS Prototypeo Current Mobile RTS Examples

o What Might Happen in The Near Future

o Requirements for the Tech Demo

o Ocean Simulation

o Tech Details

o Rendering Techniques

Page 14: How we did 60FPS in our 3D RTS mobile game

Current Mobile RTS On Mobile

● Clash of Clans

● Boom Beach

Page 15: How we did 60FPS in our 3D RTS mobile game

In The Near Future...

● High Fidelity 3D Graphics

● Silky Smooth Framerates

● More Complex Battle Mechanics

● Lots of RTS games on mobile

● Many “entry-level” smartphones in use

Page 16: How we did 60FPS in our 3D RTS mobile game

Tech Demo Requirements

● Naval Combat Game (with Vikings!)

● Hundreds of Units (3D Character Animation)

● Particle Effects for Explosions and Water

● WOW! Ocean Simulation+Effects

● Real-time Physics+AI for Units

● < 100MB Memory Usage (Core Runtime)

Page 17: How we did 60FPS in our 3D RTS mobile game

Ocean Demo

Video time!

Page 18: How we did 60FPS in our 3D RTS mobile game

Ocean Simulation

● Try for “Never seen before”

● Works on “all” phones

● Complex Problem

● Techniques apply to any “ground”

Page 19: How we did 60FPS in our 3D RTS mobile game

Pieces of an Ocean

Detail Normal MapsReflection Map

Displacement+Normal Maps

Page 20: How we did 60FPS in our 3D RTS mobile game

Displace+Normal Animated Blend

Map A moves

Map B is faster

● RGB is Normal, Alpha is Displacement

● 8x Over-sample over U axis

● Same Technique for Detail Normal Maps

Page 21: How we did 60FPS in our 3D RTS mobile game

Detail Normal Maps

● Inexpensive “Close-up” Detail

● 4 Normal Map Layers in total

Page 22: How we did 60FPS in our 3D RTS mobile game

3D Normals into 2D Texture Coords

Reflection Map (Fresnel Mimic)

Page 23: How we did 60FPS in our 3D RTS mobile game

Challenges (of Oceanic proportions)

● Displacement and Normal Map Size

● Reflection Mapping

● Texture Look-up Bandwidth

● Artist deliver the “Punchline”

● Particle Projection Mappingo Pre-render Noise

o Generate Projected Mesh

o Minimize Overdraw

o A Whole Topic on its own

Page 24: How we did 60FPS in our 3D RTS mobile game

Epic Naval Battle

Another video!

Page 25: How we did 60FPS in our 3D RTS mobile game

Tech Details (Entities)

● Fleet Prototype @60fps (iPad 4)

o 4k Bone Animated Tris (4 skin weights per vertex)

o 23k Transform Animated Tris

o 42k Static Tris

o Above Tris are with normals and lit with 2 lights,

ambient + directional

o Box2D physics with 30 dynamic bodies and 28 static

bodies

Page 26: How we did 60FPS in our 3D RTS mobile game

Tech Details (Ocean + Effects)

● Full scene displacement animated Ocean

Mesh

o 32k tris

o 3.9k tris with particle billboard animation projected

on Ocean Mesh (Ship Wakes)

● Particle Effects

o 1.6k particle billboard animated sprite tris

o Smoke, Explosions and Spells

● Grand Total

o 107,000 Triangles Per Frame

Page 27: How we did 60FPS in our 3D RTS mobile game

Tech Details (AI, Sound)

● AI + Physics

o Nearest target fire and movement

o AI controls 30 ships

● 16 concurrent sound channels

o 3D spatial processing

Page 28: How we did 60FPS in our 3D RTS mobile game

32 Ships and a Base on an iPad 2

Brand X (3D Engine)

Page 29: How we did 60FPS in our 3D RTS mobile game

26 FPS

Page 30: How we did 60FPS in our 3D RTS mobile game

44 FPS

Page 31: How we did 60FPS in our 3D RTS mobile game

3D Rendering (1 of 3)

● SIMD capable Vector Matho GLM - Second fastest library, most portable

● Vertex Buffer Objects (VBO)o Pre-load vertex data to GPU

● Vertex Array Objects (VAO)o Pre-configure rendering programs on GPU

Page 32: How we did 60FPS in our 3D RTS mobile game

3D Rendering (2 of 3)

● Multi-thread Ready (WIP)o Entity Render States are Thread Safe

● Future Proofo Apple Metal Ready

o UBO and Geometry Instancing will be quick to

integrate (OpenGL ES 3.0)

● Vertex Cache Optimized Mesh Export

Page 33: How we did 60FPS in our 3D RTS mobile game

3D Rendering (3 of 3)

● Particle Animationo Export Baked Animation from Maya

o Animated Attributes Per Particle:

Sprite Frame

Opacity

Twist

Scale

Page 34: How we did 60FPS in our 3D RTS mobile game

Shaders

● Right Shader for the Right Jobo Optimize where it matters

o Easy to write, use and benchmark custom shader

● Shader Uniformso Aggressive use

o 400% faster than glBufferData (selected use case)

Page 35: How we did 60FPS in our 3D RTS mobile game

Animation

● Export from C++ Maya Plugin

o Skeleton Animation

o Quaternion Rotations

Record and Interpolation

● GPU based mesh deformation

Page 36: How we did 60FPS in our 3D RTS mobile game

File Formats

● Mesh, Animation, Collision, Particle and Font

● No-fluff Binaryo Depends on Artist/Content Tools to pull-it together.

● Memory dump of GPU buffer o As fast as it gets

o Not possible all the time

o Amazing with Apple Metal

Page 37: How we did 60FPS in our 3D RTS mobile game

Questions Please!

Page 38: How we did 60FPS in our 3D RTS mobile game

● Know Each Other Better

● Seen how we make a naval RTS game

● Went through rendering techniques

● Try the Tech Demo for yourself

o Lunch!

Recap

Page 39: How we did 60FPS in our 3D RTS mobile game

nonstop-games.com/jobs

linkedin.com/in/danniesim

Thank You!


Recommended