27.Feb.07 Lecture 5
TGE Game Building and Modeling Introduction

Motivate

Visualize where you want to be. Do you want to stand on the olympic podium, visualize it and make it happen. Do you want to build the next generation killer game? Visualize the end result and keep pushing no matter what the obstacle. Have a clear goald and keep you vision firmly on the goal while always continuing to work towards that goal. Laser focus is the only thing that is going to make a big goal happen.

Projects

Only 70 days left. Do you have a rough design complete? Read the game design section p#829-834. Can you answer all those requirement questions? Can you come up with 20 requirements for your game, similar to the Koob example?

Scope. Remember, scope will be our biggest issue. If you look at Koob, getting in and out of vehicles, driving vehicles in an FPS game will probably be out of scope. Put those types of requirements last and don't make them integral to game play. Get the game play elements working first, then add layers on top of it.

TGE programming intro

Read chapters 3 and 4.

Programmed changes to existing objects. P# 130-142.

Note the calls to get and setTransform. It takes a string and has the following items in the string order.

"X Y Z Xaxis Yaxis Zaxis rotAngle"

Just use your tutorial code to run this example.

When running in the tutorial, press the f11 key and find an object number for one of your items. Then press 411 again to return to the game, and press ~ to get the console. Yes, you can type code directly into the console.

echo(1323.getTransform());

"27.537 -400 0.334187 1 0 0 0"

Which is a simple translation with no rotation. Let's change it's location a little bit.

1323.setTransform("27.537 -400.6662 1.0 1 0 0 0");

All we did was change the z location and move it to the 1.0 location.

Look at the AnimShape function on p139-140. Load the animshape.cs code (it's on the cdrom that comes with the book RESOURCES/CH3/animshape.cs) into your logoitem.cs code and find the object number again. Bring up the console and type DoAnimTest(1323). Note that over time the object moves around on the screen. Why? How could we fix this?

Game Structure and where all the files go. This is overview, but a little different than TGB. P#156

Do you remember way back at the beginning of the semester when we did the C++ game using Win32? Remember most of the code was always the same across applications and you only needed to know a specific portion of the code? This is like that except that the code you will be changing is more dispersed, but most of it is just fluff. The book has a great overview of this code and it is important to take a good amount of time to understand it. When you get stuck on core game engine issues, like servers and clients, make sure you remember to come back to chapters 4 and 5. When you get done with this class, those chapters should show some wear and tear in your book.

EMAGA4

Last week's tutorial gave us a sample of how to use the TGE world and gui editors with a little bit of scripting. This week we are covering Chapter 4 and EMAGA to see a stripped down game with a client and server to see what the core scripting requirements are and how they interact.

Run EMAGA4

Common code (in the common directory).

Servers and Clients and creating the Emaga game

main.cs

control/main.cs

Difference between / (slash) and \ (backslash).

Trace p#168

Initialization

Client/server initialization on p#170

EMAGA5

Run EMAGA5

This is a much better sample as EMAGA4 was really just a walk throught, but it did a lot for as little scripting as was done.

Differences in folders from EMAGA to example games.

I'm just going to go through the book, look at the code and discuss stuff that looks interesting.

Searching Code

I do a lot of code searches when trying to figure out new systems. Windows XP is broken in this regard because it will only search through files with known file types and special registry settings. You can fix that problem here.

Introduction to 3D Modeling

Build a can/barrel for use in your game.

 

CPSC240 - Games Development
Chapman University
Instructor: W. Wood Harter
(c) copyright 2006-2007 - W. Wood Harter - All Rights Reserved
Screen shots on banner (c) copyright their resprective owners