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.'"
Do the AI run out of bullets? (Score:5, Interesting)
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)
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)
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.
Re:You've got to be kidding me. (Score:3, Interesting)
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?
Re:Only a waterless piece like this (Score:5, Interesting)
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)
If yes then when enemy is in throw range throw grenades until grenades == 0 or enemy == 0.
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.
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.
Again, he'd use his weapon until it was empty or there were no enemies. Then either look for another weapon or play dead.
Nope.
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.
Why do you think that isn't possible in my scenario?
The same can be said of processors and video cards.
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.
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.
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)
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)
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?
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?
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?
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?
Re:Only a worthless fluff piece like this (Score:5, Interesting)
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.
*shrug* Not everyone is a clone of you (Score:5, Interesting)
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.
Re:Only a waterless piece like this (Score:2, Interesting)
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
Re:*shrug* Not everyone is a clone of you (Score:3, Interesting)
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.