Browser and Game Engines
Ali Rantakari T
- 106.5840 Seminar on Software Systems
Presentation on 24 November 2010
Aalto University School of Science and Technology Department of Computer Science and Engineering
Browser and Game Engines Ali Rantakari T -106.5840 Seminar on - - PowerPoint PPT Presentation
Browser and Game Engines Ali Rantakari T -106.5840 Seminar on Software Systems Presentation on 24 November 2010 Aalto University School of Science and Technology Department of Computer Science and Engineering Contents Introduction
Ali Rantakari T
Presentation on 24 November 2010
Aalto University School of Science and Technology Department of Computer Science and Engineering
Focus in this presentation is
applications; the relevant things in connecting the two.
We perceive the engine as a black box
features and perhaps a general structure but we are not concerned with internal implementation details.
Library App code Direct calls to library Program flow
Framework App code Callbacks on registered handlers Program flow
tools, utilities, and interfaces that hide the low-level details of the various tasks that make up a video game”
that do not directly specify the game’s behaviour (game logic) or game’s environment (level data)”
for software that is extensible and can be used as the foundation for many different games without major modification”
runtime game engine which excludes the toolset from the definition
distinction. We can think of a gamut of reusability onto which every engine falls” (see figure)
generic (3D) game engines
Picture credit: J.Gregory; Game Engine Architecture.
Picture credit: E.Folmer; Component based game development - a solution to escalating costs and expanding deadlines?
Picture credit: J.Gregory; Game Engine Architecture.
Continues
Continues
engine and the game itself, [the engine’s gameplay foundation systems] lie just beneath this line”
game can probably be best visualized as one big blur – a gradient that arcs across these components as it links the engine to the game”
Implementing game- specific functionality
implementation (although it can easily be substituted with something else)
has to be manually built
runloop via a TaskManager
registered for arbitrary global events
Implementing game- specific functionality
UnrealScript (textual scripting) and Kismet (visual scripting)
Controller...) can be created with custom behavior and properties
for events and trigger them in other Actors globally
Implementing game- specific functionality
engine; CEL provides entity management and other features for games
composed declaratively (XML) or imperatively (Python)
attached to Entities via Property Classes
gameplay foundations modules
design of the interface varies
composition- or inheritance- based, or it might not exist
may be e.g. per-entity or global
(delegates / callback interfaces for game model objects, event handlers)
“entity system”
“All of the rendering logic, SVG support, transforms, network support, etc. is [in WebCore]” “WebKit: the front-end layer used by applications”
by the Mozilla Project.”
browser engine, networking, parsers, content models, chrome and the other technologies that Mozilla and other applications are built from. In other words, all the stuff which is not application specific.”
provides a high-level interface to the Rendering Engine. It loads a given URI and supports primitive browsing actions such as forward, back, and reload. It provides hooks for viewing various aspects of the browsing session such as current page load progress and JavaScript alerts. It also allows the querying and manipulation of Rendering Engine settings.”
KJS Networking PCRE JavaScript Interpreter XML Display Backend Expat
Foundation Core
User Interface Cocoa / Carbon Parser User Interface Browser Engine Rendering Engine Adapter (KWQ) KHTML Brower Engine (WebKit) Data Persistence
Secure (Keychain) Engine User Persistence Persistence Persistence
Safari Architecture WebKit Main API connection points
WebView
Connect app to browser engine by hosting a WebView instance and providing delegate protocol implementations Connect app to scripting environment via a WebView’s windowScriptObject and by attaching your own WebScripting protocol implementation(s) there
WebScripting, WebScriptObject Picture credit: A. Grosskurth and M.
Mozilla Architecture
Necko Security
(NSS/PSM)
Spider− Monkey Expat GTK+ Adapter JavaScript Interpreter XML Parser Networking Display Backend Rendering Engine Browser Engine UI Toolkit (XPFE) User Interface User Interface GTK+ / X11 Libraries Gecko Data Persistence
Persistence & Engine User, Secure,
Mozilla’s Main API connection points
nsWebBrowser
Connect app to browser engine by hosting an nsWebBrowser instance and providing delegate interface implementations Connect app to scripting environment via a nsIDOMWindow’s wrappedJSObject and by attaching your own XPConnect wrappers there
XPConnect Picture credit: A. Grosskurth and M.
IE Main API connection points
Connect app to browser engine by hosting a WebBrowser instance (or to rendering engine by hosting an MSHTML instance) and providing delegate interface implementations
WebBrowser MSHTML
Connect app to scripting environment by providing IDispatch interface implementations for WebBrowser or MSHTML through the IDocHostUIHandler interface implementation
IDispatch
browser engine
representing the “raw” rendering engine (e.g. MSHTML in IE)
(delegates / callback interfaces)
environment and host via mechanisms in the type system that connects the engine to the JS environment
Game Engines Browser Engines Definition
Vague Clear
Features
Variant Static
Interface
Somewhat homogeneous Homogeneous
Relevant Interface modules
Gameplay system, Entity management system, Event/Messaging system Browser engine component, (Rendering engine component), JavaScript environment’s window object
Interface Design
Framework (IoC) Framework (IoC)
2009.
web browser,” 2006, submitted for publication.
costs and expanding deadlines?” in CBSE, ser. Lecture Notes in Computer Science, H. W. Schmidt, I. Crnkovic, G. T. Heineman, and J. A. Stafford, Eds.,
27–31, 2002.
Media, 2007.
main/CEL_Design
manual-1.4/
Three/
mac/#documentation/Cocoa/Conceptual/DisplayWebContent/ DisplayWebContent.html
PublicAPIs.html
XPConnect