Sponsored By

The Saturday Paper - Procedural Guneration

This week on TPF: a procedural generator for FPS weapons, and how it tests them out on humans...

Michael Cook, Blogger

August 19, 2013

7 Min Read
Game Developer logo in a gray background | Game Developer

Originally posted on Games By ANGELINA
Screen Shot 2013-08-15 at 16.26.30

While we certainly value innovation in the games industry, it's fair to say that many areas of game design are stuck in their ways: people know what they want, and designers try their hardest to give it to them. While it can be very satisfying to refine, polish and perfect a particular type of game design, a bit of disruption can be a valuable source of new ideas. In the first Saturday Paper we looked at how procedural content generation could be used to explore new ideas for RPG classes. This week we look at a similar project aiming to design new types of weapons for first-person shooters.

More...

We're reading Team Blockhead Wars: Generating FPS Weapons in a Multiplayer Environment by Eric McDuffee and Alex Pantaleev. The paper describes a system they built that can create new weapons dynamically for an FPS game, and then use computational evolution to keep producing and mutating the weapons as players play the game and test the weapons out. It's a lightweight system, but one that seems really promising right now, and easily extensible into different game genres or types of FPS.

Screen Shot 2013-08-15 at 16.24.18

The most important two things you need to know about an evolutionary system is how it represents what it's evolving, and how it judges whether something is good or not. We'll do both of these in turn, which should give a pretty good overview as to how the system in Team Blockhead Wars works. First, the representation. When you're building a procedural content generator, understanding how you're going to represent what you want to generate can be tricky. If you've ever tried to generate something like a 2D world before, this might seem easy, because these common procedural generation problems have been solved so many times, we have lots of good representations already. But when you're doing something a little unusual, as the authors are here, choosing a good representation can be tricky.

The authors chose to use a parameter-based representation here, which means that each gun is described with a list of numbers, where each number refers to some property of the gun. There are ten parameters in total in the current version of the system, here's a few taken from the paper:

  • Projectile Gravity - the effect that gravity has on the projectile, as a proportion of normal gravitational pull.

  • Projectile damage radius—the radius within which a projectile inflicts damage (i.e. splash damage)

  • Weapon magazine size—the number of times the weapon can be fired before requiring a reload

A gun design is simply a list of these ten numbers, with the values for each set between some boundaries. But how does the system know if a gun is good or bad? There's a simple way to find out: give it to some players and see what happens. When you join a server for the game, you'll initially be given two preset weapons that aren't part of the evolutionary system. But as the game progresses players can pick up new weapons, try them out, and choose to spawn with them next time if they prefer them over the preset weapons.

Screen Shot 2013-08-15 at 16.44.27

This gives the system a chance to understand and evaluate its weapon designs. It scores a weapon based on a combination of how long the weapon is equipped for by a player, and how many non-suicide kills the player achieves with the weapon. Equipping the weapon for a long time means the player considers it useful or better than the alternatives, and getting kills suggests it's a good weapon. The system can then decide which weapon designs show the most promise, and combine them together to make a new set of weapons to dish out to users. These new designs are balanced before being released, by working out their maximum possible damage-per-second. Once balanced, these new guns become the weapon pickups in the arena for the next set of games.

A nice addition to the system is that the guns also have procedural 3D meshes made for them too, which try to give visual indicators as to the gun's properties. The mesh for a standard gun is made up of several smaller objects, such as the gun's clip or its barrel, which are modified according to the gun's parameters. The gun barrel gets wider as the projectile gets bigger, for instance, and projectile colours change from green to red as they become more damaging. This nice touch shows a real consideration towards actual application within a game, and something I'd love to see in more PCG systems.

Screen Shot 2013-08-15 at 17.22.13

So we have a system that can conjure up new designs for weapons, and a testbed of real human players that can give an indication as to which gun designs are most useful. What came out of the other end of this system? The paper has a few nice examples, admittedly handpicked but perfectly acceptable for this early stage of the project, showing the range of the system. While lots of archetypical weapons presumably emerged from the system, the outliers are perhaps the most interesting - one gun had projectiles which bounced and had a large damage radius, which led to players using the gun as a mortar, bouncing projectiles off of walls to hit the other side of the map. Another gun initially seemed entirely useless - here's a great quote from the paper describing it:

Another interesting weapon had a projectile speed slower than the running speed of a player’s avatar. This initially made us dismiss the weapon... however, after a few evolutionary iterations we accidentally uncovered a weapon that combined slow projectiles with a low gravity effect on them, high damage, and a very high magazine capacity. This turned out to be a nearly perfect defensive weapon, since a player could use it to blanket a hallway with slow moving projectiles.

This little anecdote showing how an initially useless weapon trait turned into something entirely unexpected really shows the strength of PCG as a tool for cracking open long-established areas of game design, and finding new ideas within them. As we go to press this weekend, the 7 Day FPS Jam is winding up. Last year this gave us some incredibly exciting new game ideas, so I'm looking forward to seeing what this one has in store for us. Papers like this have the same flavour, to me at least, as game jams do. Something self-contained, simple to explain, and with some rewarding results. Like many of the 7DFPS games from last year, I can't wait to see this develop into an even bigger project.

ss_e885cc65fe08be7717f0ae0f0b8fdf4f6347b7d8.1920x1080Receiver was just one great example of 7DFPS games from last year.

Good experiments have to be focused, and avoid overgeneralising, but that can sometimes be misleading to outside observers and look like they're solving too simple a problem. The approach described in this paper, using a central server to develop and test new weapon designs on a multiplayer population, has huge scope for application in modern games. This week I've been playing PAYDAY 2, a co-operative heist game where levels are partly procedural to enhance replayability. The vast array of gadgets and guns in the game is already enough to keep me entertained, but the idea that my gameplay could be feeding back data to a gadget designer on a server somewhere? That's a really incredible idea. I'm looking forward to seeing PCG being used to shake genres up a lot more in the future.

Where To Find More

Alex and is at the Department of Computer Science over at SUNY Oswego in New York, teaching and working on a variety of research projects. Eric, meanwhile, is now working in the games industry up in Seattle. Alex is always keen to talk to people about his research, and has always been really friendly and forthcoming when talking about the Saturday Papers. If you're interested to find out more about the work, get in touch with him!

Screen Shot 2013-08-15 at 17.03.46

Addendum - Games On Demand

Sky Kistler has been working on a really intriguing project that Saturday Paper readers would probably be interested in - a procedural game generator that can deliver bespoke platform games for five dollars. Go and read more about this cool project and maybe order a game!

Read more about:

Featured Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like