ChapterPDF Available

Virtual Reality Game, Game Engine and Xna Framework

Authors:

Figures

Content may be subject to copyright.
1
VIRTUAL REALITY GAME, GAME
ENGINE AND XNA FRAMEWORK
Ahmad Hoirul Basori, Abdullah Bade, Daut Daman,
Mohd Shahrizal Sunar
INTRODUCTION
Virtual reality (VR) has become the main consideration to simulate
real interaction into virtual environment. On the other hand, games
also hold important rules to handle military training, medical
systems and education known as Serious Game (Chen 2006). The
combination between virtual reality and game called Virtual
Reality Game (VRG) has given a new opportunity to merge
entertainment aspect with educational material (Virvou et al. 2006;
Rossou et al. 2004).
BACKGROUND
Capilla et al. (2004) classified the complexity of virtual reality into
several elements:
Using special hardware like: haptic device or head mounted
display devices, etc.
Complication of user interface and interaction
3D modeling
Collision, physics and deformation
Presence of user in virtual environment
2Ǧǣ
 
In addition, researchers on VR emphasize on game research
and development. Zyda (2005) defines serious game as
serious game is competition of psychological, playing the
game using real rule that generated from human rules,
further more it also used for government or commercial
training, education, health, and public policy.serious
game also use pedagogy to stimulate game instruction in
order to increase play experience”.
See Figure 1.1 for detail information.
Figure 1.1 The taxonomy of Serious Game (Zyda 2005)
Ǧǣ 3
 
Michael (2006) gives another definition for serious game,
Serious game, game that educate, train and inform
He focused on how games are able to transfer message and
influence the players with the game rules. Victor (2000) also stated
that virtual reality in the future needs to complement and
enhancement of image processing and realism.
GAME ENGINE AND XNA FRAMEWORK
Good quality of virtual reality game application should use game
engines to handle virtual reality elements such as collision
detection, physics and hardware communication. Currently, game
engines have advanced technology that can provide and facilitate
better visualization and communication between graphics
hardware, sound hardware and application (Marks 2007).Game
engines has already evolved and become more powerful and able
to handle all graphics and visualization computational process for
instance of loading highly complex primitive, terrain, constructions
of trees, stones, cloud, ocean, sky and loading thousand of textures.
Game engines are able to create a virtual reality game application
on desktop platform. Game engines like Torque, Half Life, Irrlicht,
even XNA Framework or DirectX Library have the facilities to
display 3D model from a variety of 3D file format.
A. Irrlicht
Irrlicht is an open source game engine built in C++
language (Figure 1.2). It is able to load several 3D model
like .3ds, .x, .md2 (quake file) and basic object file model
like .obj.
4Ǧǣ
 
Figure 1.2 SpecialFX sample (Screenshot from irrlicht game
engines).
The implementation of loading 3D models is shown in the
following fragment of the source code.
#include <irrlicht.h>
#include <iostream>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
int main(){
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
//loading 3d model file(Quake File) from particular directory
device->getFileSystem()->addZipFileArchive("../../media/map-
20kdm2.pk3");
// The next Step is loading the mesh and play the animation inside the
mesh
scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
scene::ISceneNode* node = 0;
Ǧǣ 5
 
B. XNA Framework
XNA framework is a bundled library from Microsoft for
Xbox game platform which is generated from .Net
Compact framework 2.0. It has been launched on 2006 and
the current version is XNA 3.0 which is compatible with
Visual Studio .Net 2008. XNA is also free to be used as a
tool for developing virtual reality/game and serious game
application in Windows platform. XNA framework uses C#
programming language as a core language to develop an
application. Some of the included games are Racing Game,
Ship Game, Rocket Commander and etc (see Figure 1.3).
Figure 1.3 Game applications build using XNA Framework
(screenshot from http://creators.xna.com/en-
US/education/starterkits/)
6Ǧǣ
 
Unlike, Irrlicht XNA has a limitation on 3D models are
supported by XNA such as .fbx, .x, .md2 and collada file
format. The following code fragment can be used to load
and display 3D model on the screen.
Model myModel;
float aspectRatio;
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
myModel = Content.Load<Model>("Models\\ship");
aspectRatio = graphics.GraphicsDevice.Viewport.AspectRatio;
}
Vector3 modelPosition = Vector3.Zero;
float modelRotation = 0.0f;
Vector3 cameraPosition = new Vector3(0.0f, 50.0f, 5000.0f);
protected override void Draw(GameTime gameTime)
{ graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
Matrix[] transforms = new Matrix[myModel.Bones.Count];
myModel.CopyAbsoluteBoneTransformsTo(transforms);
foreach (ModelMesh mesh in myModel.Meshes)
{
foreach (BasicEffect effect in mesh.Effects) {
effect.EnableDefaultLighting();
effect.World = transforms[mesh.ParentBone.Index] *
Matrix.CreateRotationY(modelRotation) *
Matrix.CreateTranslation(modelPosition);
effect.View = Matrix.CreateLookAt(cameraPosition, Vector3.Zero,
Vector3.Up);
effect.Projection =
Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),
aspectRatio, 1.0f, 10000.0f);
}
mesh.Draw();
}
base.Draw(gameTime);
}
// Add this code to update method
modelRotation +=
(float)gameTime.ElapsedGameTime.TotalMilliseconds *
MathHelper.ToRadians(0.1f);
Ǧǣ 7
 
CONCLUSION
Virtual reality game development can be implemented using
several existing game engines such as Irrlicht and XNA
framework. However, to build a realistic virtual reality game
application, it needs more complex object model, communication
with devices such as haptic devices, HMD and human emotion as
part of the intelligence elements for virtual reality game characters.
REFERENCE
MICHAEL,S.CHEN, “Serious Game, game that educate, train, and
inform “, Thomson Johnson technology, Thomson Course
Technology PTR, Boston, USA, 2006.
M. ROSSOU, Learning by Doing and Learning through Play: An
Exploration of interactivity in Virtual Environments for
Children, "ACM Journal of Computers in Entertainment”,
Vol. 2, No.1, 2004,pp.1-23.
M. VIRVOU, AND G. KATSIONIS, On the Usability and likeability of
virtual reality games for education: The case VR-ENGAGE
"Journal of Computers and Education", 2006, Vol.50,
pp.154-178.
RAFAEL CAPILLA,MARGARITA MARTINEZ, “Software Architectures
for designing Virtual reality applications”,EWSA
2004,pp.135-147,Springer-Verlag Berlin Heidelberg 2004.
STEFAN MARKS,JOHN WINDSOR,BURKHARD WUNSCHE, Evaluation
of Game Engines for Simulated Surgical Training,"
Proceedings of the 5th International Conference on Computer
Graphics and Interactive Techniques in Australia and
Southeast Asia(GRAPHITE )",December 2007. pp.273-318.
ResearchGate has not been able to resolve any citations for this publication.
Conference Paper
Full-text available
Software architectures are particularly useful when designing complex systems. Apart from facilitating the design, development and evolution processes, software architectures help developers who are new in the domain to understand the design issues involved, reducing the learning effort. In this work we present a software architecture for virtual reality systems. This architecture applies patterns common in other interactive systems, such as the Model-View- Controller, and also identifies new patterns proper of the VR domain, such as the scene graph. In addition, in the proposed architecture we have identified the variability points needed for adapting and evolving such VR systems.
Conference Paper
Full-text available
The increasing complexity and costs of surgical training and the constant development of new surgical procedures has made virtual surgical training an essential tool in medical education. Unfortu- nately, commercial tools are very expensive and have a small sup- port base. Game engines offer unique advantages for the creation of highly interactive and collaborative environments. This paper examines the suitability of currently available game engines for developing applications for medical education and sim- ulated surgical training. We formally evaluate a list of available game engines for stability, availability, the possibility of custom content creation and the interaction of multiple users via a network. Based on these criteria, three of the highest ranked engines are used for further case studies. We found that in general it is possible to easily create scenar- ios with custom medical models that can be cooperatively viewed and interacted with. Limitations in physical simulation capabilities make some engines unsuitable for fully interactive applications, but they can be used in combination with predefined animations. We show that overall game engines represent a good foundation for low
Article
Coverage includes- David "RM" Michael has been a successful independent software developer for over 10 years, working in a variety of industries, including video games. He is the owner of DavidRM Software (www.davidrm.com) and co-owner of Samu Games (www.samugames.com). Michael is the author of The Indie Game Development Survival Guide, and his articles about game design, development, and the game development industry have appeared on GameDev.net (www.gamedev.net) and in the book Game Design Perspectives. His blog about independent games, serious games, and independent software is Joe Indie (www.joeindie.com). Sande Chen has been active in the gaming industry for over five years. She has written for mainstream and industry publications, including Secrets of the Game Business, and was a speaker at the 2005 Game Developers Conference. Her past game credits include Independent Games Festival winner Terminus, Scooby-Doo, and JamDat Scrabble. Chen holds dual degrees in economics and in writing and humanistic studies from the Massachusetts Institute of Technology, an M.Sc. in economics from the London School of Economics, and an M.F.A. in cinema-television from the University of Southern California. In 1996, she was nominated for a Grammy in music video direction. She currently works as a freelance writer/game designer. Covers techniques to make entertainment-oriented games richer and provide a deeper experience. The focus on serious games continues to grow--from coverage in the media to conferences and buzz within the game development community. Provides an overview of the major markets for serious games, including current examples and future anticipation.
Article
Educational software games aim at increasing the students’ motivation and engagement while they learn. However, if software games are targeted to school classrooms they have to be usable and likeable by all students. Usability of virtual reality games may be a problem because these games tend to have complex user interfaces so that they are more attractive. Moreover, if the games acquire an educational content they may lose the attractiveness and appeal that they have on users who are familiar with commercial games. Consequently, likeability may also be questioned. In this paper, we address the issue of usability and likeability of a virtual reality game that is meant to teach students geography. We describe the evaluation experiments conducted, which involved three categories of students in terms of their level of game-playing expertise: novice, intermediate and expert game players. The evaluation results showed that the game was indeed usable and likeable but there was scope for usability and likeability improvement so that the educational benefits may be maximised for all categories of students. The evaluation studies reported in this paper, revealed important issues about further research on virtual reality educational games.
Learning by Doing and Learning through Play: An Exploration of interactivity in Virtual Environments for Children
  • M Rossou
M. ROSSOU, Learning by Doing and Learning through Play: An Exploration of interactivity in Virtual Environments for Children, "ACM Journal of Computers in Entertainment", Vol. 2, No.1, 2004,pp.1-23.