Sign in to follow this  
Frank Taylor

The entire 3D Game-world is a Graphical User Interface...

Recommended Posts

[b][img]http://wiki.hpquest.com/images/1/12/IOU_Design.png[/img]
[/b]

[b]IOU, A Game-User Interactivity System (GUI) [/b]
Graphical User Interfaces (GUI) are a mandatory in today's utility and entertainment application productions. Games in particular feature GUIs with heavily animated Widgets and unique input device control. When using the term GUI, most of us visualize two dimensional rectangular windows, buttons, menus. However I come to realize that [i]the entire 3D Game-world is a Graphical User Interface[/i] and in most cases games incorporate a custom GUI system to support this interactivity.

What I describe herein is a design for Physics-powered Graphical User Interface that consolidates all User and CPU Interactivity: 2D/3D GUI Widgets, 3D Event Triggers, Player Controller, AI Agent Controller into one system. A Game-User Interactivity System, Input/Output & You (IOU). IOU's Design draws upon inspirations from several 2D/3D Drawing & Animation Applications such as [url="http://www.scaleform.com/gfx"]Scaleform(Flash)[/url], Cinema4D, [url="http://www.gimp.org/"]GIMP[/url], PowerPoint, Movie Maker.

IOU is designed to support:

[list][*]2D / 3D Animated Widgets[*]3D Cameras & Viewports[*]Various Input Devices[/list]
[b] Interactive Primitives: Input, Output, & User Devices [/b]
IOU has 3 Interactive Primitives (C++ Classes): [i]InputDevice, OutputDevice, and UserDevice[/i].

[list=1][*][i]InputDevice[/i] manages User Input from peripherals such as Keyboard, Joystick, Joypad, Mouse, other. (Key, Button, Axis).[*][i]OutputDevice[/i] manages presentation of Visual Objects and Audio to the user.[*][i]UserDevice[/i] is an aggregate object that couples:[list][*] InputDevice for contact collision detection (button presses, etc).[*] Body, a Collision Component powered by Physics Engine for high performance bound collision detection/filtering and physics simulation.[*] Sprite, a Visual Component powered by High Performance Graphics Engine. Visual Components: 2D Image & Video, 3D Sprite/Mesh & Light, High Level 3D Entity.[/list][/list] In IOU, [i]contact collision detection[/i] from input devices and [i]bounds collision detection[/i] powered by Physics are the key mechanism of User-Application interaction and the driving principle behind IOU's design. IOU adopts the Entity Component Model in Engine Framework C++ Classes and [url="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"]Model-Viewer-Controller[/url] design pattern in the Script API ([url="http://wiki.hpquest.com/index.php?title=S3GXL_Design"]S3GXL[/url]) implementation, decoupling visual components from the collision component. Collision Detection generate Events, which are used select and execute scripts.


[b] GUI Entities: Canvas, Widget, Pointer [/b]
IOU provides 3 GUI Entities (Script API) common to graphical user interfaces: Pointer, Widgets, Canvas . All other Interactive Entities inherit from these GUI Entities in a Interactive-centric Gameworld.

[list=1][*]Canvas provides a single presentation point consolidates 3D Cameras, 2D Viewports, and Listener.[*]Widget provides a single interaction point for the direct manipulation of a given kind of data ([url="http://en.wikipedia.org/wiki/GUI_widget"]1[/url]). A Widget has no specific mechanical operation (Behavior) until assigned, and a Widget can be assigned any Behavior.[*]Pointer, a Widget controlled by a User via InputDevice. Its used to interact with other Widgets. IOU decouples control of the Pointer directly from the mouse allowing it to be controlled other devices to include the keyboard.[/list]
[b]Event State Machine (ESM) Model [/b]
IOU implements a Finite State Machine model composed of a finite number of states, transitions between those states, and actions. States are determined by Events. An Event is a state change based on Pointer/Widget collision detection, Control Input Detection, and Event Flags. These interactions are the basis for many types of Events in IOU. Hence, the Event State Machine. A Widget can execute a Script (Action) with each Event State. IOUs design revolves around Widget and Control Events.


[b]Event-Driven Scripting [/b]
Event-driven Scripting Behaviors, Transitions, Styles, Themes, Schemes & Actions.

In most GUI's the mechanical operation of a Gadget (ie: Button, Slider, etc) is hardcoded. In IOU, this functionality is scripted and referred to as Behaviors. Behaviors define the logic for handling interactions, event states for Widgets and Controls. Games can require Widgets with unusual Behaviors. Scriptable Behaviors allows for many types of traditional and non-traditional Widgets to be created.

Games have very active GUIs complete with sound and animation. It was desired that IOU support sound and animation during events and in between. Transitions define logic for effects executed in between Event Changes. They were originally intended to be used for audio/visual effects during the transition of one event to another, but, can be used other actions.

Styles define Font properties based on Widget Event States and Themes define Border Images and Lines based on Widget Event States. Both Styles and Themes can use Script for visual effect fonts and borders are drawn.


[b]Composite Widgets [/b]
Behaviors can also be scripted to use two or more Widgets to operate as a Composite Widget such as a Dropdown Box. These types of Behaviors rely on IOU's Widget Family Tree Data structure in which Parent|Child|Sibling relationships are established between Widgets during creation. In the Parent-Child relationship, the Parent usually influences the Child. Widgets that share the same Parent are Siblings. IOU uses a Link List for both operational and performance purposes.


[b] Image-based Border Themes, Fonts, and SoundFX [/b]
IOU supports 2D Image-based Border Themes, 2D Animation Frames, and Fonts using Texture Atlases. The .PNG format is the recommended file format for Images.

IOUs Image-based Border Theme uses built-in drawing functions and image sets and IOU XML Theme Tag provides attributes for all edges and corners.

IOU BgSound Tag and Scripting makes it easy to apply sound effects to Widgets based on Events and Transitions.

XML-based file format for import/export.

Inspired by HTML. A XML/LUA [url="http://glucose.svn.sourceforge.net/svnroot/glucose/Projects/S3GP/S3GP/Debug/Content/Data/UI/iou.s3gp"]S3GXL[/url] Implementation was adopted for the S3GP which includes IOU Widget/Canvas/Input configuration.


[b]Messaging [/b]

[b]References [/b]


To be continued...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this