Category Archives: Game Dev

GDC16 – Day 2

So yesterday was all math, and today was all education. …well sort of. Academic artists have a world view that is quite different from that of your typical scientist. I come from a very analytic background. Even my hobbies, playing poker and racing cars, and my artistic work in photography are a blend of the creative and the analytic. Once I wrapped my brain around the different way in which they were looking at the problem of pedagogy, there were some good take-away points from the morning and afternoon sessions.

One of the things that true of both artist and scientist is that we fail, and I mean we fail a lot. Most of our careers is spent creating one failure after another. This is NOT a bad thing, unless it’s the only thing you’re doing. The road to success is lined with a long sequence of failures, and those who do succeed accept this and even embrace it. When students finally arrive in a college classroom, they are absolutely terrified of failure. Personal note: This should not be a surprise given how frequently we subject our kids to high-stakes standardized testing, but that’s a topic for another article. Game development, much like the development of a new scientific model, is a process of constant iteration. You try, test, fail, tweak, test, fail, rinse and repeat. So many of our students are fearful of that initial failure that they don’t even attempt the work and fail in a far more destructive way. Mitigating, navigating, and learning from failure through iteration is paramount in game development just as it is in science, but it’s a tough thing to teach.

There were more ideas that I picked up throughout the day, but nothing really groundbreaking. I have some ideas related to the iteration process and managing failure I mentioned above that I will craft into some new exercises for the Astronomy courses. I’ll have more on that as I develop the idea into more than just thoughts in my head.

The last talk I attended was by Margaret Moser, “Teaching Designers to Code”. I thought that this would be useful not only because we occasionally get a more design-focused student in the Math and Physics for Games course, but also because even many of the programming-focused students are really just learning how to code efficiently. The two big take-away items here were not ones that were startling revelations, but rather stern reminder of what I already knew and should be deploying in my classroom. Something I could do better when describing algorithms in class is not to start writing line-items of pseudo code or equations, but instead to start with a block diagram of the process. This, of course, is the key to coding more complex solutions. Don’t think in terms of individual lines, but think in terms of functional blocks. That’s how I think of my scientific work. Think about the big blocks of the problem before you drill down into writing specific equations.

BeldonPlace_smThe evening ended brilliantly. Professor Hanna and I made our way down to a region where my good friend and fellow photographer, Bash Beard, took me when I was in town for the AGU Fall Meeting, Beldon Place. At first, it just looks like a sketchy back alley, but when you peek around the corner, it’s lined with one amazing restaurant after another with just about every type of food you can think to eat. We tried the last restaurant at the end of the alley, Brindisi Cucina Di Mare. Of course I was going to sniff out a seafood joint. What else did you expect?

Tomorrow is the first day of the main conference which means SWAG!!! The Expo Hall opens and it’s time to meander around the vendor booths and see what kind of cool loot I can drag back for my students, for Lillian, and for my officemate’s geocaches. It’s also the day of the Game Developers Choice Awards. Think the Oscars for video games, only with a bit more edge to it.

GDC16 – Day 1

It’s Math Day!!! The first two days of the Game Developers Conference is always given to specialty tracks and summits. For the past twelve years, there has been a Math for Game Programmers summit on Monday and Physics for Game Programmers on Tuesday. They’ve combined the two into a one-day summit, with the majority of talks being focused on the mathematics, but often with the physics of the game play in mind. As with any conference, some of the talks are huge hits, some are misses, some are good talks but not directly pertinent to your work or interests. This was the case on Monday as well. Fortunately, there were far more hits than misses. On the balance, it was a fantastic summit.

First up was J. Kyle Pittman (@piratehearts) to discuss jump physics. In our course, Math and Physics for Game Programmers, we teach students the basics of uniformly accelerated motion and the Forward Euler Method for numerical integration. When doing this, we certainly talk about free-fall motion and the kinematics of a jump, but Mr. Pittman made some great arguments for why doing jumps physically correctly could often be incorrect for good game play. Often, the acceleration due to gravity, g, is preset to a given value, often 9.8 m/s2 downward, and the dynamics of a jump are then determined by the vertical velocity, v_y, of the jump. This can lead to, although realistic, jumps that feel too floaty or too heavy, and often jump physics that do not match the necessary trajectories demanded by the level design. Rather than pre-determining the value of g, Mr. Pittman suggests allowing it to be determined by the constraints of the level design. If a gap distance and maximum height are known, the value of g and v_y can be calculated so that it is possible for the character to complete the jump.

 g = - \frac {2 h} {t_h}
 v_y = \frac {2 h v_x} {x_h}

where h is the maximum height of the jump, t_h is the time to reach the maximum height, v_x is the maximum horizontal speed of the player’s character, and x_h is the horizontal distance covered to the reach the maximum height. Combining these yields a value for the acceleration due to gravity that relies solely on the level design parameters and ensures that a jump is makeable by a player.

 g = - \frac {2 h {v_x}^2} { {x_h}^2}

Groovy!

The other technique Mr. Pittman explained was using a different value for gravity for ascent versus decent. Mario’s jump physics included increasing the acceleration due to gravity by a factor of three once the jump reached it’s maximum height. This, of course, is physically inaccurate, but in developing a game, you’re goal is to produce good gameplay with believable physics, but simulation-level accurate physics. It’s funny how our brains will sometimes see a simulation that is physically accurate, but believe it’s totally fake.

Next up was Squirrel Eiserloh’s talk on camera shake. I always think of this as the Star Trek effect. When there’s trauma to a player, either from being hit or landing on a surface after a jump or fall, a bit of camera shake can lend realism to the visuals, much in the same way as camera shake was used, perhaps overused, in the original Star Trek episodes to indicate trauma to the ship. The big take-away from this talk was to use both rotational and translational shake in 2D environments, but only rotational shake in 3D. If you jitter the translation of a camera, you can easily end up with the camera inside of a wall. In a VR environment, just don’t, unless it is your intent to cause motion sickness and nausea in your players.

Later in the day, Simon Strange discussed finding distances in the training simulator, Strike Group Defense, a serious game designed to train Navy personnel on the best anti-ship missile defense strategies and tactics. Since naval engagements happen over hundreds of miles, the curvature of the earth is significant and must be taken into account. Given this, the game makes use of spherical coordinates to determine distance. Rather than using the complex trigonometry of calculating arc length on a great circle between two points, Mr. Strange opted instead to rotate the world so that the player was at the north pole. This means that the polar angle is a direct measure of the distance between the player and any point on the map, d = R_{Earth} \phi. This is brilliant, and something that Prof. Grondahl and I have tried to explain to our students over the years. Invest in a bit of work up front in order to save a lot of work later on. This is exactly what this method does. You invest in a bit of work ahead of time to rotate the player position to the +z-axis. After you do this, calculating distances on the curved surface of the Earth is a simple and, more importantly, computationally cheap calculation.

The last talk that I’ll highlight is from the always brilliant Gino van der Bergen. This year’s talk was on enforcing rotational joint limits in quaternian space. Quaternians are awesome mathematical objects first developed by Hamilton in the late 1800s. In fact, Hamilton was so excited about his recognition of the key to quaternian on his way home from the pub that he etched the basic complex numbers rules into the stonework of a bridge in Dublin. You have to love mathematical graffiti. Mr. van der Bergen did a great job of explaining why and how quaternions eliminate the singularity and degeneracy issues inherent in traditional matrix-based rotation operators.

Keep an eye on the website Essential Math. You can find slides from the Math for Game Programmers summits of previous GDCs, and in time the 2016 slides, including Mr. van der Bergen’s presentation on quaternian space, will be posted for public consumption.

At the end of the day, I took my camera and set out to capture some images around the Powell and Market region. If you’ve ever been in this area of San Francisco, you know there is a significant homeless population. The reasons for persons finding themselves homeless are as various and unique and the people themselves, but one thing that is common among them is their effective invisibility. Of course, people physically see them, but they consistently choose to disregard their presence, treating them as essentially invisible and separate from the rest of the sea of humanity shopping, commuting to and from conferences and work, waiting to ride the cable cars, and doing all the other things we’re used to doing. One such individual, an amputee, was sitting in his wheelchair off to the side of the rest of the buzz of tourists and townies. The look on his face was one of resigned dejection as people walked by with not even a glimmer of recognition that they just passed a fellow human being.

Photo52-2016_Week11_Lost

GDC16 – Day 0

So today was interesting. I’m all set to check my bag and fly out to San Francisco and I find out that my flight is overbooked. …great. The ticket agent asks if I would mind moving to another flight. I’m in the process of rejecting by default as I needed to be here by 1700h PDT. Before I get around to doing that and demanding the seat I purchased, he says, “How about a non-stop that leaves 22 minutes later than your flight, but arrives two hours earlier. …blink… Yup! That will work just fine, thank you. As it happens, it was the flight that the Game Development Program Chair, Prof. Russ Hanna was on as well.

The rest of the trip goes great. Flight in was smooth, BART into town was smooth, got my MUNI pass easy-peasy. The problem started when I got to hotel. Paperwork is such a fun thing. Turns out there was a mishandling of the paperwork between the college and the hotel so the new front desk clerk didn’t think that my room was paid. Great. There are worse places than San Francisco to be homeless for a day. Fortunately, the folk at the Hotel Stratford were amazing and very understanding! They knew that this would work itself out in the morning when the business offices opened, and they did.

RainsoakedUnionSquareWhat to do while in the Powell and Market area and your stressed out? Eat! Senior Scientist at Fundamental Technologies, Jerry Manweiler, introduced me to a great burger joint on Union Square, the Burger Bar. Wet, stressed, and hungry, That’s where Russ and I went. It’s an amazing place with an amazing view, although I will say the view during the Christmas season when I come here for the American Geophysical Union Fall Meeting is a bit more colourful.

One thing that did go right was registration at GDC. It used to be such a madhouse. They’ve really streamlined the process and have it working very smoothly. Russ and I were able to walk right up, sign in, and grab our badges. We were in and out in less than five minutes. Brilliant! That left time for some photography work. Before wrapping up the day with more food at an Irish-themed deli. I’m a sucker for corned beef sandwiches!

I’m part of a small group of photogs that post weekly photos on a theme in an effort to push each of us outside of our normal comfort zones and force us out of our photographic ruts. Last week’s theme was “Motion,” and what I wanted was a bus or streetcar moving through the steam rising from the storm grates. I picked the wrong side of the street. Although I didn’t get the steam in the shot like I wanted, I did get some panning practice in before racing season. The lens I used was a 28-mm prime thrift-store special. Auto nothing! It forced me to think about and set every aspect of the exposure and the focus. It’s not tack sharp, but by this time it was starting to pour down rain, and I wasn’t keen on sticking around to grab another.

"Here Comes the Bus"
“Here Comes the Bus”

EXIF
Device: Nikon D7000
Lens: Tokina 28mm f/2.8
Focal Length: 28mm
Focus Mode: Manual
AF-Area Mode: Single
Aperture: f/8
Shutter Speed: 1/15s
Exposure Mode: Manual
Exposure Comp.: 0EV
Metering: Matrix
ISO Sensitivity: ISO 100

Tomorrow, the Math for Game Programmers summit begins! All math, all day!

GDC 2013 – Of Swag, HTML5, and Quaterions

Thursday started all light and fluffy, after my steak and eggs at Mel’s and my Asteroids fix. I’m still irked that Prof. Fleming bested my score on Asteroids. I have to correct that. The first session of the day was a postmortem, Class Game Postmortem – X-COM: UFO Defense, by Julian Gollop, now of Gollop Games, but originally with his brother, Nick, at Mythos Games. Postmortems are usually rather dry, but Julian did a good job not only of describing what went well and what went poorly with the development and design process, but he also gave a great summary of the history of the title, it’s evolution over time, and its present state. Very neat. GDC-2013_03-26-13_012 It seems that the Game Development industry is beginning to realize that it needs to embrace and preserve its history before it starts to slip away from them. Space science found itself in this same situation not too long ago, except we waited way too long and nearly lost the Pioneer data to the mists of time, and other datasets were lost. Thankfully, there appears to be a pretty strong movement with in GameDev to preserve its history, its stories, it’s vintage hardware, and its classic games and software. Good game play never gets old, which is quite evident by the line that always forms around the Asteroids and Mortal Combat games.

The big new take-away for me for the week, outside of the mathematics and physics insights mentioned in previous posts, is the growing utility of HTML5 as a gaming platform. There are an increasing number of utilities to assist game development for HTML5 including the wonderful little 2D physics engine Box2D. Those of you in the GameDev program at JCCC will be happy to know that Unity and GameMaker have HTML5 exporters! There are a number of games already on the next using this tech, including the Mars Curiosity games and interactives I mentioned in yesterday’s post.

CrowdedExpoHall_smIn between sessions, I did manage to cruise through the Expo Hall again. The crowds on the floor this year are insane! I still didn’t find anything super awesome, but there are a number of interesting tidbits. LED flashlights seem to be the thing this year, so I got a small red LED light for the observatory and a few white light ones. There were more decks of playing cards being offered. How can I refuse playing cards? I can’t, nor can I refuse poker chips of which there were several styles as well. I’ll continue to look for more today.

I did manage to squeeze in another physics-related session in the afternoon, and yes, there was more talk about collision detection and resolution, optimizing AABB broad-phase checks, and ways to mitigate tunneling and other undesirable effects resulting from high angular velocities. The solution was staggeringly simple, clamp the angular velocity to a maximum value. Of course, this grates on my sensibilities with my background in computational physics since it results in a non-physical limitation to the simulation, but it’s a great solution for game physics. The talk, GPU Rigid Body Simulation, by Erwin Coumans of Bullet Physics (yes, it’s free), also gave me more insight to the usefulness of quaterions. Not only are quaterions useful for affecting rotations, but it’s also useful for representing rotational position in a far more compact way. I feel a major rewrite of the PHYS 191 course coming.

The day ended with a great meal with some great folk. A few of the folks I’ve met through IndyCar and Twitter live here in San Francisco, so we got together last night to share great food and great conversation. Two members of our quartet had spent a couple weeks down in Florida to see the 12 Hours of Sebring, an Atlas V rocket launch, and the IZOD IndyCar Series season-opener at St. Petersburg, so they had plenty of stories to share. It was a wonderful evening of rocket ships and race cars. Seriously, does it get any better?? No. No it doesn’t.

GDC 2013 – NASA Saves The Day

It’s Expo Hall Day! YAY SWAG! Ok, I guess I didn’t have much time to gather too much swag today. Odd given that I only went to a couple of sessions, one of which was a let-down. After breakfast, we headed back over to the Video Game History Museum and got our old-school game fix on. I played better today than I did yesterday and set the high score on Asteroids, although I’m sure it didn’t survive the morning. Russ Hanna kicked my butt at Centipede and Richard Fleming bested me at the driving game Turbo. ARG! How do I lose to Fleming at a driving game??? Trip wire to activate the coin switch on the back side of a coin-op arcade game. If there were dragons in the game, sure I could see it, but driving? …ugh. I suck. I bit of geek pride was that I had to show the others how to trip the microswitch on the back of the coin acceptor to register credits instead of actually having to put a quarter in the slot. Seriously, did you guys not grow up in the 80s? How do you not know how to do this?

In past years, the first event on Wednesday was a keynote address by a legend in the game industry such as Shiguri Miyamoto or Hideo Kojima. Last year, they opted for a different format in which select presenters are given a brief amount of time to pitch their talks. It’s an interesting format, and it did get me to check out some sessions that I wouldn’t have otherwise, but on the whole, it was an hour of pointless idleness. This year I chose to be idle somewhere else, like the upstairs in the museum playing Asteroids. The Expo Hall opened at 10am, and we started in our systematic way, start at one end and leave no area unexplored. I didn’t spend a whole lot of time in the expo hall, only an hour, but I did need a supplementary bag! Going back for more today. The t-shirt count is up to seven, and sure to climb by the end of the conference on Friday. I haven’t run across anything especially interesting yet, mainly just the standard pens, pads, and other such trinkets.

The first session I attended after our lunch break was a talk on the lessons learned about the role of code, data, and tools during the development of Assassin’s Creed III – Homestead. While I thought that would be interesting, it really wasn’t. The presenter spent more time on fancifying his slides rather than crafting an intelligently organized presentation. JeffNorris Oh, well. The next session, and last of the day, was by Jeff Norris and Victor Luo from the Jet Propulsion Laboratory with the cheesy title, “We Are The Space Invaders”. I had fully expected the talk to simply be “We have 3D models of spacecraft, and you should use them in your game.” This has been NASA’s standard MO in the past, but this talk was amazing. Jeff and Victor demonstrated how NASA was using the Unity game engine to create interactive tools and games for the public, including a downloadable game for the XBox 360, and it actually looked good! Unfortunately, I don’t have a 360 so I can’t check it out, but if you do, search for Mars Curiosity. There should be a Kinetic game that you can download for FREE. Cool. The other point they made was that the game industry understands user interfaces and controls to a much greater extent that many rocket scientists. (duh) Given that, they’ve been working on ways to utilize more game-like controls into their spacecraft and rover control systems. One impressive demonstration was a video showing a group of 5th grade kids playing a motion recognition game on the Xbox, then taking those skills they learned in less than a minute in a game and using them to control a $5M robonaut. Mind you, they didn’t control a simulation of the robot, they were in actual control of the real multi-million dollar piece of hardware after 45 seconds of training, and they were controlling it with skill and dexterity! NASA took those lessons and started applying them to other less humanoid applications. The next demonstration they showed was super impressive. Using motion-capture technology on an operator’s hand, they are able to expertly control the All-Terrain Hex-Limbed Extra-Terrestrial Explorer (ATHLETE). Best of all, they did the demonstration, not with an animation, but remotely with the actual two-story tall robot! Jeff Norris applied the controls live during the GDC talk and those commands were sent to and obeyed by the ATHLETE robot at JPL. It was brilliant!!

TimeForAPint_smThe last GDC event of the day was the Awards Show. This comes in two parts, the Independent Games Festival and the Game Developer’s Choice Awards. It’s always a good time and it’s neat to see what new things people are exploring in games. Two games that I plan on checking out when I get back are FTL: Faster Than Light, and the Game of the Year Journey. Journey is visually interesting, but I’m not clear as to why it was so much better than every other game. I guess I’ll have to play it to find out. Well, that’s it for a long day. Guess it’s time for a pint!