Showing posts with label noise. Show all posts
Showing posts with label noise. Show all posts

Saturday, March 14, 2015

Random game design thoughts

Asymmetry


Computers and humans aren't good at the same things; you can capitalize on that. For instance, let's say I have a game that involves flying a rocket through caves. I could try to make an AI that can also fly a rocket through caves and pit you against it, but that would be a lot of work that may or may not pay off. Instead I can put a bunch of dumb turrets in the caves to give you however much challenge you need.

Positive and negative feedback


Positive feedback is paying dividends on investments. The “rich get richer and the poor get poorer” as Jesus says (Matthew 25 and elsewhere). A lot of basic strategy game design is built around this, where you're accruing advantage over time.

The upside of positive feedback is that it drives things to a conclusion. For instance, in draughts when you get a pawn to the opposite side of the board it promotes to a king, with vastly increased mobility. In a first-person shooter each opponent you kill is one less person who can harm you, so the game gets progressively easier. If you weren't continually presented with new people to kill the game would rapidly lose its challenge.

The downside of positive feedback is that your early choices in a game are the most critical, with successive choices becoming less and less important because they're overwhelmed by the dividends from the early choices. For instance, you might have a critical sequence of things to do to get a Starcraft game started with optimal production. In a stealth game when you get discovered, a guard might call for help from other guards, who then arrive and encircle you making defeat a near-certainty. Game designs have to try to mitigate this.

Negative feedback is resistance to change. It's very useful for balancing games. For instance, you might have a set of items available for sale in a board game, and the ones that aren't bought get a little bit cheaper each turn, until they match someone's idea of their value. Another example is when you acquire territory but your troops become spread thinner and as a result it becomes harder to hold that territory. In my 7DRL the last goblin from one chest will run off to another chest; as a result chests you tackle later tend to have more defenders.

De-escalation


I like to ensure that the player can back away from situations when they get in over their head. A lot of times this means the player can run faster than anyone else, but usually you also need other ways to cool down a situation. This is a form of negative feedback, I suppose.

Designers need to spend a lot of time thinking about what happens when the player fails, and how to keep the game rolling through it. The coin-op approach was to just put up Game Over and let the next person have a turn, but with a bigger game played solo it's good to think about how to not have the game just reset when the player fails. Thief 3, for instance, gave you a jail level to bust out of if you got caught in the open-city part of the game. This served as a re-trainer for the skills you were lacking.

Mowing the lawn


This is what I call solitaire-style or match-three sorts of games, where you're not spending most of your time learning new skills; you're just trying to execute existing skills well. It's a low-intensity sort of fun.

Kill them fast


Every second an AI stays alive in a game is another chance for them to do something dumb that destroys the player's suspension of disbelief.

Tuesday, January 22, 2013

King Solomon Designs Windows 8

I bought my home computer at the tail end of the Windows Vista era, and never got around to upgrading it to Windows 7 because operating system upgrades are such a giant waste of time.

Visual Studio Express 2012 doesn't allow itself to be installed on Windows Vista. That, coupled with a day off and the relatively inexpensive upgrade price prompted me to upgrade to Windows 8.

As I was Googling to figure out how to shut the computer down last night I was reminded of the Bible's story of King Solomon's Judgment.

Engraving by Gustave Doré (via Wikipedia)


In the story, two prostitutes had a baby each, one of which died in the night. Due to a midnight baby swap, they both claimed the remaining live baby. Solomon recommended cutting it in half and sharing it between the disputing mothers. The real mother, of course, put the baby's life above her rights and cried out for the king's sword to stop: give the baby to the other mother. Thus was her true love revealed.

In Microsoft's case, we have two warring divisions who each claim their baby is Microsoft's sole offspring. Solomon orders the head to be cut off of one and grafted onto the other. Surely this madness will cause the divisions to put the company's (and babies') interests above their own? Sadly, no. “Truly, thou art wise!” they say, and thus Windows 8 is created.

As John Scalzi says in Punting the Start Screen:
I’ve come to believe the Win 8 start screen, and the whole environment it propagates is just terrible UI for those of us who actually use their computers for work, rather than using them just to play games and get on Facebook.
I have to say this seems like a fair assessment. It's clear that they either didn't try, or didn't care, to make it usable. Which is a shame, because under the bolted-on head of Metro is a decent operating system.

Sunday, October 9, 2011

Remembering my father

Yesterday my father would have turned 65. He died two weeks ago after having had a lung and its surrounding tissue removed, as an attempt to fight the spread of mesothelioma.

James Sr. (I was a Junior) was born in 1946, second of four. When he was thirteen his father died suddenly (most likely of mesothelioma), and Jim became the "man of the house." He had his impish streak but he was also very hard-working. He knew what he wanted and he got it. He worked his way through college since his mother did not have much money. He pursued my mother from high school, despite not being the favored suitor with her family, and married her following college. He bought a Piper Cub airplane in high school (under his mother's name) which he flew out of the field at the family farm. He did not want to go to Vietnam, so he went to medical school instead. He became a renowned ophthalmologist specializing in cornea transplants, and was the chair of the ophthalmology department at Loma Linda University for a decade. He founded the Inland Eye Bank for sourcing eye tissue.

My father was a meticulous (nay, obsessive) record keeper. Ophthalmologists are gadgeteers (as sure as neurosurgeons are egotists or pathologists are grim or orthopedic surgeons are fun-loving) and my father bought pretty much every generation of IBM PC as a means of keeping his own personal surgery databases. He let me play with them when he wasn't at home and as he saw my interest he kept me supplied with programming software. He gave me copies of IBM Logo, MS QuickBASIC, Borland Turbo Pascal, and eventually Borland Turbo C. I think I first encountered Rogue (the computer game) on a PC in the eye bank offices when I was hanging around there on a weekend with him. Being raised Seventh-day Adventist I had little exposure to pop culture of any kind. Rogue was riveting; I made a copy of it on a floppy disk, took it home, and played it furtively and obsessively. I wanted to make games like this!

After the university sold its ophthalmology department to a private practice, my father did some soul-searching and decided to move to the Pacific Northwest and join up with a "cataract mill," as they were derisively called by many ophthalmologists. To cut costs, these practices devolve most of the pre- and post-op care to a supporting network of optometrists, handling just the surgery bits that the optometrists cannot do. The optometrists love this because referring a patient to a traditional ophthalmologist typically means losing future business; the ophthalmologist will just absorb the patient into their own practice. With a cataract mill the optometrist stays in the game.

Focusing on just surgery meant that my father racked up incredible numbers of them: up to twenty-five surgeries a day, adding up to a lifetime total of over 55,000. (Remember the meticulous records?) He had two surgery suites. The nurses would prep a patient in one while he was operating in the other. He'd walk in, read the patient's name off a sign, and a few minutes later they'd have their cataract out and a plastic lens implanted. By then a patient would be ready in the other room and he'd swap gloves and start over again.

This is incredibly demanding performance work in the space of a square centimeter. There is no tolerance for error. Fortunately the high volume of surgery that he was doing meant he'd seen just about everything and could react appropriately. He experimented with making improvements to his instruments and ran studies on them to see whether the modifications were effective.

They say that when you have your mid-life crisis you buy the car you had when you were a teenager. Remember the plane? Yeah. My father bought a brand-new Super Cub and flew it all over eastern Washington, Oregon, and Idaho. Every time I would visit he'd get me out in his plane and we'd range all over. We dropped in on Red's Horse Ranch (now defunct) in Minam Creek; you can only get there by horse or by plane. We dropped in on a friend's wheat farm; the neighbor boy would come racing over on his quad to get a ride. We'd chase coyotes with the airplane, buzz herds of cattle, do touch-and-go landings at the Lower Monumental dam.

Surgical careers don't tend to run long. Retirement was looming. I think my father was waiting for his 65th birthday to start thinking about what came next.

What came next, last April, was mesothelioma: a cancer of lining tissue, in this case the lining around his right lung.

There isn't any particular reason that we know of why he would have gotten it: he wasn't a smoker and hadn't been exposed to asbestos (the two major causes). My father did several rounds of chemotherapy. I sat in with him on the infusion days and was reminded of how blunt our medical instruments still are in many areas. Chemotherapy is basically poison, to be absorbed by living cells. The cancer, being more vigorously alive than the rest of the body, will hopefully take the brunt of it. There is inevitably a lot of pain, which can be addressed with opiates at the cost of addiction and reduced mentual acuity. Taking the opiates results in constipation. Vitamins are getting destroyed. Sleeplessness is common. Before you know it you're taking a giant regimen of pills and patches around the clock.

The chemotherapy didn't do anything to the cancer. A surgeon at Swedish Hospital in Seattle wanted to have a go at removing the lung; my father was relatively young and in excellent health other than the cancer. After a lot of deliberation he decided to give it a shot. He made it through the surgery but could not sleep in the next few days, which made him paranoid and combative. After sedation he deteriorated steadily until his remaining lung could not supply enough oxygen even with pure oxygen being pumped in via a respirator. We took him off life support (he had not been conscious, I think, since he was sedated three days before) and he died quickly.

Given who my father was, and who I am, it was inevitable that I would disappoint him to some extent. I didn't go to medical school (despite plenty of urging). I didn't marry a nice Adventist girl (despite being sent to an Adventist college). I didn't pick a particularly respectable line of work (and started out in Las Vegas, at that). Nevertheless he was always very good to me and seemed to get on very well with the girl I did marry.

We loved him and we'll miss him.

Friday, February 18, 2011

Animal Crossing --> FarmVille

I have been telling game developers for years that they were leaving money on the table by not making more games like Animal Crossing. My wife pointed out this morning that FarmVille and its ilk are pretty direct descendants of Animal Crossing, and they are indeed taking that money. I don't know how I missed that before; the similarities are obvious once you think about it.

Wednesday, September 29, 2010

Conversation starter #3

Sure-fire topics for easily striking up conversations with strangers:

With guys: Shaving
With new parents: Poop
With Pacific Northwesterners: Dietary restrictions

Approximately two-thirds of Seattle-area residents (a number I just made up) have some sort of dietary restriction, whether due to ideology, allergy, or both. If you're at a party just say "No thanks, I'm gluten-free right now" and you'll be off and talking with a bunch of the attendees. "Oh yeah, I have a gluten allergy too. These cookies are too good to pass up, though."

You can cross this with the new-parent poop topic: "Yeah, we're trying cutting lecithin and nuts from her diet; her poop was looking sort of greenish and she was howling at all hours of the night."

Thanks to preschool I now know that peanut allergies can be classified into airborne and contact variants. Parents take turns bringing snacks for the class and holy cow does that afford opportunities for dietary-restriction talk.

I have uncharitable theories about why this is. The Northwest is full of tech types who believe that religion is superstitious nonsense that is beneath them. Unfortunately for all of us, the universe is capricious and hard to understand, much less control. The urge to do both is within us all, though, and it finds its way out one way or another.

My related theory is that food allergies is a religion that does not set off the "no other gods before me" alarm in Judaism/Christianity/Islam. Thus it is a good mix-in religion. The Northwest is full of people who have been transplanted from all over the world. A mix-in religion is a great way to bond people of different faiths together.

Thursday, September 2, 2010

A blast from the past

A friend and I made a CGI script ages ago (1996, probably) to generate random names for fantasy role-playing games. We used the basic templates (e.g. Blank of Blank) but the word lists eventually got a bit silly. Have a chuckle:

RPG Game Name Generator

Sunday, April 25, 2010

Art

We played pin-the-tail-on-the-bunny at my daughter's birthday party a few months back. I drew the playing area with Sharpie on butcher paper (letters indicate where the kids put their cotton balls):



I've had acrylic paints lying around for ages and finally tried them out today:



I really have no idea what I'm doing yet with the paints. Mysteries I need to solve:
  • What's the best way to mix paint? I used my brush but it seems like there must be a better way.
  • How can you get a good gradient? There's the problem of mixing a consistent set of colors and then the problem of blending on the canvas.
  • How do you paint sharp edges? I originally intended for the thing that became the sun to have a sharp edge but it looked horrible so I changed tacks.

I do like that they don't stink, clean up easily, and dry quickly.

Monday, April 5, 2010

Monday, November 10, 2008

Eye Contact

The November 10 issue of the New Yorker has an article about Kent Kiehl, a scientist who uses functional MRI to study the brains of psychopaths. He's got a trailer MRI machine set up at a New Mexico prison and has scanned the brains of most of its inmates. There are debates about the fruitfulness of this approach, but I am glad the problem is being studied by actually looking at real psychopaths. Dr. Kiehl says that whenever he goes to conferences the first thing his colleagues ask is “What are they like?” which seems a shame.

The assumption underlying this research is that there are physical brain differences in psychopaths, a tangible perversity. I was struck by a comment from Robert Hare, Dr. Kiehl's thesis professor, regarding psychopaths he's interviewed:
“It's their eyes that are the most remarkable feature,” he said. “How they drill into you.”
I wonder if the intense eye contact is an emotional version of lip-reading? Lacking emotional empathy or something like that, the psychopath must closely examine his conversation partner's face for clues as to what they are feeling, much like a poker player searching for tells. Perhaps the superficial charm that many psychopaths exhibit is a result of the heightened attention they are forced to devote to interpersonal interaction.



On a completely unrelated note, my latest bad movie premise: an Indian casino has been inadvertently constructed on the site of an ancient Indian burial ground.



Seen on the marquee of an indoor shooting range in Kent: “Come on in. You know you want to!”

Monday, October 6, 2008

Nothing done

I was in Portland/Vancouver all weekend (plus Friday) at a wedding so I've gotten very little done. More later, hopefully.

The wedding was at Marshall House, named after George Marshall (he of the Plan). I think Queen Anne Victorian is my style.

Had some superb biscuits and gravy at Bread and Ink Cafe in Portland's Hawthorne district. I've eaten there several times over the past decade and it's always been good. They've got some sort of walk-up waffle window now which we didn't get a chance to try.

Tuesday, September 16, 2008

Science!

I'm having trouble getting back up to speed on my programming project, as no doubt is clear. Today I'm going to stop by the library to pick up Andrea Palladio's 16th century book on architecture. I've heard that it lays out a shape grammar for villas which would be useful in my project. That may be a 20th century paper by Mitchell and somebody else, though; I won't know until I can get my hands on some of it.

In the meantime science marches on:

Epazote: My wife tried making identical batches of pinto beans, one with epazote and one without. I could not really tell a difference, so either we had weak epazote or it doesn't add significantly to the flavor of beans. At least not in an unmistakable way like, say, chorizo.

Head On: A product with one of the most memorable no-budget TV advertising campaigns in recent history. We picked up a small tube the other day when we were at the pharmacy. It turns out to be a homeopathic headache remedy! Who knew? Of course it's got menthol in it: that's how you know it's working. I have an idea for a product of my own: a special lamp with a row of switches for enabling various rays which will cure headaches, insomnia, constipation, etc. It would make use of advanced LED technology and the unseen portions of the electromagnetic spectrum.

Cheesy Chipotle Chicken Chorizo Chili: How does this sound for a Taco Bell special?

Avatar, the last Airbender: I stayed away from this Nickelodeon series for a long time because of the cheesy name and four-elements premise (don't get me started on the four elements!) but enough people sang its praises that I finally borrowed the first season from the DVD library at work. It's a great show!

Monday, August 18, 2008

Computer Problems

No post today. My notebook computer is dying. It's a ThinkPad T61 bought last year so I am annoyed. The symptoms so far are that it locks up after waking from sleep. The mouse cursor can be moved but it does not respond to keyboard or mouse buttons.

Fortunately things are backed up but it will take some time to sort through the problem.

You might think that programmers love computers more than the average person. Not true at all!

Monday, July 28, 2008

Kist List

I got very nearly no programming done this week. And so I present to you a list of things I have seen that are “kist”:



Seen any others?

Sunday, June 15, 2008

Panty Raid

Two weeks ago last Friday, over $10,000 worth of panties (about 650 pair) were stolen during business hours at my local Victoria's Secret. More info There is no surveillance footage of the incident and no suspects.

Monday, March 17, 2008

Cake-baking weekend

This weekend was my wife's birthday. There was much partying, and I baked three cakes. The first was a sponge cake, to get warmed up. Then I made the intended real cake, an orange chiffon. However, I left out all seven egg yolks because I was being “helped” by my two-year-old while also simultaneously trying to keep the pacifier in my three-month-old. We baked it anyway and I went out for another dozen eggs and did another orange chiffon cake. I think I got that one down to the letter, but it fell out of its pan while it was cooling. (All these cakes are baked in a tube pan which you turn upside down and impale on a bottle during cooling so the cake doesn't compress.) I was glad we'd baked the yolk-less one; that was the one I decorated and presented. After serving up the final cake we tried out the yolk-less one. It was actually very good; just skewing toward angel food territory in its consistency. (It had ten egg whites in it.)

Chiffon cake is basically like a sponge cake but it's got oil in it which makes it softer and moister. It was invented in 1927 by a Californian guy who sold insurance and did catering on the side. He kept the recipe secret until he sold it to Betty Crocker in 1948. They published it as the “cake discovery of the century”.

Sponge cake, in turn, is like angel food cake but with some whole eggs instead of being egg whites only. Like angel food cake it has no additional fat. You separate all the eggs, beat the whites up into stiff peaks, and then fold them into the batter which contains the yolks. Mine turned out a little rubbery.

Here's a picture of the decorated cake from the day after:



It wasn't my best-looking cake effort. Chiffon cakes tend to have ugly surfaces because they're baked in an ungreased pan (to enable the cake to climb up the pan). They are such light cakes that a heavy frosting would really not fit (plus my constraint this year was a non-dairy cake). I dusted mine with powdered sugar to cover the blemishes and put a ring of daffodils and roses around the base.

Being able to separate eggs is key to making these kinds of cakes. Crack the egg in the middle. As you pull it apart, keep it tilted toward vertical so the yolk will fall to rest in one of the halves as the whites spill out. Then carefully transfer the whole yolk back and forth between the two halves of the shell a few times. This will allow the remaining whites to work themselves loose from the yolk and shells. Do this over an intermediate bowl and transfer yolks and whites to collection bowls if you are successful. It's important not to get even a hint of yolk in the whites.

I'm not really a baking expert; I just follow the recipes in Rose Levy Beranbaum's Cake Bible, and get advice from my wife, who is the real baking expert. The book is great, and the author's got a blog too.

What? No Programming?

Hopefully our regular scheduled programming will return next week. We are moving in the middle of this week so things have been slightly hectic.

A Moving Story

Speaking of moving, when we moved from Chicago to Seattle we had cleaned out the house and had a whole ton of liquor that we didn't feel like moving. I placed the bottles (some of them unopened, even!) in the top of the trash can in the back alley.

You know how raccoons will rip apart your trash if they think there might be something yummy inside? Well, it turns out homeless people will do the same thing, if they discover an unopened bottle of Stolichnaya in the top of the can.

Saturday, March 15, 2008

Stuff White People Like

Stuff White People Like

It's actually stuff yuppies (or Trixies, or whatever else they're called these days) like, but it's dead-on for that. It stings because it's true!

Monday, March 10, 2008

Monday, February 25, 2008

Young programmer

My father recently discovered a photo of me taken in 1985. I was programming in BASICA (the BASIC that came with DOS) then.



The computer appears to be an IBM XT, which was the first PC with a hard drive (5 MB if I remember correctly). There's an HP plotter perched on top, with the myriad pens next to the monitor. A couple of model rockets are visible up on the window sill.

Monday, January 14, 2008

Fun with food

This is a fairly useless post; sorry.

Diet Coke vs. Coke Zero

I finally did a side-by-side taste test of Diet Coke and Coke Zero. Here are the ingredients lists for each:


Diet Coke: carbonated water, caramel color, aspartame, phosphoric acid, potassium benzoate, natural flavors, citric acid, caffeine.




Coke Zero: carbonated water, caramel color, phosphoric acid, aspartame, potassium benzoate, natural flavors, potassium citrate, acesulfame potassium, caffeine.



They're both kind of foul, but if I had to choose one I'd go with Coke Zero. It's got slightly more citrus taste and seems a bit less cloying.

The story I heard is that Diet Coke was rolled out around the same time as New Coke, and was an attempt to be New Coke with no calories. New Coke was canned and Coke Classic returned, but Diet Coke retained the New Coke flavor. Coke Zero is a zero-calorie rendition of Coke Classic.

Of course, like an idiot I didn't think to buy a can of regular Coke to compare against the two. However, it can be difficult to compare corn syrup to aspartame. Aspartame lingers on the tongue for a long time after you swallow.

Egg-Carton Rotational Inertia

For a great demonstration of rotational moment of inertia, use up eight of the eggs in a dozen. Get someone to place the remaining four eggs in the carton without you seeing. Then try to guess where the eggs are without opening the carton.

It's surprising when you go to pull the egg carton out of the fridge and all the eggs are at the far end of the carton. My wife and I amuse ourselves by trying to distribute the remaining eggs evenly throughout the carton. If we wanted to keep the rotational inertia as close as possible to a full carton we would keep the eggs at the ends of the carton, though. I've started doing that instead.

Battle Ponies

This week I watched four episodes of the Legend of Zelda cartoon that aired in 1989. It's not great television but it got me trying to think of a cartoon franchise that would appeal to both little girls and little boys. I think I've got it: Battle Ponies! These are ponies (a la My Little Pony) which have been trained as ninjas to fight the evil Zombie Nazi Dinosaur menace.

Binge/Purge Cocktail

Ah, New Year's Day: when a young woman's thoughts turn to toxins, and the purging thereof.

A coworker of mine is trying out a ten-day toxin-purging regime whereby she does not eat, and subsists entirely on a concoction made of (“Toxins?” my wife said. “Let me guess: lemon juice and cayenne pepper, right?”) mixed with Grade B maple syrup (it has to be Grade B or you don't get all your vitamins and minerals) and water.

This sounds suspiciously like a recipe for a cocktail to me. As a cocktail, it has the benefit that, while you're binging, you're purging too! If I have any vodka around I may give this a whirl to work out the proper proportions.

Actual Coding

I'm back working on my stealth-gameplay Roguelike. Very little progress, though. I need to hook up locks to doors. The problem is that doors are currently a terrain feature, with no state. I handle opening and closing by altering the terrain. Now I need to be able to associate a lock object with the terrain feature. Locks have a type, which contains the order in which you need to push their pins to unlock them (if you don't have a key).

I think I will just write ugly code to start with, until I figure out what kind of generalization is appropriate. When you interact with a terrain feature, if it's a door I will look up the associated lock (if any) in some sort of spatial hash.

Eventually it seems like I might want to have an actual door object, which could keep track of its state. Right now I have several door-like things in the game which have similar code: doors, portcullises (you can see through these), and windows, with differing appearances for horizontal and vertical orientation on some of them.