Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Entertainment Games Science Technology IT

The Hard Science of Making Videogames 194

twoblackeyes writes "PopSci delves into the 10 greatest technical challenges faced by game developers today, and the technology that will hopefully make them a thing of the past. At the top of every dev's wish list is increased realism: realisitic fire, water, enemy AI, material physics, etc. Here directly from the developers where the tech stands today, and where it will likely be tomorrow. '4. Artificial Intelligence - Problem: Once upon a time, the bad guys in videogames wandered around mindlessly, shooting at you while they waited to die. That doesn't cut it anymore. Players demand sophisticated enemies to fight and reliable in-game allies with which to fight them. Thing is, it's freaking complicated, and it eats up processor speed. "We're faking just enough smarts to make it work," says Mathieu Mazerole, lead engineer on Ubisoft's Assassin's Creed. Status: Imbuing characters in a game with lifelike decision-making ability involves employing the kind of high-level logic theories--learning decision trees, mobile navigation, finite-state machine models--used by top robotics engineers.'"
This discussion has been archived. No new comments can be posted.

The Hard Science of Making Videogames

Comments Filter:
  • by khasim ( 1285 ) <brandioch.conner@gmail.com> on Thursday September 20, 2007 @03:40PM (#20686437)
    Designing good AI is extremely difficult.

    But is good AI really needed in games? Wouldn't it be enough to give the enemy AI's a few basic styles/options and what to do when they run out of ammo?

    #1. Team options - how well do they operate together?

    #2. Seek cover/concealment vs charge!

    #3. Prioritize area effect weapons vs others (grenades vs pistol).

    #4. Play dead vs pick up comrade's weapon.

    You enter their zone, they have high team operations so they'll ALL have the same reactions. They ALL take cover and throw grenades at you.

    You enter their zone, they have low team operations so they'll ALL be decided individually. "A" charges, firing his pistol as he runs. "B" ducks behind a tree and throws grenades until he's out then he fires until he's out and then he plays dead. "C" ducks behind a tree, shoots his pistol and then tries to move to a tree closer to you. When he's out of ammo, he grabs what he can off of "A"'s corpse and keeps fighting.

    With a few options, each game will be very different.
  • Blah blah blah (Score:5, Interesting)

    by SatanicPuppy ( 611928 ) * <Satanicpuppy.gmail@com> on Thursday September 20, 2007 @03:45PM (#20686525) Journal
    Yes, AI is difficult. The best way to do it is to model it on the way actual players play, which would mean collecting a large database of player actions in specific situations, something that is finally becoming achievable due to the popularity of online play.

    Programming a logic tree is old school. It doesn't work very well because it's easy for a player to "learn" the logic tree of a bot...It's something you don't even do consciously, but after you find yourself tossing a grenade in a certain direction, because you just sort of know the bot is going to be there...It's game over. You know the tree.

    Picking up the data from the game though, you can get a lot of information. Using weapon X, 70% of players started shooting from 100 meters, hitting the target 30% of the time. Why? Who cares? A bot that engages from that distance with that weapon at that accuracy will seem normal to a person. Weapon nerf comes along, and all of a sudden people only engage with that weapon at 20 meters or less (desperation). The tree updates itself.

    Learning systems are the next step. Build the tree from harvested data, don't sit and try to figure it out yourself. You don't even have to make it that complicated a tree...Take the 10 most popular situational actions (Bot on Defense with Weapon X) add some random rock-and-roll to keep the choices from getting repetitive, and you can work out positioning and situational reactions based on statistical comparisons with the actions of previous players.

    Compile stats on a daily/weekly basis, resample the tree, and push it out to the clients as a patch...Or hell, if the bot logic is online, just update their datasets.
  • Cat logic (Score:4, Interesting)

    by jbeaupre ( 752124 ) on Thursday September 20, 2007 @03:54PM (#20686683)
    Trust me, my cat doesn't use learning decision trees, mobile navigation or finite-state machine models when trying to evade me or get into various trouble. And her processing power is pretty dim compared to a computer. Maybe it's time to start looking simpler solutions. Like rules based behavior.

    Everyone is now familiar with flocking algorithms. That's one behavior. Model several behaviors, superimpose them where possible (i.e. walk and chew gum), slap a probability algorithm, and that's how a lot of researchers are getting lifelike behavior from robotics. Best of all, you get goofy, unexpected results. Just the type of stuff to make a game interesting.
  • by Red Flayer ( 890720 ) on Thursday September 20, 2007 @04:15PM (#20687103) Journal

    Less than a year ago, there wasnt enough processing power to dynamically generate the movement of water in games

    Wow, fluid simulations started less than a year ago? Damn.
    Out of curiosity, when did fluid simulation == dynamic generation of water movement in games?

    A terrible description of a lousy buzzword
    Ah yes, a relatively new term used to describe something is automatically a buzzword? And a lousy one at that? Perhaps you have a different, better description in 50 words or less?

    It's fine that you do not like the author's writing (for the record, I wasn't very fond of the piece either), but how about some substantial criticism?
  • by dkf ( 304284 ) <donal.k.fellows@manchester.ac.uk> on Thursday September 20, 2007 @04:23PM (#20687265) Homepage

    The water in Farcry and the Exile games was very good.
    It was a cheat that only looks good close up if nothing much is happening. But why don't you get the wakes from the patrolling boats out there rolling in or making it hard to stay in your own boat? If you blow up a helicopter and the pieces fall in the water, where are the waves from that? That's right, they're not there. And that's because the physics of water is Really Really Hard.

    Indeed, two of the problems mentioned in this piece are really the same thing: both Water and Fire are manifestations of Fluid Dynamics. Real supercomputers (not Beowulfs or BOINC nets, but specialist big iron) are mostly used for this sort of thing, and the nature of the problem (non-linear fractal) means that it can soak up every bit of compute power you throw at it and you'll still not really have enough. Indeed, it's going to come down to how good a cheat people can get away with (rather like AI, another of the Really Really Hard problems...)
  • Why not? (Score:3, Interesting)

    by khasim ( 1285 ) <brandioch.conner@gmail.com> on Thursday September 20, 2007 @04:34PM (#20687451)

    How do you teach the AI to prioritize area effect weapons?

    If yes then when enemy is in throw range throw grenades until grenades == 0 or enemy == 0.

    What if the AI's in a place where he's not supposed to damage the enviroment?

    If you've gotten to the point where you have to ask that, you've already too far. Ask yourself why you as the designer are giving grenades to the guards inside the art museum.

    How does the AI decide if his dead teammate's weapon is better than his current one?

    Why would he need to decide that? He'd use his weapon until it was empty or the enemy were all killed. Then the decision comes in to look for other weapons or to play dead.

    Especially when the two weapons are extremely similar (2 different SMGs), what does the AI do then?

    Again, he'd use his weapon until it was empty or there were no enemies. Then either look for another weapon or play dead.

    Does the AI base it's decision to charge or cover on what the PC is using?

    Nope.

    Does the AI base it's decision to charge or cover on what the PC is using? If not then the AI's gonna be pathetic when the PC's taking cover with a shotgun.

    Nope and that's the point. The tactics the PLAYERS will use will have to CHANGE each time they play because the tactics the enemy will use will have changed.

    On top of that your sequence misses out on one of the best parts of modern AIs, in effect it's dumber than some current AIs. When an AI flanks you and you start taking fire from a direction you thought was safe it can be extremely surprising, and being surprised in a game is one of the best parts.

    Why do you think that isn't possible in my scenario?

    AIs need to advance because the smarter the AI the more options are available for the game.

    The same can be said of processors and video cards.

    For example, old games tend to have the enemies be a lot stronger that you and outnumber you because they're so dumb they need that to stand a chance (for a modern example think the brutes in Halo 2. Simple AI but they can take and deal a lot of damage).

    Nope. That's just because it was easier to write them like that. That way there's no way for the players to "get lucky" and get through a level easily. The players have to gain "levels" and "equipment" to beat the "boss" monsters.

    As AI's get smarter and smarter they can get closer and closer to the player's stats, until the AI and the player both are equal in terms of stats and ability.

    Nope. Because the computer will always be able to process faster than the player. The computer will know exactly how far you are from it and which weapon will do the maximum damage at that range. And instantly switch to that weapon.

    In addition smarter AIs make for awesome boss fights as the tired old strategy of 'the boss has 3x normal health and damage' can be retired and the boss can instead be more intelligent then the other characters but no stronger, which is both more realistic and fun.

    You're falling back into the "boss" monster mentality. Why does the "boss" need to PERSONALLY be stronger, faster, smarter, etc?

    Again, that's a holdover from the old 8-bit games. Kill the minions, kill the boss, grab the treasure, check xp to see if you gained a level, turn in the key, get better equipment, start the next level.

    You don't need AI for that pattern. As I've demonstrated. The problem set is already defined by what equipment the players can have, what level they'll be (which yields hit point ranges and spell options) and the room.

    With that, you could handle the boss simply by having a few more scripts he would use based upon the possible options I've listed. Of course, if you're still focused on the "boss" monster concept, then giving him a few more scripts makes more sense.

    Personally, I don't see the appeal in that.
  • My wishlist (Score:3, Interesting)

    by Ihlosi ( 895663 ) on Thursday September 20, 2007 @05:01PM (#20687875)
    At the top of every dev's wish list is increased realism: realisitic fire, water, enemy AI, material physics, etc.



    Crap. How about a game that's fun to play ? Yes, I know, I'm getting old and have ridiculous expectations.

  • Re:Why not? (Score:5, Interesting)

    by provigilman ( 1044114 ) on Thursday September 20, 2007 @05:12PM (#20688085) Homepage Journal

    If yes then when enemy is in throw range throw grenades until grenades == 0 or enemy == 0.

    You can counteract this then by hopping in and out of throw range until the enemy runs out of grenades. Also, what if there are multiple players, some in range of the grenades and some outside grenade range but within weapons range. Plus, what about novel tactics? Retreating out of a room and tossing a grenade behind you? Effective use of smoke grenades instead of just frags?

    If you've gotten to the point where you have to ask that, you've already too far. Ask yourself why you as the designer are giving grenades to the guards inside the art museum.

    So then a player can simply negate grenade wielding enemies by retreating into the art museum? Or will the enemy pursue but fail to use grenades even if all available weapons are out of ammo?

    Why would he need to decide that? He'd use his weapon until it was empty or the enemy were all killed. Then the decision comes in to look for other weapons or to play dead.

    You ever play a multiplayer game? Your buddy next to you with the Rocket Launcher dies, you have an SMG and you're fighting a Tank. Do you honestly just sit there and plug away with the SMG while you're standing next to a Rocket Launcher? Of course not! Conversely, what if he had a Sniper rifle? It's normally a superior weapon, but is it still superior in that particular situation?

    Nope and that's the point. The tactics the PLAYERS will use will have to CHANGE each time they play because the tactics the enemy will use will have changed.

    But they're really not. If the enemy picks one of two options regardless of what you do, you only need to learn a counter for each of the two options. Now, if you're crouched in cover with a Shotgun, you have the charge covered, so you only have to worry about when they take cover as well.

    But imagine instead that the enemy starts tossing grenades in an attempt to dislodge you from your cover. Or one enemy pins you down with automatic weapons fire while his allies flank you from the sides, staying well out of range of your shotgun. Or what if they toss out some smoke, then move up while you can't see them? Or better yet, you're in a warhouse and one of them goes up onto the catwalks to get above and behind you in order to flush you out into the waiting sights of his buddies?

    These sorts of things are what a player would think of, but current AI won't...and the AI you described certainly won't. Adding a couple of simplistic scripts with a random choice between them does not an AI make. Creating enemies with their own personalities, preferences and play styles that react to what tactics the player is using in a realistic and inventive fashion is the future of AI. It's also what human players do, why do you think multiplayer deathmatches have been (and continue to be) so popular?

  • by ultranova ( 717540 ) on Thursday September 20, 2007 @06:22PM (#20689139)

    The problem with water is that people tend to think of water as a jello like object, when it really needs to be modeled like a think gas.

    Nah. Low-pressure gas can be modeled as independently moving particles which don't interact with each other, just the environment. This gets realistic enough spread, and you can easily add scripted events (like poisoning, snuffing out fires, etc) triggered by proximity of such points to anything.

    Water molecules, on the other hand, both repulse and attract each other. Basically, water needs to be made of particles which exert a force on other nearby water particles, and experience gravity. The force needs to be strongly repulsive when near each other, then turn to mild attraction when a bit farther, and zero when further than that. Apart from that, you need to take smaller simulation steps when two particles are near, since otherwise you risk one getting shot out like a cannonball.

    You could even have a full three-phase simulator to switch particular particles from water to gas mode if they get hot enough (or even into solid mode if they get cold enough).

    Of course, if you have the CPU power, you could simply model everything (including the solid matter) from particles and get things like realistic breaking, roof falling down when the walls get damaged, and so on. That's not realistic right now, thought, both because of CPU power and because of level design issues it would cause. Still, just imagine a FPS where the Anti-Matter Laser will set the enemy in fire, throw him into a wooden building through the wall, cause the building to catch (realistically spreading) fire form the flames, and make the roof fall on him because the wall was damaged and couldn't bear the load anymore. Then watch the flesh particles get burned out of blackening bone particles.

    Now that is a murder simulator ;).

    Now imagine an adventure/RPG game where the entire play area is made from such virtual molecules, allowing you to solve the problems using common sense rather than just pre-scripted solutions. For example, suppose the object is to get to the bottom of a mine inside a mountain, but the tunnels are full of poison gas. Either get a magical poison immunity amulet, or be creative and use a disintegrate spell to blow open the side and let winds (moving air particles) to blow out the poison gas (which would require more realistic gas simulation than I described above).

    The future belongs to simulators, not scripting. And I predict that eventually everything will be made from particles, not polygons, since particle systems enable cooler effects and more realistic/believable behavior of materials.

  • by Moraelin ( 679338 ) on Thursday September 20, 2007 @06:28PM (#20689213) Journal
    *shrug* Now _I_ too would say "who cares about graphics? Gameplay is king." However I end up talking almost daily with a couple of gamer co-workers, who, any way you want to slice it, _do_ place graphics above everything else.

    They might _say_ that they value gameplay more, but any talk about some game they've bought will revolve 90% around how awesome or how sucky the graphics are, an you'll have to work on it to get even a nodding acknowledgement of anything else in the game.

    A recent conversation with one, for example, went loosely from memory like this. (It's about a game which will remain unnamed because I'm not discussing here whether the game is good or bad. I'm just illustrating how -- whatever other faults the game might have had -- they didn't even play long enough to discover those, they got stuck on "eew, the graphics look like PS2 graphics!")

    Him: "Hey, I went and bought game X because you said it's OK, and it's the biggest piece of crap ever. You made me waste my money on it."
    (Not the most polite way to start a talk, but maybe he's just joking.)
    Me: "Hmm? Well, ok, I guess these things are subjective. What didn't you like about it?"
    Him: "The graphics! It looks like a PS2 game! Or like something that might have been ok on the Wii or maybe on the XBox last year, but in the meantime people discovered how to use all three GPUs!"
    (I didn't know the XBox had 3 GPUs, I thought the 3 were the CPU cores, but ok.)
    Me: "Hmm, well, maybe you shouldn't take advice from me if your tastes are that different. I generally don't pay much attention to graphics."
    Him: "Well, I don't care about graphics either, but these are crap! They look like on the PS2!"
    (Bit of a contradiction there, I would guess. But let's prod it some more.)
    Me: "No, when I say I don't care about graphics, I mean I've played a bit of <insert PS1 game from the 90's> over the weekend."
    Him: "Eeew... Isn't that almost 10 years old and with 2D graphics?!?"
    Me: "Yep, that's the one. Just saying, I don't care much what it looks like."
    Him: "Well, I don't care about graphics either, but, eew, that's 2D and low res."
    Me: "Well, the one you were talking about isn't."
    Him: "Yeah, but it looks like on the PS2! They can publish that kinda crap on the PS2 or the Wii, if they want to, not on the XBox!"

    And so on and so forth.

    Now how many gamers are that shallow, I couldn't tell. I like to think that this guy is an extreme case. Still, as they say, if you're one in a million, there are 6000 exactly like you. Plus by virtue of it being a continuum, there'll be some tens of millions in shades of grey on that side of zero.

    And to return to whether TFA is fluff or not, well, think of it this way: people tend to gravitate around sites and magazines which see things that way. If one magazine or site told the above-mentioned guy to buy a game 'cause the gameplay rules, even though the graphics suck, I'm guessing it wouldn't take more than 1-2 times following their advice to stop reading it completely. So as long as there are people basing their purchases on glitter above substance, there will be people catering to that market segment. It's only capitalism in action, after all.
  • by Anonymous Coward on Thursday September 20, 2007 @07:22PM (#20689889)
    "It was a cheat that only looks good close up if nothing much is happening. But why don't you get the wakes from the patrolling boats out there rolling in or making it hard to stay in your own boat? If you blow up a helicopter and the pieces fall in the water, where are the waves from that? That's right, they're not there. And that's because the physics of water is Really Really Hard."

    Well the solution is also a trick. Zones of energy. The greatest amount is at point of impact and a certain degree out. That's the first zone. The second has less energy and less visual effects. And so forth and so on till you get to the banks were it could be a simple ripple. This is basically the divide and conquer solution to the problem. most code and processing inner, and decreasing working out. It's also in keeping that the water surface is a sheet.

    Fire would be point sources with degrees of repulsion* on each other based on amount of energy from inner to outer (source of greatest energy to least). Basically model energy flow and factor in surrounding (cooler?) geometry.

    *This is in keeping with the nature of a gas expansion.

    "Indeed, two of the problems mentioned in this piece are really the same thing: both Water and Fire are manifestations of Fluid Dynamics."

    In the real world, yes. However part of a trick is to model ONLY what's absolutely needed to create a believable effect.kisses
  • by Nasarius ( 593729 ) on Thursday September 20, 2007 @07:30PM (#20689993)
    I can't comprehend that at all -- WoW "crummy", just because it doesn't look as good as the bleeding-edge games? It's sad to think that someone would pass up a whole slew of amazingly good games (though I'm not including WoW in that) just because they're a few years old.

    But then, I'm someone who still loads up Darklands [mobygames.com] and the QFG series [mobygames.com] and Deus Ex [mobygames.com] once a year or so. Because somehow, they still represent the pinnacle of gameplay in their respective niches.

Understanding is always the understanding of a smaller problem in relation to a bigger problem. -- P.D. Ouspensky

Working...