Dynamic Updates for Videogames Seamless and Transparent Integration of Content Videogames

advertisement
Dynamic Updates for Videogames
Seamless and Transparent Integration of Content
and Engine Update in Online and Connected
Videogames
by Thomas Bousquet & Edouard Kieffer
Motivations & Existings Products
However none of them
provides transparent update
of both content and code
Architecture & Technologies
• Technologies : SOA
• Server (JBoss application)
– Back-end : Hibernate, Spring, XFire
– Front End : Flex
• Client
– JNotify, Webservice
Architecture: Back-End
JMS Publisher
RMI Services
JMS Manager
Controllers
Web Services
Services
DAO
Hibernate
Back-End
JDBC
MySQL
Architecture: Client API
JMS Subscriber
RMI Services
JMS Manager
Service Client
DynaCode Manager
Dynamic Objects
ClassLoader
Invocation Handler
Client API
Dynamic Classes: How Do We Update?
Dynamic Classes: Three Suspects
"Automagically"
Managed
Custom
Dynamic Class
Implicit Dynamic
Class
• Leave the migration
process to us!
• You control the
migration process
• The most flexible
implementation
• Migrate to new
version using field
reflection
• May also apply the
automatic process
beforehand
• Doesn't need to
conform to an
interface
• The dynamic class
needs to implement
an interface
• The dynamic class
needs to implement
"ICustomMigration"
• Need only extend
ImplicitDynamicClass
• ... But rather ugly for
now
Dynamic Classes: Back – Client
Interactions
• Two channels
– Client may request through RMI
– Data push emulated by JMS
• On initial connection, client requests upto-date report of dynamic classes
• If an administrator changes current
class revisions, client notified through
JMS
Content Update – Main Concept
Content Update – 1 Interface, 2 Classes
IupdatableResource
ResourceListener
UpdatableResource
Manager
• Provide renewing
• Listen to a particular
method for considered
file
• Manage the listeners
resource
and act as a
• Contains a list of
middleman for
• New implementation
registered
registering
for each 'type' of
IUpdatableResource
IUpdatableResource
resource (texture,
• New implementation
model, sound, XML
• New class inheriting
for each 'type' of
file)
from this for each new
resource (texture,
application
model, sound, XML
file)
Demonstration Time !
• Proof of concept of the applicability of
our framework to existing solution
– Java Monkey Engine
– AirCarrier showcase application
• What we will demonstrate
– Administration Interface
– Dynamic texture update
– Dynamic update of AI Manager Behavior
Evaluation
• Dynamic code :
– constant overhead for calling dynamic :
calls 6 to 8 times slower => only use on
computationnaly intensive methods
• Dynamic content
– Disk access and content renewal creates
'acceptable' stutter.
Limitation of this demo & extension
• With more time and/or a better
architecture:
– Use AMF instead of web services for back /
front communication
– Describe ressources used by object with
XML file and listen to this files.
– Extend the existing resource manager to
integrate smart cache management
What happened to C++ ?
• C++ is still the leading language for
videogame application
• Too complicated for the scope of this
project (lack of existing framework)
• Advantages :
– Function parameters as reference
– SWIG enables to automatically create
wrapper for other languages ranging from
Java to Python, Lisp and C#
Extensions - Code
• Features :
• Tools :
– Plugin eclipse to enable traditionnal
function call for dynamic code
– EJB 3.0 (abstraction of persistence)
Extensions – Content
• Features :
– Intercept message containing data written
from memory to disk to suppress disk
access.
• Tools :
– Model Oriented Programming : provide
tools to create implementation of
IUpdatableResource and IresourceListener
at once.
Conclusion
• Features :
– Intercept message containing data written
from memory to disk to suppress disk
access.
• Tools :
– Model Oriented Programming : provide
tools to create implementation of
IUpdatableResource and IresourceListener
at once.
Thanks for your attention
QUESTIONS ?
Download