Tuesday, May 25, 2010

Game Design: Fun Challenges

Fun & Happiness
Happiness is the emotion resulting from the achievement (or preservation) of values. Accomplishing something you don't value doesn't feel rewarding. Players are happy when they achieve something meaningful. That could be game-defined goals, player-defined goals, or even just learning.

What's the difference between fun and happiness? Grammar, for one: one "has fun" but "is happy". Does happiness come from having fun? Generally our culture views happiness as a longer-term thing, but I don't think that necessarily applies to game design -- I think players can achieve happiness from playing their game of choice. I also think that being happy isn't the same thing as having fun.

Fun is amazement, curiosity, bewilderment, happiness, laughter, vengeance, and a host of other emotions. I've talked about boring before: if you don't have anything to think about, you get bored. But being occupied isn't the same as fun. I remember working at a fast-food joint during rush hour. I didn't have time to get bored, but I wasn't having fun, either. Generally stuff that's safe (ie doesn't threaten any values) and produces a non-negative emotional response is fun. There was nothing emotional about slinging fries, but interacting with customers (especially the cute kind) was sometimes fun.

The two main groups of fun emotions are those responding to new stimuli, and those responding to positive values (happiness-related). Achieving a goal that you planned for and expected to win isn't as much fun as an unexpected victory; the emotion in the latter is stronger. I also think seeing new wonders - whether it's high-level gear or foes in Warcraft, or funky new buildings in SimCity or Travian - is stronger than happiness-related fun.

I've heard (and frequently repeated) that designers of platformers like to put players into new environments every 15 minutes. Warcraft follows a similar model (tho the time delta is hours not minutes), and RTSes and the like put players into new environments every 30-60 minutes. Players also like new games, new graphics, new expansions, etc. They want something new, because new is fun. These players are explorers, and I think it's the dominant type of players generally.

I love new stuff, new areas, exploring game mechanics, exploring the nooks and crannies of game worlds, new graphics, all that stuff - but I can also sit down and grind through some resource gathering. I turn that into a game: how quickly can I pave through this set of creatures and take their drops? How many can I kill in an hour? That's a self-created achievement goal. Some people are good at that, but most people aren't. I'm tempted to call it autistic-spectrum (the ability to focus on a narrow goal), but I actually think it's just a reframing skill.

This is achievement again. Many Asian MMOs are very grindy; players in that market are used to this type of reframing. They view the grind as an achievement path, and they can focus on maximizing their achievement performance. To them it's fun. American players, by contrast, tend to be the "fun fun fun" type that want distractions and new, shiny trinkets.

Difficulty, Perceived Difficulty, and Choice

If happiness comes from achieving meaningful value, then how does one quantify "meaningfulness?"

I think one really has to scrape the bottom of the barrel to get game challenges that aren't meaningful. It's a continuum, obviously, and I think it's related to perceived difficulty. Not actual difficulty; rather, how difficult the challenge is perceived to be by the player.

The Facebook games I've played are basically slot machines. There is no challenge; very little strategy. Do you dig in the open areas first, or go for the plants (which require more energy), or open up the gates (which require no energy and give some XP)? Ultimately you're gonna click every damn little grid square that you can. Whether you click them "smart" or not is maybe a 5% change in effectiveness. These games win on two fronts: the user can perceive some kind of magical ESP or mental brilliance in what they're doing, which is great for the vast majority of players that are fucking morons. (They play slot machines and farmville, after all.) And they get random rewards.

The two are really related. The human brain is wired to see patterns; we look for patterns, because they help us survive. Sights, sounds, tastes, smells, and even touch came into play for survival. Should I eat these berries, or wait til they change color? Does that sound mean a jungle cat is about to rip my spleen out, or is it just a harmless forest critter? Give a player a bunch of random stimulus and he'll think he sees patterns in it.

It requires a lot of discipline to avoid latching onto that perceived pattern - plus the experience to know that your brain plays these kinds of tricks, and that you need to do something other than sit there with your jaw slack and let the emotions roll across your brain. But that discipline is only useful when there's an actual pattern to be perceived. That is, in a slot-machine game, all the patterns you think you see will be fake. In Facebook games, there might be one real pattern in a hundred.

One might say "good games have real patterns for players to discover," but I'm not sure how much that's true. (It depends on what you mean by 'good' game, of course.) The facebook games are popular, even though they're just slot machines and epeen displays. I do think if you want people to pay money for your game that you need to get them to want it, to have some emotional pull to the game more than just what you get from a slot machine. (Though people do dump a lot of money both in casinos and facebook microtransactions.)

Facebook games have choice, but it's a shallow, meaningless choice. Even perceived difficulty is low.

I think perceived difficulty is better than actual difficulty. Games that are actually difficult can produce failure, and that leads to bad emotions. But without evil there can be no good: people value achievements that came with high cost. It's one of the reasons why hazing is still popular - paying dearly for something, even a gym membership, leads the human brain to bias more value.

Too many apparently difficult choices that are actually trivial can burn the player out to the point where they realize how pointless their choices are. I think I burned out of WoW once because of that. When a player realizes that all their clever strategizing was meaningless, they can shut off like a switch.

That marks your boundaries: make the difficulty too real and players give up in frustration; make it too much of a smokescreen and you risk players finding out and feeling like they've wasted their time on your game.

Challenge and Accomplishment

I want to say "the best games have some real challenge, some perceived difficulty, and reward players for making smart strategic choices." But what does best mean (i.e. on what scale)? Is this just my preferred game style? Am I just deluding myself into thinking I like challenge? I guess I'd rather be fooled into thinking I'm smart than be given a game that I can't figure out.

The point of making games is merely to feed our own values. The two major values are (1) money, and (2) the pleasure that comes from making others happy, or entertaining them. #1 is a measure of #2 - if players are entertained by your game, they'll pay you for it. The more fun and happiness they receive, the more money they'll give you. I don't think these values are separate, and it's one reason why I think discussions of "true" art and good games are pretentious and miss the point. Make a game that makes you money, and that's proof that you're making people happy.

You could make a slot machine. You could fool a bunch of ignorant rubes into thinking they're smart; give the ESP types a reason to believe in their magical powers; and amuse the easily-entertained.

Alternately, you could put some real challenge into your game. Give players choices that actually matter; where choosing wrong will mean failure. Make success cost a bit, so they value it, but not too costly to burn them. Make some choices look difficult when they're actually not. But most importantly, play with their emotions. Players want a roller-coaster ride. Give them both achievement and entertainment, and they'll give you their money.

Monday, May 24, 2010

Real Effects of Cowboy Programmers

In my previous post, I talked about the perceived strengths and weaknesses of cowboy programmers. I described cowboy coders as isolated, shoot-from-the-hip, hardworking, and antiestablishmentarian.

Cowboy coders often write unreadable code. But it that a bad thing? When someone else needs to maintain the code, yes. When someone else needs to dig through an obtuse and confusing system to figure out which parts are the external interface, yes. When someone needs to look at a clunky, poorly-named set of interface methods, yes. But most often what cowboy coders have is unreadable implementations, which is mostly harmless. The output that matters most in team projects are (1) reliability, ie does it crash, (2) reasonable performance, ie as long as it's not abysmally slow, and (3) readable and understandable interfaces. If you know what a system does and the interface is clean, it doesn't matter what's going on under the hood. That's the whole point of encapsulation; hide the messy bits from outsiders.

Cowboy coders also rarely document. Yet this is a tenet of agile programming: code should be self-documenting. Parameter names, variable names, method names, class names -- all identifiers -- should describe what they are, semantically not syntactically. (This is one reason why I think hungarian notation is foolish; it focuses on something the compiler can do for you.) Variable names like "gc" and "q" and "theFileStruct" are horrible. If that's what any programmer on your team is doing, hit them with a stick. If their identifiers are well chosen, the external interfaces obvious, and the use of those interfaces clear, then again the lack of documentation is not a weakness.

Brilliant code rarely makes sense to other coders. Any brilliant person, scientist engineer artist or craftsman, is likely to be misunderstood. Not understanding them often isn't critical. In a team environment, the interface is what matters, and it's much easier to get a cowboy to make good interfaces than to try to force him to work like everyone else. He'll probably not do a good job, and the process will just piss the both of you off.

Loners can be brilliant cowboys or they could just be slackers. Be careful to not assume that someone that prefers isolation is actually getting something done. The best way to do this is to monitor checkins. Some good cowboys won't check in code for days, but when they do check something in their progress is obvious. Slackers might have the same lax check-in habits, but when they do finally commit what shows up is tiny. Slackers are a threat to your bottom line. Don't just tell them that you want them to check in more often; tell them that you're watching the volume of their check-ins. Slackers will either step it up and get work done, or find a way to quit or get fired. This is one of the important distinctions a manager needs to make about his employees - is he a cowboy, working diligently in the dark, or a slacker, surfing diligently in the dark?

Cowboys can also have an effect on the rest of your team. The best, brilliant cowboys might be reclusive but in my experience they haven't been anti-social. Slackers, on the other hand, are sometimes passive-aggressive or rude. Having a brilliant coder nearby is often an inspiration for the rest of the team; it makes them feel like they're someplace special. Beware of how the team views the cowboy. If the team respects the cowboy's brilliance, treating him like a misbehaving child can send a message to the rest of the team that you value conformity over performance - and that's what you'll get: a bunch of rule-nazis that do the minimum required and leave the building promptly at 5pm. This is the fine line of management: you want to give the cowboy room to do his thing without upsetting the rest of the team. Make sure the rules you impose aren't just to make you feel better; usually the purpose of a software team is to ship, not to measure code metrics. What matters are features and reliability. If you're getting those on a good timetable, be happy.

Your cowboys shouldn't be driving the rest of your team away. One of my favorite software-management stories is about a new management hire that refused to fire a problem coder that was pissing off other employees (driving them to quit). When the manager went to his boss, the boss fired him! Yet, after looking at the situation, the manager agreed with what his boss did. If a problem employee is driving others to quit, the thing to do isn't to coddle the problem employee; get rid of them!

Thursday, May 20, 2010

Perceived Traits of Cowboy Coders

"Cowboy Coders" shoot from the hip. They're lone wolves, programming heroes. They're respected for their work ethic, programming speed, and brilliance - but hated for their unreadable code, lack of standards, and arrogance.

There are many types of 'bad' programmers. The 'cowboy' label is used if the bad programmer has a high opinion of himself (deserved or not), ignores standards, and writes brilliant (if complex and unmaintainable) code. Cowboys aren't stupid, but they might be ignorant. They believe strongly in standards - but only their own. They rarely work well in teams, preferring to work alone. Many cowboys are also workaholics.

One of the perceived strengths of a cowboy coder is their ability to dive into tricky bugs, figure out what's going on (maybe spending all night working on it), and coming up with a complex and brilliant solution. Especially when a deadline is near.

One of the most hated traits of the cowboy is his habit of loudly disrespecting his fellows. This is one reason why cowboys work alone; they can't stand working with others, and others can't stand working with them.

But "Cowboy Coder" is a stereotype. Real people are rarely like that. It's fun to make up or read lists of programmer types, and "cowboy" is one of the stereotypes that I've heard the most. The qualities I've found distasteful in other coders are rarely like the perceived weaknesses of cowboys, and the strengths of good coders I've worked with are more complex that the "work hard" and "brilliant" attributes given to cowboys. Next time, I'll cover the strengths of weaknesses of cowboys that really matter in my next post.

Saturday, April 24, 2010

Fun RPG Combat, Part 2

In my previous post on making rpg combat fun, I talked about some high-level principles behind what's fun and what's not. This time, I delve into specifics.

Rogue-Like RPGs

Rogue-like games make combat fun by not telling you the mechanics. A lot of the 'fun' in a roguelike is learning the rules; what various creatures do, how useful your various abilities are, when you should run, when you should fold, etc etc. For people that like learning mechanics that way, roguelikes are a lot of fun. For people that skew more towards achievers on the Bartle scale, roguelikes can be frustrating. I think the success of WoW shows that there's tons of achievers out there. As an explorer, I like discovering mechanics -- but I also find Rogue-like games frustrating, I think in part because the fun bit of the mechanic is hidden. The game isn't really about discovering mechanics; it's about getting to the bottom of the dungeon and 'winning', which is an achievement. Ultimately, I think achievement is the strongest motivator. So let's leave rogue-likes behind.

Achievement RPGs

In achievement-oriented RPGs, players can have dozens or hundreds of hours of new abilities, creatures, and environments to explore. The fundamental mechanic of these games is always combat. Combat has to be fun, and they make it so by changing it up. Sometimes just cosmetically (with new environments and different-looking creatures), other times with new mechanics. New mechanics include new player abilities, new creature abilities, environmental restrictions (such as a pool of lava or spinning blades that one must avoid and might push an enemy into), and complications like adding a second creature to fight -- forcing the player to not just kill one target, but figure out how to juggle two targets. Mixing two types of targets together creates a huge explosion in the puzzle space. And when the player gains another dozen abilities, they might tackle that exact same mix of targets in an entirely new way.


It's easy to see why RPGs give players new abilities, and then pit them against enemies with ever-changing abilities, too. The game is combat, everything else is window dressing. Make combat interesting, and the player will suffer your bad dialog, predictable plots, and boring tradeskills. And if your abilities are balanced, bam, instant puzzle.

Power Trips

Another aspect of achievement games is the power trip. That's why games have levels. Not because the badge is 'good gameplay', or some sort of esoteric bullshit. But because, when you're level 20, you can go back to that level 1 orc and pound the shit out of him. The tough meany that killed you three times when you were level 19 becomes less of a challenge after you level up to 20. He's not really difficult at all any more, because you now know how the fight goes, plus you've got a little bit of extra hp, ac, and damage output. It feels like a challenge, because you're focused on the fight.

(That, btw, is the point I made in the previous post. If you're busy executing your combat plan, you don't have time to think about bad dialog or predictable plots. Keep the player focused on the combat puzzle, even if his chance of success is 99%, and he thinks it's challenging and fun.)

The Grind

RPGs can become boring if you're forced to 'grind.' But a grind is no different than any other part of the game; you're still in combat 90% of the time. But a grind is combat that isn't new. It's you against the exact same enemies you've fought before, with the exact same abilities. Neither you nor them have different powers. You've solved the puzzle, and now you're asked to solve it over and over again.

I usually got around that boring bit of grinding by focusing on a meta-issue. Not winning the combat itself, but winning faster. By figuring out a circuit through a dozen mobs that lets me kill them as fast as possible. By finding clusters of the mob that I need to kill so that I am not waiting for them to respawn, and I'm not wasting too much time travelling from one group to another. I was able to choose and pursue these goals myself; most players, I think, don't. If you can make that meta goal explicit, it might be one way of alleviating the grind.

The obvious solution, of course, is new abilities or cosmetics. Yet that's kind of the point here; sometimes, for some reason, players will want to go back and kill the same creature over and over again. Normally the game shepherds players into new areas. Some games (Lineage comes to mind here) fail at giving new abilities to either the player or his quarry. But most designers know that's a design that turns off a lot of players; they know that they need to give the player either a new ability, a new opponent, or at least new scenery in which to solve the same puzzle.

What happens when you can't? There is no solution, of course. It's more of a statement about the goals that the game has set up. In order to make money in World of Warcraft, I'd go kill elementals for hours. Usually I could only stand about an hour at a time, but I spent dozens of hours killing those creatures over and over again. Eventually, Blizzard figured out that players were grinding for cash. They solved this problem not by somehow making the grind more fun (my argument is that's impossible), but by adding ways to get cash that were both more efficient and more fun.

There's one other issue I'd like to talk about, an interaction between quests and combat that can make combat unfun.

Press the Button

Say you've got a quest to go collect 10 wolf pelts. Sure, ok, go kill wolves until you've got 10 pelts. You play the combat minigame, usually against a new creature, and have fun. Turn in your pelts, which is where the big XP is, and move on.

But what about the quests where the goal isn't to kill or collect drops, but do something completely different? Say you need to hit a button in the middle of a field, but there's a bunch of wolves there. Now the wolves are in your way. You can solve the puzzle of how to kill them, but it's not really your goal. A good designer can make 'press the button' into an interesting story, but ultimately the player wants the quest reward, not the quest text. The 'button' could be a gravestone they need to read, or an altar where they need to perform a ritual, or a dropped scroll that they need to pick up. Players think of these tasks as different and interesting, but fundamentally they're just pressing a button. Run over here, hover your mouse, and click. The game spits out some flavor text, but really it's just a button.

And many players skip quest text altogether, using add-ons to tell them what combat puzzle they need to go solve next.

Is it better to ask players to go kill 10 wolves? Or ask him to do something such that the player chooses to engage in combat because those wolves are effin annoying and keep interrupting him while he's trying to press the button? In the button case, the player might see combat as an annoyance. I remember many times in WoW where we had to go press some button, and I worked with group-mates to train the mobs out of there, or stealth through the encounter, or whatever, to avoid combat. Combat should have been the game, but I was inventing a new game to avoid it.

And I think that's the answer. Tell the player to kill "the five guards" then press the button, or give them mechanics to avoid combat altogether, so that they get the thrill of 'cleverly' avoiding combat. You want your players to have happy emotions, to think that they've achieved something tricky or clever. Give them the tools so that, however they're solving the quest, what they're engaging in is not clearing out an annoyance but positively engaging in a new puzzle.

see also: Bartle's book on designing virtual worlds

Monday, April 19, 2010

Menu State Management in Games

I've written about high-level game state management before, but I didn't provide any direct code. I got a couple questions about this recently, so I decided to put a post together.

Menu management is a very clear example of the State pattern. Each different page in the menu is a different concrete subclass derived from a common State base class and managed by a Context. There's a few tricks that make this a bit easier.
For example, menus are often nested. This suggests using a Stack pattern for the context. I generally have a GameContext class that has Push, Pop, and Switch methods. They can either take a State subclass instance as a parameter, or some sort of identifier. I think this choice is 50-50; I don't have a clear preference for either one.

There's two ways of doing identifiers. Again, I don't have a clear preference here either. I tend to switch back & forth between these two solutions. (1) Add an ID in the class itself, e.g.
  public static const MainMenu::kMenuId = 'main';
This tends to be the less error-prone, although it does mean that you've got to add an extra #include (in C++), and whatever language you use it means another dependency. (2) Use a string constant. C++ compilers tend to tolerate four-character codes, ie
  Context.Switch( 'main' ); 
The downside is that if you change the identifiers or add a new menu or have a typo, you run the risk of the system blowing up at runtime. However you might choose to do the identifiers, you also need a way to register them with the Context, and that adds another layer of complexity. So your choice is: that complexity, or require any class that requests a menu state change to refer to the new menu class -- which can get messy itself. Meh? All coding is tradeoffs. Pick one. Whatever your feelings on Good and Proper Coding Practices, neither one has been proven to cause cancer in lab rats.

The Context itself also tends to be an instance of the Singleton pattern, with some public, global access. Pop, Push, and Switch might be static methods, for example; I find that means less code and complexity on the client side. (Never trust anyone using your class to be able to code their way out of a paper bag! Simpler interfaces are better.)

I usually start with a simple, copy-n-pasted examples of the different Menu classes. For example, they'll have their own Scenes for 3D objects and 2D UI bits. This is usually easier, faster, and more reliable than trying to develop the Most Awesomest Generic Menu Class Ever. The UI manager will take button clicks, and then call Context.Switch() or Pop() as needed, or Push() if the user hits the 'previous menu' button.

Game startup, then, will do stuff like initialize the 3D environment, game asset libraries, sound, etc, then start up the game state context and tell it which State to start with, which is often a CompanyLogoState. Usually I have game startup then call Context.Run, which does a simple loop of CurrentState.HandlePendingEvents, CurrentState.Draw, and CurrentState.Tick. There's some complexity there with handling events, being able to handle Push and Pop, updating the state at the right time, etc.

CompanyLogoState.Tick() will usually draw a 2D company logo, gradually brightening from black to white, holding, then back to black. When it gets to black, Tick() will call Context.Switch( GameTitleState.kStateId ), which pops the CompanyLogo off the stack and puts GameTitle in its place. That state does the same thing -- bring up the lights, so the title screen, then switch to the Main Menu state. Both the CompanyLogo and GameTitle states will move on to the next state if a key is pressed; that's done in their HandlePendingEvents() method. Eventually, one of the various Menu states (MainMenu, PlayGameMenu, LoadSavedGameMenu / StartNewGameMenu, etc etc) will need to actually start the game. That's cake: just have it call Context.Push( GameState.kMenuId ). And if the game needs to switch to a full-screen menu at some point, it can pause itself and push a new state onto the stack: Context.Push( SaveGameMenu.kMenuId ). Of course it will be important to plan out all of your various menus and states, and make sure you don't have any recursive loops.

Using this pattern, all of the various high-level states in the game are handled through the Context, which also does event handling and rendering. I've even once modified the process to work in a nested window as well - such as when you bring up the 'game menu' while a game is in progress, which doesn't back out into a full-screen menu but instead shows the game in the background, paused & faded.

As with any code, start simple. Copy n paste as needed. When you need more complexity, well-written code is easy to extend.

Saturday, March 27, 2010

Repeat Until Rich

Repeat until Rich: A Professional Card Counter's Chronicle of the Blackjack WarsNot really related to game design, programming, or software engineering, but I've found that this crowd also likes gambling -- specifically, the sort of gambling games that can actually be beaten.

Repeat Until Rich was recently published and is a well-written tale of one card counter's journey through that world. Josh Axelrod (the author) was part of a blackjack team in the team heyday 6-8 years ago. I enjoy these sorts of personal stories; they show the glamorous side of such potentially lucrative pursuits as well as their darker sides; the hard grind of card counting, for one. The movies make it look awesome, but in practice it's god-awful boring.

Thursday, March 25, 2010

Adapter Pattern vs Proxy Pattern

These are two similar patterns that both wrap an object (or set of objects) to expose slightly different behavior to a client object. As with the difference between Bridge and Strategy patterns, the difference between an Adapter and a Proxy is partly one of focus; which pattern you use does not necessarily change the structure of your solution, but the choice depends on how you approach the problem. Both patterns are wrappers, but you use the two patterns for very different reasons.

Some of the confusion that I've seen between these two patterns is one of nomenclature. I was talking to a friend today (hence the reason for this post) where he got into an argument with someone, and the basic cause of confusion was between the idea of a class (any class) as a 'proxy' for a data object and the Proxy pattern itself. As for the Adapter pattern and the verb 'adapt' -- well, every line of code is an adaptation, right? It's a pretty generic verb.

So: Most of the confusion is proxy vs Proxy. I'm using the latter, the capitalization, to indicate the Design Pattern.

Adapter

Common descriptions of the Adapter pattern tend to say that it's an extension of the Facade pattern to deal with polymorphism or to provide a specific interface. Yeah, that's nice. In practice, when I'm getting my hands dirty writing code, I use the Adapter pattern when I am approaching the problem from the client end - as the user of the class that's about to be adapted, not as the author of the library or utility class that winds up getting adapted.

Usually what happens is that I'm writing a bit of code and I start to implement an algorithm when I realize that I can use a certain library class to do the job instead. But the class I'm working in demands a certain interface! Rather than rewriting the algorithm using that interface, I instead glue the library class in. And that, really, is all that an Adapter is: it's an implementation of an interface that doesn't do any of the work itself -- it just passes the calls along to some other, existing class.

It retrospect, you can see that you have Adapted the library class to the new interface.

Proxy

Proxies, on the other hand, tend to do work. Real work. Usually I create a proxy knowing exactly what it is that I want to do. I need a client-side representation of a server object, or a class to represent some big, unwieldy system object that I'm really only going to provide some minor methods on (and hence don't need to instantiate the whole thing). My proxy looks like the real object, but only provides the methods needed locally -- and so only has the complexity to do that limited work.

Often Proxies are one-to-one wrappers; you'll have two classes to represent the object. One class (the non-proxy, usually written first) represents the underlying data, and the Proxy wraps that class to add some specific, narrow behavior.

A proxy might exist across a network connection; it might represent a view into a data object, or a partial instance of a large data file, or maybe it just provides some functions that would be expensive or complex to access directly. I often write proxies to do one simple thing to a more complex class. Instead of making some class more complex, the Proxy steps in.

Which is Which?

In some cases the distinction is obvious. In a client-server application, you might write a client Proxy for a server-side object. You might gate calls to a complex central system through a Proxy, which will provide transaction ordering or synchronous behavior or somesuch. If you need to shove Tab A into Slot B and a simple pass-through class will do, that's an Adapter.

But say you want to write a class to encapsulate OS-level calls to the file system. Is that an Adapter or a Proxy? It's pretty simple, like a pass-through, so it's an Adapter, right? But an object of that class is treated like the underlying object, so is it a Proxy for the actual file on disk?

This is one of the cases where normal pattern use breaks down. Such a class is both a proxy and an adapter. A file object is a proxy for the actual file, but the class itself adapts the OS library calls to your custom project/application/module.

And so it doesn't really matter what you call it. The confusion comes because 'proxy' can be used to refer to the pattern itself (in which a class does work to hide complexity or extract specific behavior) or to an object that represents some real data object. One might say that every data-object instance in your application is a proxy. The concept of proxy still holds independent of the jargon that us OO design-pattern wonks use. Any class can be a proxy - even an Adapter class.

But note that you wouldn't normally have a Proxy that 'adapts' to anything. The Proxy pattern might 'adapt' something, but if the class you write is an Adapter, it might be a proxy but it won't be a Proxy.

As I said above, when I write an Adapter, I know it; the problem in front of me is fairly clear: "I need to shove this old/library class into this custom interface." And when I write a Proxy, it's clear that I'm providing specific new behavior.