First Person Shooter Game - The Journal of Object Technology

Transcription

First Person Shooter Game - The Journal of Object Technology
JOURNAL OF OBJECT TECHNOLOGY
Online at http://www.jot.fm. Published by ETH Zurich, Chair of Software Engineering ©JOT, 2007
Vol. 6, No. 10, November - December 2007
First Person Shooter Game
Rex Cason
Erik Larson
Jonathan Robertson
Jonathan Frisch
George Trice
Dr. Lakshmi Prayaga
Abstract
3D game development is an exciting activity for many students. But getting a handle on 3D
game development for novices may be a daunting task. We take this opportunity to present a
quick introduction to 3D game development through a few tutorials. For the next few columns a
set of tutorials for a 3D first person shooter game developed by graduate and undergraduate
students under the guidance of a faculty member from the University of West Florida will be
presented. These tutorials were developed with 3D game Studio by Conitec. To follow along,
download the software from www.conitec.com. These tutorials include all elements of game
development such as modeling and animation, lighting, collision detection, sound and scripting.
Each tutorial will focus on one or more of these aspects. This issue we start out with creating a
room and adding some objects to the room. The instructions for this are presented below.
DESIGNING A ROOM
This software package comes in three parts: the World Editor (WED for short), the Model Editor
(or MED), and the Script Editor (or SED). The WED is responsible for the organization of your
3D world and the placement of Actions (which have to do with scripting and will be discussed in
later entries) within entities. MED is a tool that allows the construction of 3D models (boxes,
boats, etc.) that are used and oriented within the WED. The SED, on the other hand, is nonvisual. This is where the programming takes place. The code developed in the SED is what
allows your characters to move around, talk, or even explode. The bases of these three forms of
programs are fundamental steps for developing a game. Anywhere you go in the world of Game
Design; there will be a minimum of three environments that these programs represent: Level
Development, Graphics Design, and Programming.
Cite this article as follows: Rex Cason, Erik Larson, Jonathan Robertson, Jonathan Frisch, George Trice,
Dr. Lakshmi Prayaga: “First Person Shooter Game” Journal of Object Technology, vol. 6, no. 10,
November - December 2007, pp. 39 - 49 http://www.jot.fm/issues/issue_2007_10/column5
FIRST PERSON SHOOTER GAME
In this tutorial, we will be using the A6 version of Game Studio, but future versions of
this tutorial section; we hope to be utilizing the new A7 engine.
To start, let’s begin with some basic level design. We will add more onto this room
(and/or the concept of this room) in future tutorials, so be sure to store your work in a safe
place. The entirety of this tutorial will take place in the WED.
Even if you’re not sure how you
want your room to look, it’s generally
best to begin by adding a hollow cube
(Notice Image to the Right)
To change the view of the pane,
use the F5, F6, and F7 Keys
Your cube should look something like
this…
This is in
the Wire
Frame
(F5) view
40
JOURNAL OF OBJECT TECHNOLOGY
VOL. 6, NO. 10
There are a few toolbar buttons that are good to know about…
VOL. 6, NO. 10
JOURNAL OF OBJECT TECHNOLOGY
41
FIRST PERSON SHOOTER GAME
ÆEnter Move Mode and click on the cube you just made…
Before
After
Notice how the frame of the cube changes to red! This is the color used to indicate if a
shape is selected. It will be represented in this way when anything is selected within the
object panes
Also, notice the different colored
arrows...
This means that while one of the arrows
is selected, only that axis will be moved
The Green Arrow controls the y-axis
movement
The Red Arrow controls the x-axis
movement
The Blue Arrow controls the z-axis
movement
These arrows apply for
scaling and rotating as well!
42
JOURNAL OF OBJECT TECHNOLOGY
VOL. 6, NO. 10
ÆNow enter Scale Mode
Notice that the arrows remain – But now the arrows have a different function
For example; if you select the Red Arrow and move the mouse,
then the x-axis will scale – but not the other axes
We just scaled along
the x-axis!
The shorter walls
have also
increased in
thickness. This is
because the
entire object
was scaled –
not just the
floor, ceiling,
and the now
elongated walls
Now feel free to scale
the object along the
y-axis (Green Arrow)
VOL. 6, NO. 10
JOURNAL OF OBJECT TECHNOLOGY
43
FIRST PERSON SHOOTER GAME
But what if we want to change the shape of only one of the walls?
The solution is to Scope Down. This is a process in
which an object that is made of multiple shapes is
broken
down into its individual shapes! In this way, the object
(or prefabrication) can be modified on the fly!
When an object is Scoped Down,
only that object comes into view.
(i.e. enemies, objects, furniture, etc will all
disappear until the object is Scoped Up to its
original configuration
44
JOURNAL OF OBJECT TECHNOLOGY
VOL. 6, NO. 10
Now we need Textures.
Click the Textures tab to see
the available textures.
However; there don’t seem
to be many of them…
The way to solve
this is to enter the
Texture Manager
Select Add WAD
and then open
“standard.wad”
from the list
Notice that
there’s a new
section in
your Textures
tab!
As can be perceived,
there are plenty
more textures to
work with now!
Standard.wad p1
VOL. 6, NO. 10
JOURNAL OF OBJECT TECHNOLOGY
Standard.wad p2
45
FIRST PERSON SHOOTER GAME
Let’s quickly apply a “wood”
texture to our entire room.
We can achieve this by going
into Select Mode and dragging
the mouse over the entirety of the room
For my example, I’m using
“woodflhori” texture
But we also need a sky!
So this time, select only the ceiling
part of the room, and find a sky texture
For this example, I’m
using the “skywhite”
texture
Now, Scope Up so you can treat the room’s infrastructure as one object again
Save your game!
46
JOURNAL OF OBJECT TECHNOLOGY
VOL. 6, NO. 10
Now, Build your level, and Run your level! (Build should work correctly with just the
default settings)
When the dialogue boxes come up, just click OK
When you run the level,
you may have to look
for your
building… The game
places the initial
camera at the origin of
the level and looking to
the right (direction of
+x). To fix this, simply realign your level to be
centered in the origin
VOL. 6, NO. 10
JOURNAL OF OBJECT TECHNOLOGY
47
About the authors
Rex Cason II has been working with Dr. Prayaga in the UWF Game Department for the past
few semesters. He currently possesses a Bachelor’s degree in Computer Science and is working
towards a Master’s degree in Software Engineering at the University of West Florida. Rex is also
an active member in the Association of Information Technology Professionals (AITP). In
addition to his studies, Rex works part time at the Institute for Human and Machine Cognition
(IHMC), where he is currently working on developing software to coordinate the actions of
semi-autonomous robotic vehicles.
Erik Larson has been working with computers since he had purchased a cheap 386 IBM
Compatible in 1995. In 1999, he entered the United States Marine Corps and pursued a
specialization in computers. Today he is working towards a Master's degree in Software
Engineering with the University of West Florida. He currently possesses Bachelor's degrees in
Information Technology and Computer Information Systems with minors in Computer Science,
Internet Technologies and e-Business also from the University of West Florida. He is a member
of the Phi Kappa Phi, Gamma Beta Phi, and Upsilon Pi Epsilon Honors Societies.
Jonathan Robertson currently works at the Game Design Department of the University of West
Florida. A student of UWF as well, his studies is focused on the field of Information Technology
and Computer Science. His experience, though not without focus, is spread out over most if not
all areas of Game Design (including but not limited to game development programming, art
primarily limited to character design, music, story development, statistical balancing, gameplay
enhancement, and minimal project management).
Jonathan Frisch is working for a degree in Digital Media and studying animation/modeling
itself and in games and movies. He hopes to get into the animation/modeling field of game
development or movie production. His ultimate future goal is to be an independent film
writer/director.
George Trice III is an Honors student double-majoring in Interdisciplinary Information
Technology: Digital Media and Art with a Digital Specialization. His minor is in Communication
Arts. He's been a gamer since age 5. Favorite game of all time: Super Mario World
VOL. 6, NO. 10
JOURNAL OF OBJECT TECHNOLOGY
49
FIRST PERSON SHOOTER GAME
Dr. Lakshmi Prayaga has recently completed her ED.d program from the University of West
Florida. She has been actively working on the influence of games in education. In partnership
with Escambia county in Florida, she was awarded a $1.5 million grant from the Florida
department of education to develop serious games for 7th and 8th graders for mathematics and
its relation to real life careers. These games will be implemented during this fall (2007). She is
starting a gaming curriculum at the University of West Florida, and some of her students are
working on the tutorials for a first person shooter game that will appear in the next few columns.
50
JOURNAL OF OBJECT TECHNOLOGY
VOL. 6, NO. 10