v1.1 - March 2002
"I came, I saw, I conquered." - Julius Caesar

Aw, isn't he cute?
Published
Why is this email in my inbox? What is an independent game developer? What will I be seeing each month? Will you code my homework?
Hey! Didn't they make Deer Hunter?
From the Garage: Tunnell vision
We were going to throw a party to celebrate the launch, but this guy drank all the supplies... even the Windex. ESPECIALLY the Windex!
Case-study of implementing radar
reSource: Radar
Overview of planning, coding, and problem-solving. Don't fret! Learning can be fun... at least that's what the TV says.
Constructive criticism deconstructed
rtfm manual
Just a community service provided to make sure newbies don't go into the game dev world unarmed.

Screw you Jet Grind Radio!
Community Discussion
Cel-shading: artistic revolution, or death of 2d?


A mac... playing a game? Now I've seen it all...
month++
Now your iMac has two uses!
1. Look pretty
2. Play torque-based games

You ask, I answer. Comprende?
Q & A
Questions answered or double your money back.


The list that the Diakatana team swears by
memory leak
You know you're in trouble when the lead designer's description of his hot new game idea starts with, "Well, it's pretty much like Quake..."

Editor's Corner: Published
Aw, isn't he cute?After days of planning, and a few late night writing marathons we finally have the first issue of the GarageGames Community Newsletter out to the public. Now who might "we" be? "We" is only one person right now, so I hope I haven't scared you away with my subconscious ego (or would it borderline schizophrenia?) I am Matt "CaptFallout" Webster, and I'm a programmer, gamer, and college student.
I wandered onto the Garagegames scene a few months back when I was invited to work on a torque-based project, Tactical Assault as a programmer. I liked some of the gameplay features in the project, and the chance to work with the Torque engine would be a great learning experience. I joined the team, and have been drawn into the GarageGames and independent games community ever since.
The purpose of this newsletter is to keep readers informed of advancements in independent game development, as well as providing entertaining and insightful resources for indie game developers and gamers who want a closer look at the games industry and the technical aspect of what goes into the games they play. So, if you were looking for the complete history of the microchip or pi to the hundred-thousandth digit you might want to unsubscribe now. Of course, you "d00dz" on the other end of the intelligence spectrum: don't expect naked women and leet speak. You know what we do to people like you? Elect 'em president! *rimshot*
The only thing I ask of you is to help give ideas on how to make this even more useful and entertaining for the independent gaming community. What topic would you like to see a multi-page article on? What issue do you feel is important to the gaming community, but has been ignored by mainstream gaming press? What gaming company or independent project would be interesting to learn about?
I want to know what you want! If you're interested in writing an article or column please contact me. I welcome creative assistance, and having a few part-time experts helping out would enrich the content and knowledge base of this publication.
- Matt

return to top

From the Garage: Tunnell vision
A fat guy with a wrench: Best. Mascot. Ever.Welcome to the GarageGames community newsletter! Congratulations to Matt Webster for taking the initiative and creating this new method of reaching the GG community. We hope it will become a major source of behind the scenes information, interviews, developer information, success stories, motivational articles, tech tips, and more. As a start on the motivational part, maybe telling how this newsletter started will help many of you that are sitting on the fence or lurking on the GG site to become more involved in the community.

A couple of weeks ago, I got an unsolicited email message from a Hotmail account. Turns out it was Matt, and he was proposing the newsletter that you are reading now. He proposed that he create a sample issue so we could see the quality of his writing, the layout he had in mind, etc. All he wanted in return was a simple email sign up and some community recognition. Well, the rest is history. We loved his work, made a few suggestions, and actually ended up putting the newsletter on the site because we like it so much.

Matt Webster has now been upgraded to a GarageGames Associate, and we gave him a free copy of the SDK. In addition, this work will look great on Matt's resume if he ever decides to get a job in the games industry. I'm sure Matt would accept help from other people that would like to get similar benefits. That is not a blanket statement that gives you a free Torque for writing a couple of articles. As always, we evaluate our Associate applications on the merits of their contributions to the GG community.

Oh, one last point. GarageGames is not exercising editorial control over this newsletter. Matt's opinions are not necessarily those of GarageGames. Although Rick helped with a code snippet that had an error, the rest of the content was solely Matt's. In the future, we would hate to see GarageGames SUCKS as a headline, but helpful criticism and gentle nudging or lobbying would be appreciated.

- Jeff Tunnell, GarageGames

Editors note: Now I have to rewrite the entire next issue since I can't use that headline. Seriously though, this is a newsletter for the community and by the community. Your input is welcome, and in order for this project to truly be a success it's required. So step up, and let your thoughts, ideas, and expertise be heard! Or you can sit idle and allow the next generation of games to be comprised of Pokemon and Tomb Raider clones!

Yeah, I knew that would get you writing...

Thanks to the guys at GarageGames for supporting this project, and providing a bit of guidance and asisstance when it was needed!

return to top

reSource: Radar

Matt Webster - Lead programmer, Tactical Assault

Purpose
The goal of this article is explain the process behind the design and implementation of a graphical radar system that I produced for the project I am currently working on. This will help other people working on a similar effect learn a possible way to implement this feature, and for others to understand how to create a fairly complex interface object.
Design
The quickest way to find the position of all clients is by cycling through the data you already have received from the server. It removes the need to request extra data from the server, which is always a good thing. This will be done by accessing the GameConnection object which can be done by calling the getServerConnection function. In order to optimize the data "search" we'll want to eliminate anything that isn't a shapebase object, or of player type. Of course, this would have to be altered if we want vehicles or other objects on the radar. Image rendering will be done with the help of dglDrawBitmap which is found in dgl.cc.

Outline of processes
  1. Get ghosted data with getServerConnection
  2. Get camera's coords
  3. Search through all ghosted objects with SimSetIrerator
  4. Convert in-game coords to screen coords
  5. Render blips and radar image
  6. Repeat
Graphical outline of radar
Implementation
Now that I have a game plan, I begin with getting the GameConnection object by calling getServerConnection. If the client isn't currently connected, we break out of the function. While not really possible to be rendering the radar without a connection, it's nice to have it for "proper" coding. Also check to see if the client is currently controlling an object. If the client isn't controlling an object (which occurs in observer mode) then break out of the function, since we shouldn't be using radar.

Now that we know the radar should be rendered, it's time to start collecting the data. The first step is by accessing the camera (which is what we'll be using to represent the player in-game) by calling the getControlCameraTransform function. From this matrix, we get the position and the rotation of the camera (position to find distance from other objects, and rotation in order to accurately rotate objects on the radar screen) To iterate through the ghosted objects, we use the SimSetIterator class. Each time through the loop we check to see if the object is a shapebase object, and for now we check to make sure the object is a player. If both cases are true, then we will get the position of the object. The loop will continue until we have gone through all the objects.

Now that we have the data, we need to actually be able to process and render it. The mathematics behind the radar are simple, and involve subtracting the object's position from the client's position. That difference makes the client's position act as the origin for the coordinate plane that represents the radar, which allows the client to be the center of the radar control and make other calculations much easier. We find the angle of the object compared to the client, and add it to the angle of the camera. This in turn rotates the "blip" on the screen, so that when you are directly facing the object it will be drawn "in front" you on the radar image. Neat huh? In order to account for the on-screen position of the GUI control, we must add the current X and Y position of the GUI control to the new coordinates of the radar "blip". That will effectively translate all points to the correct location on screen. In order to render the "blip" graphics we use dgl function dglDrawBitmap, which draws an unresized image at the coordinates specified.

Problems
Well, the biggest was the fact that my original design was slow, flawed, and very resource intensive compared to the newest version. It involved using scripts and the functions that are normally used with explosives and radius-related calculations. Talk about crap! Let's pretend I never mentioned that :P

Many of the features could be implemented to be accessed by the GUI editor in game, but I really didn't need it. If you want it, you're going to have to add it. Don't worry though, it isn't hard to do!

Other notes
Finished radar

While I didn't want to include it above for clarity's sake, above/below radar images were added with only a few minutes of work. It involved adding two more texture handles, and comparing the Z coordinate of the client with the detected object and rendering a different image based on that difference.

Future goals for this UI element is to add colored blips based on team as well as adding "action" images. Person shouting for help? His blip with blink! Shouldn't be too hard, but it's not on the top of my to-do list.

Access the tutorial and source code here

return to top

rtfm manual: Getting started
We all got a bit of JimmyJones inside of us. Make one with the inner-n00b The most difficult way to try to start making a game is with no useful talent. You might have an idea, but ideas are as common as second-homeless Enron execs. You know you can't make a game on your own, but how can you bring yourself to gather up skilled individuals when you've got about as much talent as a dead raccoon? Short answer: you don't. Long answer: you don't, unless you want a group of people who want to kill you for wasting their time.
If you want to keep that game idea from falling into the pit of no return (you know, where you dropped: "design efficient water-powered engine" and "create world peace") you're going to need to take some steps toward bringing it into reality. Some people prefer the "random" method, which involves throwing their idea at random people for months on end until finally someone responds to work on it. That sure as hell isn't something that will ever get you a job, unless the "coming up with ideas, but doing nothing to bring them into reality" position is hiring at your local McDonalds. Even still, teams based on a weak foundation of dependence and incompetence will always be doomed for failure.

Let's take a quick peek into the #gamedevs irc channel, and see what's going on. Maybe we can learn something from what we see?

<Striker76> See now, *that* is the meaning of life.
<Megaman_AZN> Wow, I'll have to write that down sometime. Thanks.
*** JimmyJones has joined #gamedevs
<JimmyJones> Hi.
<Megaman_AZN> Hi Jimmy.
<Striker76> Hello.
<JimmyJones> u want to help make my game? It's really cool.
<Megaman_AZN> Uh, what?
<Striker76> Jimmy, making a game usually takes a lot of time.
<Striker76> What would you be doing in this project?
<JimmyJones> I came up with the cool idea, and I can do some HTML with FrontPage. I made a Quake 2 map once. u gotta hear the idea dudes. It's cool.
* Megaman_AZN groans
<Striker76> Uh, Jimmy hold up.
<Striker76> So you basically have an idea, but no discernable talent whatsoever?
<JimmyJones> I can program some Q-Basic.
<Striker76> Ah okay... I guess that's a start. So you haven't learned any C, C++, or java?
<JimmyJones> No. can u teach me strker76? pls!!!1
<Megaman_AZN> I really hope your joking Jimmy. C++ takes a long time to learn.
<JimmyJones> dude u suck. im gonna go make this game. It's going to be like Counter-Strike except with 100 people and with flamethrowers and it'll look better.
<Striker76> And you plan on doing this with your Q-Basic skills?
<Megaman_AZN> lol!
<JimmyJones> stfu mofo.
<Striker76> Jeez, we try to help and you start acting like a little kid... I wonder why?
<JimmyJones> u suck
*** JimmyJones has quit IRC (Quit: u suck)
<Striker76> Words escape me.
<Megaman_AZN> As they should... I don't think any one derogatory comment would sum up that little punk-ass.

Ah, poor JimmyJones. All he wanted was someone to make his game for him. It's not like he was going to show them any respect or courtesy. I mean, isn't Jimmy being nice in offering to share his amazing ideas?

Seriously, JimmyJones' are very common in independent game development. They get an idea, and wander around hoping someone will put it together for them like a frustrated child on Christmas day. "Daddy, my transformer won't transform! Fix it now!". I personally have spoken with a handful of them, and it's not that them being narrow-minded or fickle really annoys me. It's the persistence of their inconsiderate pleadings. They don't need to wait in lines, they don't answer to the rules of respect or manners, and most words are abbreviated in order to save them a few precious seconds. After all, their time is the most important thing... to them.

If you are just starting out, learn to accept your limitations. You can't program? Fine. Can't model? Fine. Can't draw? Fine. Others around you will probably have some useful skills. Learn to respect their abilities. If you need help with programming, don't find a good programmer and email him asking for him to code you something. Discuss things with him and ask him for help, but only on his time. Forcing things on people who are voluntarily helping you is rude, and will eventually stop them from wanting to help you.

When asking for help, learn to give all the details on your problem. Saying: "I can't get it to compile" is pretty worthless if you're looking for help. Why can't you get it to compile? What is the exact error message? Have you installed everything correctly? Did it compile correctly before? Details!

The easiest way to get help is when people take you seriously. Why should they explain how classes work when you're still claiming you'll be making the next popular MMORPG? They've been around the block and know that's not something rookies can do, so why should they waste their time trying to help you with it? There's no shame in starting small and working your way up to larger more advanced games or features. It allows you to work at a much more comfortable pace. It's definitely the recommended route to go, but it requires patience. You won't get some amazing Quake 3 look-alike, but you will be developing your skills.

Let's run-down the important points mentioned here this month:
  • Don't think a cool idea will build a solid team. A solid leader builds a solid team.
  • Be polite with those helping you. You're lucky they're offering to help you at all.
  • Accept your limitations. No one makes a great game on his or her first try.
  • Take suggestions from experienced individuals. If you can learn from their mistakes, do it.
  • Start small. If you've never programmed, don't use a massive project as a way to learn it.
  • When asking for help, give details that will help others solve your problem.

return to top

Community Discussion
cel-shading

As you all know, the rendering style dubbed "cel-shading" is insanely popular with game developers at this point in time. It began with the amazingly cool Jet Grind Radio for the ill-fated Dreamcast, and now it seems that everyone is trying to jump on the Cel-Shaded Band Wagon, but for what reason?

2d or not 2d...

Jet Grind Radio wasn't a major seller in the US or Japan, and that was when Tony Hawk Pro Skater games were (and still are) insanely popular. Even more painful is the fact that JGR probably didn't get a review below "buy it now!" and was praised to have innovative gameplay and one of the best game soundtracks in years. So why is everyone jumping on, when this technology didn't really do much in terms of attracting sales, even when paired with killer gameplay?

In the past year, we've seen cel-shading invading classics like: Zelda, Bomberman, Sonic the Hedgehog, and good ol' farming/marriage simulation, Harvest Moon. Of the games released so far, none have really "blown up". Some have just plain fizzled out. So what keeps masses of developers flocking to cel-shading?

Does this surge of interest in cartoon 3d spell the death of 2d? There only remain a small handful of 2d games left; namely Worms, Street Fighter, Diablo, and many real-time strategy games. While I personally would kill to see Worms in 3d, cel-shaded, sheep-exploding glory... Street Fighter just wouldn't seem right. I mean, look at the abomination PS2 owners got with Street Fighter X3!

So what do you think? Is cel-shading going the way of the hoola-hoop? Will the faux-2d "revolution" crush the 2d mainstays we've all grown to love? Will the use of simple graphics create an influx of simpler, arcade-style games?

Post your opinions here

return to top

month++

GarageGames and Torque news Wheeled Vehicle updates
Linux torque
Torque Core Project
Torque Game Engine for the Apple Macintosh
Tutorials Programming nodes in a model [Torque] - GarageGames tutorial, Justin Mette
3d object selection [Torque] - GarageGames tutorial, David Meyers
Adding a gui control: Health indicator [Torque] - GarageGames tutorial, Xavier Amado
Lens and sun flares [Torque] - GarageGames tutorial, Tim Newell
Industry news & reccomended articles Bad Game Designer, No Twinkie III - Gamasutra.com feature
Techniques for Achieving Play Balance - GameDev.net feature
Grand Theft Auto 3 + Enron = Take-Two Interactive - ConsoleWire.com news
Removing The 'Tech' From 'Design Document' - GameDev.net feature

return to top

Q & A
How come my 3d sound isn't working correctly?

I've been trying to add 3d sound to the project I'm working on, and it's not working correctly. The sound file plays when I want it to, but it does not sound 3d. No matter where I am it plays at 100% volume, and I can't figure out why. Please help.

R. Jacobs

Edwin Armstrong:
suicidal father of modern stereoMatt responds: It sounds like the problem is with the sound format you are using. This stems from the attempted use of stereo sounds for 3d audio playback. Mono sounds are required if you want to use 3d sound playback due to how 3d sound processing works.

Stereophonic sounds have two or more separate audio channels where the signals have specific levels and relationships to each other. Stereo can simulate the position and perspective of sounds in 3d space. Monophonic sounds' audio signals are mixed together and routed through a single audio channel, resulting in the same product no matter the location of speakers or the listener.

To sum it up, stereo sound contains multiple channels to mimic 3d, and mono sound does not. Since mono sound is simpler, it allows it to be controlled by the software and hardware easier than stereo sound. So if you want 3d sound to work, make sure your sounds are mono.



Linux woes

Torque compiled fine in Linux but when I try to run it hangs and I have to kill the process. What is wrong?

R. Jackson

Guest, Tim Newell responds: You probably are missing a library and it's not loading the graphics. To see if this is the case run the torque demo with the -console argument (./torqueDemo_DEBUG.exe -console) and see if it gives you any errors. Those errors should be clear enough to help you figure out what files you might be missing. Good luck.



FPS for your FPS... or whatever you're making with Torque

How do I get the frame-rate for my game? I'm using Torque, and I can't figure out how.

A. Wilt

Matt responds: Most all of the debugging print functions are located in the client script file "metrics.cs", and it's broken down into 10 different categories: audio, debug, interior, fps, time, terrain, texture, video, vehicle, and water. The category you'll need is "fps", and in order to turn it on you'll need to use the console function:

metrics(fps);

Easy, huh? Well, let's make this even easier, by binding a key that toggles showing the fps. Drop this toggle server command anywhere outside of a function in default.bind.cs which is located in fps\server\scripts\

$ShowFPS = false;
function toggleShowFPS(%client)
{
     if (!$ShowFPS)
     {
          metrics();
          $ShowFPS = true;
     }

     else
     {
          $ShowFPS = true;
          metrics(fps);
          $ShowFPS = false;
     }
}

And finally, we bind a key (I use F5) to trigger it all. Most keys are bound in config.cs which is located in fps\client\scripts\ so let's go there and put this command in:

moveMap.bind(keyboard, "f5", toggleShowFPS);

Hopefully this is useful for you, and for everyone else who wanted to add a server command, toggle button, or mess with the debug script functions.



What the f???

Sorry, I know this is a really dumb question, but the answer has slipped my mind. What is the significance of the f after some numbers in C++ code? Thanks.

S. WayNot THAT kind of float...

Matt responds: The "f" (case doesn't matter in some compilers like MSVC++, but in others it does. I reccomend using "f") is used to tell the compiler that you want that decimal number to be interpreted as a variable of type "float" as opposed to the default "double". As the name would suggest, double is twice as accurate and twice as slow. It's recomended that append an "f" to all constant variables, since you're defining them and it would be a waste to use up any more memory trying to store the value. Well, that and "3.2f" looks so much cooler then just plain 'ol "3.2".



Making a script function in C++

I want to add a c++ function that is accessible by my scripts. Is that hard to do?

K. Weaver

Matt responds: Making the function accessible to scripts only takes a few lines of C++. Making the function itself can vary from cakewalk to dodging traffic blindfolded. Since I don't know what you're going for, I'll just run-down the steps needed to create a C++ function that can be used in scripts.

Step 1: Make sure #include "console/console.h" is included at some point or path in the .cc file you're working in. A handful of other Torque helper files include it, so you don't want to include it more than once. Use this code in your header file to prevent that:

#ifndef _CONSOLE_H_
#include "console/console.h"
#endif

Step 2: Use the ConsoleFunction command to determine the script function's name, return type, maximum input variables, maximum input variables, and usage string.

ConsoleFunction(functionName, void, 2, 2, "functionName(input)")
{
     [function code goes here]
}

Step 3: Write the function!

Now one thing that can be confusing are the 3rd and 4th variables that ConsoleFunction accepts. You must remember that it will always be one higher than the actual number of variables entered due to the class name of the object being counted as 1 (even if it isn't used) So if your function accepts 3 variables, your minimum and maximum input variables should be 4.

In order to access the variables sent to the function from scripts, you'll need to use the array argv. Remember, array element 1 is "0" in C++. Since the first element of array argv is always filled (you have no control over it) the first element you'd want to deal with is argv[1]. So to deal with the 4th variable sent from script to this function, you'd refer to argv[4].



Post your questions reguarding this issue here.

return to top

memory leak
What, me worry?
Worried your project is headed down the tubes, but unsure if you're past the point of no return? Here's a helpful (and very funny) guide compiled by game design professionals. I won't say which, but one really reminds me of a problem my team is having... it's almost scary. Here's the real background on why this collection of "realisms" was created:So THAT's where Romero went...

"Background: This page began when we were all in the office late one night trying desperately to get a demo for our Playstation game done before the customer showed up. It was late, we were all tired, and then as we were driving around the database (it was a tank game) we came around a ridge and saw--the face of Jesus Christ on the side of the mountain! Plain as day too. Nobody put it there...it was just sheer coincidence that the texture maps for the mountains came together in that spot that way. Somebody said, "Wow, you know your game is in trouble when Jesus appears in your texture maps", and thus this page was born."

You know your game is in trouble when...
...when your lead programmer asks, "Should this game be compatible with DOS 3.2?"...
...when even your AI won't play the game - it just deletes itself...
...when you use a model AS the sound file, and it sounds BETTER...
...when your design document is about as long as your resume...
...when you spend more time putting together progress reports than actually adding new features to the game...
...when your development computers don't meet the game system requirements...
...when running your game doubles as an easy way to reboot your computer...

More signs of the impending dev Armageddon

return to top