OpenSource Graphics Development with the Delta3D Game Engine - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

OpenSource Graphics Development with the Delta3D Game Engine

Description:

Lesser GNU Public License. http://www.gnu.org/copyleft/lesser.html ... The STAGE source code is licensed with the GPL. What's in Delta3D? Libraries ... – PowerPoint PPT presentation

Number of Views:141
Avg rating:3.0/5.0
Slides: 27
Provided by: delt7
Category:

less

Transcript and Presenter's Notes

Title: OpenSource Graphics Development with the Delta3D Game Engine


1
Open-Source Graphics Development with the
Delta3D Game Engine
  • Chris Osborn
  • Lead Software Engineer
  • Delta3D, MOVES Institute
  • cwosborn_at_nps.edu

2
Agenda
  • Why Use Open-Source Software?
  • Overview of the Delta3D Game Engine
  • Building a Delta3D Application
  • STAGE the Simulation, Training, And Game Editor
  • Building Actor Libraries for STAGE
  • Questions

3
Why Use Open-Source Software?
  • Often cross-platform...
  • Windows, Linux, OSX, BSD, and more
  • Always the lowest bid!
  • No vendor lock-in
  • Freedom to modify and enhance code
  • Often has commercial-friendly licensing

4
Licensing
  • The Delta3D libraries are licensed under the
    LGPL.
  • Lesser GNU Public License
  • http//www.gnu.org/copyleft/lesser.html
  • Applications may use a LGPL library and retain a
    commercial license.
  • In contrast to the GPL, where programs that use a
    GPL library automatically fall under the GPL
    themselves.
  • The STAGE source code is licensed with the GPL.

5
Whats in Delta3D?
  • Libraries
  • dtUtil General utilities
  • dtCore Core engine
  • dtABC Application Base Classes
  • dtAudio Audio
  • dtChar Characters
  • dtGUI CEGUI implementation
  • dtHLA HLA/RTI networking
  • dtScript Python scripts
  • dtTerrain Terrain framework
  • dtDAL Dynamic Actor Layer
  • dtGame GameManager
  • dtActors STAGE export of dtCore
  • dtBSP BSP Library
  • dtInspector FLTK debugging tool
  • Utilities
  • bspCompiler
  • STAGE
  • hlaStealthViewer
  • psEditor Particle Systems
  • Viewer Model Viewer

6
Architecture
7
Building a Delta3D Application
  • Rapid, iterative development is good.
  • Delta3D provides base classes to facilitate this
    style of development.
  • Derive from dtABCApplication to instantly have
    a working program with a window, scene, mouse
    keyboard callbacks, and an entry point into the
    frame loop.

8
dtABCApplication
  • void Confg()
  • Setup your scene here
  • void KeyPressed()
  • Keyboard callback
  • void ButtonPressed()
  • Mouse callback
  • void PreFrame()
  • Per-frame callback
  • It is safe to add and remove objects from the
    scene here

9
  • Lets take a look at a sample application.

10
STAGE
  • The Simulation, Training, And Game Editor
  • Assemble 3D scenes by placing actors and
    modifying their properties
  • Contains core library of actors supporting almost
    all Delta3D classes
  • Extensible plug-in interface for your own actors
  • Intuitive user-interface
  • Supports triggers and basic scripting

11
  • Lets take a look at STAGE.

12
dtDAL STAGE Architecture
13
Building an Actor Library
  • Create your Actor classes.
  • Wrap the classes using ActorProxies.
  • Export the ActorProxies in a shared library.
  • Load the library via a GUI in STAGE.

14
Creating Actors
  • Here, Actor refers to a custom Delta3D classes
    that you wish to use in STAGE.
  • Actor classes must have a base class of
    dtCoreDeltaDrawable.
  • An Actor Property is any member variable you wish
    to manipulate in STAGE. For example, a collision
    shape.
  • You must define Gets Sets for all of the Actor
    Properties.

15
  • Lets take a look at a custom Actor the
    TessellationActor.
  • It represents a flag-like object that can be
    assigned a texture.

16
Wrapping classes with ActorProxies
  • An ActorProxy is a generic interface to Actor
    Properties. They allow STAGE to manipulate Actor
    without understanding the Actor type.
  • Custom ActorProxies dervie from
    dtDALActorProxy, dtDALTransformableActorProxy,
    etc.
  • Often, you will need to wrap the Gets/Sets on the
    Actor itself to fit the interface required by
    STAGE.
  • void BuildPropertyMap()
  • Associates Properties with Gets/Sets.

17
  • Lets take a look at the ActorProxy for our
    TessellationActor.

18
Exporting ActorProxies to a Library
  • Finally, we must export the ActorProxy into a
    shared library that STAGE can use.
  • On Windows, this would be a .dll.
  • On Linux, the library is a .so.
  • ActorProxy Libraries derive from
    dtDALActorPluginRegistry.
  • void RegisterActorTypes()
  • Defines which Actors are in this library.

19
  • Lets take a look at the library containing our
    TessellationActorProxy.

20
Loading a ActorProxy Library in STAGE
  • Edit -gt Map Libraries... -gt Import Library
  • Then youll be able to use your Actor in STAGE!
  • Oh, and if you want to open your map at another
    time, make sure you custom library is somewhere
    in your PATH (Windows) or LD_LIBRARY_PATH (Linux).

21
  • Lets go check out our new Actors in STAGE.

22
Loading a Map from an Application
  • dtDALProjectGetInstance().GetMap(MyMap)
  • This function returns a reference to the map with
    the name MyMap.
  • void LoadMap( dtDALMap map )
  • You can then pass that reference into this
    function, which loads the map into the default
    Scene in your application.

23
  • Lets see how to load map with
  • some good ol C.

24
Finding Proxies in a Map
  • dtDALMapFindProxies(vector,name)
  • vector is of type stdvectorlt osgref_ptrltActorP
    roxygt gt
  • name is of type stdstring (wildcards allowed,
    i.e. )
  • This function will fill the vector with proxies
    that match the wildcard string name.
  • Once you have the matching ActorProxies you can
    call ActorProxyGetActor() to return the
    internal Actor.
  • Then you should dynamic_cast the Actor to your
    Actors static type.

25
  • Lets see how to find our TessellationActorProxy
    in a Map.

26
Thank you!
  • Questions?
  • Chris Osborn
  • cwosborn_at_nps.edu
  • osb on the forums, come say hi!
  • http//www.delta3d.org/IISECTutorial.zip
Write a Comment
User Comments (0)
About PowerShow.com