WebGL, JavaScript and Gaming
Jason Meisel
Sean Middleditch
Subsonic, LLC.
http://sonargame.com/
About Us
Jason Meisel
�
DigiPen RTIS Junior, experience working on two successful student games.
�
Sean Middleditch
�
DigiPen RTIS Junior, one of the developers on Subsonic, around a decade of professional programming experience in the Web space.
�
�
About Subsonic LLC.
Slides & Contact Information
�
�
�
About SONAR
The Game We Made
SONAR
�
About SONAR: The Process
�
Subsonic: The Student Game
�
Engine Overview
The Technology Behind SONAR
SONAR Engine: Why a New Engine?
SONAR Engine: Requirements
SONAR Engine: Overview
Object-Oriented JavaScript Wrapper
Component-Based Design
Useful Object-Oriented Techniques for Game Developers
Game Object Compositions
Evolve Your Hierarchy:
http://is.gd/H2ezYI - Mick West
�
Components in JavaScript
http://is.gd/Beyekn - Sean Middleditch
Inheritance Tree - Inflexible
GameObject
Actor
Item
Player
Enemy
Guard
Camera
ToughGuard
FastGuard
classical inheritance diagram for a game
Components - Awesome
GameObject
TransformComponent
PhysicsComponent
PlayerComponent
Animation3DComponent
FootstepsComponent
GameObject
TransformComponent
PhysicsComponent
AIComponent
Animation3DComponent
FootstepsComponent
EarsComponent
GameObject
TransformComponent
PhysicsComponent
PickupComponent
Mesh3DComponent
blueprint = "Player"
blueprint = "Guard"
blueprint = "ShockGun"
simplified component diagram for SONAR
Spaces
Space is the Place
Spaces Overview
Level 1
Main Menu
Level 2
Engine
Entity
Entity
Entity
Entity
Entity
Entity
Entity
Entity
Entity
Spaces
Subspaces
Subspaces
Space
Graphics
Physics
A*
Entity
Entity
Entity
= Component
Artificial Intelligence
Action-Oriented Thinking
AI Architecture
�
Action Lists
�
�
http://sonargame.com/2011/06/05/action-lists/
MoveTo (1,3)
MoveTo (4,3)
MoveTo (4,7)
PathTo (1, 3)
Blocks
Blocks
Blocks
Movement
Behavior
Behavior: Guard
Behavior: Chase
Blocks
Blocks
Behavior Composition
JavaScript Math
The Poetry of Illogical Ideas
Maths
Math is Hard!
�
Pass by Reference Example
Math Optimization
�
�
Garbage Collection
Math is Hard!
�
WebGL
The Pretty Part of Programming Professionally without Proprietary Plug-ins
WebGL: Why Use It?
copyright (C) 2011 Learning WebGL
WebGL: Pros
�
http://benvanik.github.com/WebGL-Inspector/
�
WebGL: Cons
http://www.khronos.org/webgl/wiki/Debugging
JavaScript Game Optimizations
Sore Thumbs on the Web
JavaScript: Web Scripting
JavaScript: Game Programming
JavaScript: Garbage Collection Woes
�
JavaScript: Garbage Collection Hacks
�
garbage collection does this
Private Globals
Art Pipeline
Blending Content Creation and Game Engines
Art Pipeline: From Blender to WebGL
�
�
http://sonargame.com/2011/07/23/resource-loading-in-javascript/
Blender
�
copyright (C) 2011 Blender Foundation
3D Model Format
�
�
����
Python
Javascript
Blender
Binary File
WebGL
3D Models in JavaScript/WebGL
�
Pipeline Integration Woes
�
Autodesk FBX
HTML5
Modern Web for Gaming
HTML5, CSS & Canvas for 2D
HTML5, Canvas, CSS
HTML5, CSS & Canvas for 2D
�
Editor
Designing for Success
See Our Pretty Editor
Features
�
Implementation
�
�
Alternative Editor Ideas
�
Miscellaneous Web APIs
It's the Little Things
Miscellaneous Web APIs for Games
Summary
Questions?
Answers?