Website Upgrades Coming

Since I’m waiting for both my line edits on Untimed and my proofreading on The Darkening Dream, I’m researching website construction. I have to morph, upgrade, or supplement this blog with a genuine author website and I can’t bring myself to hire someone to do it given that I’ve written far bigger and more complex websites and apps. It’ll just annoy me to no end to not be able to control it all myself. But at the same time, old school coding the whole thing manually (I’d probably use Ruby on Rails for that) is overkill and probably too much work.

So I read this Professional WordPress book yesterday and today to see if it would be reasonable to just extend WordPress. I think it is. A few plugins and some custom theme programming will probably do the trick. The problem is that I host on wordpress.com and they don’t allow you to install extra plugins (they have some installed by default) or add any PHP code. So I’ll have to migrate to a self hosted server. Maybe Media Temple VPS? Rackspace? Research. Research. Research. Anyone have any suggestions/experience with the good hosting platforms?

And I have to teach myself PHP, so I grabbed the bird book. PHP is one of those popular but slightly icky languages like PERL and JAVA that I’ve never been very partial to. It’s like Ruby, but 100x uglier and more primitive. I am a LISP (and Ruby) guy after all. Oh well. This is easy peasy programming, so I’ll just suck it up. Using something like WordPress will make my life much easier maintaining the site as it’s choke full of content management features. If I program it myself I have to go and code everything manually, which really isn’t very efficient.

I even wonder if one of these newer WordPress themes/frameworks like PageLines Platform isn’t a good idea. Anyone use one?

More to come as I get into it.

Way of the Warrior – The Lost Interview

A Twitter friend of mine dug up this ancient and forgotten interview that I gave from my Cambridge Mass apartment in 1994, during the development of our 3DO fighting game, Way of the Warrior. The original post can be found here, but he gave me permission to repost the whole thing here. It’s certainly one of my older interviews on record. I did a number in the 80s but those are pre-web and certainly long lost (unless I comb through my parent’s basement for old copies of EGM and the like!).

_

Back in May I had a chance to interview Andy Gavin, one half of the team that makes up Naughty Dog Software. The other half consist of Jason Rubin who’s a graphic arts specialist. These guys are based in Cambridge, MA., where I happen to be from, and have created what may be the best fighting game for the 300. I played Way of the Warrior and it definitely blows the first Mortal Kombat away easily. The game is similar to Mortal Kombat in many ways. The digitized characters, fatalities, combos, blood galore, hidden characters, and special attacks are all here. What Way of the Warrior does is take if a step further with an amazing AI(Artificial Intelligence), characters that shrink and grow, over 50 attack moves for each character, 100% 3D scrolling, hidden weapons, interactive backgrounds, bonus items, and so much more. Let’s have a talk with Andy and see what he has to say about Way of the Warrior.

VGT: When did you first start programming video games?
Andy: About 1 0-12 years ago, the first game we made was Ski Crazed on the Apple II, which came out in 1986. It sold a couple thousand copies. Dream Zone was our next game that sold about 15000 copies. Keef the Thief, from Electronic Arts, did much better and sold about 50,000 copies on various machines. We then did Rings of Power, which was our only Genesis cartridge. It’s was very complex and sophisticated and took about 2 1/2 years to produce.
VGT: When was Naughty Dog founded?
Andy: Well , Naughty consists of mainly Jason Rubin and myself . Naughty got its names from a cartoon character that Jason drew. (Andy showed me a picture of an old Naughty Dog logo). Their new logo is on their flyers. The character was created about 8 years ago.
VGT: Is there any downside when programming on the 300 with their CO’s? Does access time and RAM space affect your games?
Andy: Well, first of all the 3DO has 3 megabytes, not mega bits of RAM, which is bigger then the largest SNES cartridge. The CD itself is 660 megabytes . There are technical issues that need to be addressed when programming on the 3DO. One has to use clever designs to reduce and eliminate load times. In Way of the Warrior the entire program was designed in what we call, Asynchronous. The loading is done while you play, by anticipating what needs to be loaded’ in advance with a hardware process called DMA (Direct Memory Access) . There ‘s a short pause going into a fight, but once the action has begun, there is no pause. Players can perform all their moves, with fatalities, 3D scrolling and the stereo music blaring, but with no load time.
VGT: So even though we’re playing continuously, there’s no slow down what’s so ever.
Andy: Yes, the 3DO is capable of loading stuff without any slow down. However, many previous CD games, including the 3DO, have had notable slow delays.

VGT: Like the Sega CD for instance?
Andy: Yes, this is due to sloppy, programming and not being aware of how to program on CD’s. It’s a difficult issue when writing programs that can actually play and load at the same time. It’s a technical challenge. With good program design the load time can be minimized. In turn, the quality of the sound effect, music, FMV, and game play surpass any cartridge game. Cartridge games only have a limited amount of memory in which you can program. CD’s only cost a dollar to manufacture, while cartridges can cost anywhere from 20-30 dollars. CD’s have enormously superior cost to storage ratio.
VGT: Can the access time for the Sega CD be reduced with technical design programming?
Andy: They can definitely reduce the access time. I don’t know that much about the Sega CD though. I don’t think their DMA is better than the 3DO. The 3DO has 4-5 times more memory. It also has a CD drive that’s twice as fast. It has decompression hardware that effectively doubles the speed. It has a unique and extremely powerful custom DMA architecture that can move graphics from disk to memory to screen and back without effecting game play.
VGT: What makes Way of the Warrior different from all the other fighting games?
Andy: As I mentioned before, I have an Artificial Intelligence Graduate degree from MIT. The computer players in WOTW are much more sophisticated then in other fighting games. Whereas they often resorted to patterns to beat the human players, there are no patterns programmed in for WOTW. It uses research grade AI that learns the best way to beat you. It’s extremely cunning and different and actually looks like a real player fighting by adapting to the situation and using all it’s moves.
VGT: Is it always learning consistently more and more each time you play it?
Andy: Yes.
VGT: What about the characters? What makes them so special.
Andy: The characters have around 50 normal moves and about 15-20 special moves. These moves reflect their styles and personalities. There are many secrets that use the background area and hidden characters can also be found.
VGT: So is each character equal in sense or are some stronger then others?
Andy: All the normal human characters are designed to be equal even though they’re different.
VGT: Well, I remember the first Street Fighter II game had very uneven characters. Some had a major advantage over others.
Andy: It’s tough to get the characters exactly even. We tried to get them as close as possible. People also developed different strategies for beaten the other characters. There are a lot of unique techniques and abilities for each character. Like Konotori, which means “stork” in Japanese, can flap and stay in the air longer. Major Gaines has special steroids’ implants that can change his size and therefore the amount of damage he receives become minimal. Nikki Chan is a Chinese Kung Fu artist who can do flips with special moves. She’s very fast and agile. Crimson Glory has close in grabs and special multi-missles that can be fired. Some character has special weapons. Nabu Naga has a sword and throwing stars. Shaky Jake has a staff.
VGT: There seems to be a little bit of everything from all the other fighting games in this game.
Andy: The other fighting games are very narrow. Most of them are to much alike. What we tried to do was take everything good from all the other fighting games and combine them all into WOTW. We’ve added unique features with better graphics, sounds, 3D backgrounds, special magic and potions, panning and zooming, background interaction, and larger more detailed characters.

VGT: Was the process of digitizing the characters the same as Mortal Kombat.
Andy: There are similarities. We’ve never seen them actually doing it. We have seen photos in magazines. They are actually a little more regimented then ours. Their fighting engine is much less sophisticated then WOFW. It requires that every characters moves line up to the exact same position. When each character does a high punch in Mortal Kombat, they high punch at the exact same point. So when they digitize their characters they have to line up perfectly. In WOTW, every character has its own information so not all characters need to have a high punch. Some of the characters punch high, some low, while others are tall, short, big and small. There’s no requirement that the character be the same size. We built the character the same way the actor would appear, rather then force them to convert to our pre-requirements.
VGT: With the 300 having such a small user base at this point, do you think it can increase sales and become successful?
Andy: We think it has a good chance. All game systems start off with a small user base. People forget the Genesis came out in August of 1989 and 2 years later when the Super Nintendo was released it only had 700,000 machines out there and only 23 games after the first year. 300 already has more then that. The 300 is the first of the 32/64bit machines and the difference is academic. Sony, Sega, and Nintendo have all announce 32/64bit systems that won’t be available until 1995. The 300 will be the only significant 32bit machine when Christmas comes. It will have a year of development by then and the price will probably drop some more. So I think it’s in good shape. We hope WOTW with help sell systems.
VGT: Are there any other projects being worked on for the 300?
Andy: We have 2 other projects we’re working on, but we can’t comment on them at this point.
VGT: Do you think that CD’s are the way to go for our future programmers?
Andy: I think this year is the year of the CD’s. It already has the PC market. It offers so many advantages in cost and amount of storage . The access time disadvantage can be overcome with well-designed machines and good programming techniques.

VGT: Are there any other types of games that Naughty Dog will be working on besides fighting?Andy: We signed a deal to put WOTW in the arcades.
VGT: If WOTW does come to the arcade, will it be different then the 3DO version.
Andy: It would be a bit different. The basis of it would be the same. There are different constraints for the arcade version. The 3DO is capable of producing arcade quality games.
VGT: What’s the most outstanding achievement you’ve seen in video games today? What games really blow your mind?
Andy: I have favorites over the years. I tried Ridge Racer which was very impressive looking, but had mediocre game play. In the PC world, “DOOM!” was very good looking. It shows us that 3D games are here and can be produced very well, even on PC’s.
VGT: Well, that’s about it for the questions. Thank you very much for taking the time to be interviewed by VGT. We all hope that Way of the Warrior is very successful and we look forward to reviewing it and any other games that are produced by Naughty Dog.
Andy: Your welcome. Thank you for choosing Naughty Dog as your first interview. We look forward to reading VGT when it’s released.

This is back to 2011 Andy. It’s so worth watching the totally hilarious video from our 1994 masterpiece (LOL). As you can see, we went for over the top.

For more info on my video game career, click here.

For what I’m up to now, click here.

Untimed – The Last Draft?

I got notes back from my editors concerning my new novel, Untimed. This is the least stressful batch I’ve ever received. Not only are there relatively few changes, but I agree with all the big ones. Granted, this was the third draft they gave notes on, so we changed a lot of things earlier, but it’s good to see the light at the end of the tunnel. It’s been 48 hours and I’m already through the first 25% and I’ll be done by mid-week for sure, then it’s time for another full read and polish (by me) and the line edit (by them and by me).

Suggestions for big changes, particularly big cuts, are a bit like losing a loved one. You have to progress through the stages of grief:

Denial – I won’t really have to do it. Those notes are for someone else’s book.

Anger – They don’t really understand what I was intending!

Bargaining – Maybe if I only do this or that, they’ll “let me” keep most of it. NOTE: Really the author has the power, but when an editor is good, they’re usually right.

Depression – This is going to be so much work! And I loved that stuff!

Acceptance – In the end, it’ll be a better book.

This particular batch of notes only puts a couple tiny babies on the butcher’s block. Not even whole sections of the plot, just a few little scenes or ideas. Not too bad.

Back to work.

For my posts on writing, click here.

Dreaming Along

I’m plugging away on my “after the gap” read of The Darkening Dream. At the 60% point, so I should hopefully be done by the end of the week. There’s only one scene I need to go back to and give a bit of a rewrite. It’s one that’s always been a bit problematic, where a character tells a bit of a story about a previous encounter with the undead, and while it’s only 800 words (it used to be 3,000 in the first draft) it’s told in dialog. That’s always awkward, and it’s the only place in the book where a happening longer than a couple sentences is dialoged out. I even have to use that long dialog paragraph leave off the terminal curly brace thing. Over the two years since I first wrote the scene, I’ve rewritten it perhaps five different ways. As dialog, as flashback, with sarcastic interrupts, without. It was once a creepy, but over long episode, but now after so much trimming it just lacks punch.

I’ll have to revisit after I get to the end of this pass.

And I finally adjusted to past tense again (only took 20,000 words!). It’ll be interesting to see if my head whiplashes so badly when I flip back to Untimed (hopefully soon). I’m due my third draft notes any day now.

Moving through The Darkening Dream I find it paced like a roller coaster. Literally. Including the slow initial tick tick ascent to the top of the first hill (which crests at about at the 20% mark). The pacing is mirrored by the chapter length and the progression of time. In the first quarter, several weeks pass for the characters and on average the chapters are longer and more linear. Then at the top of the hill, I start to slide in the point of view of first one and the other villain. With that, the chapter length halves and the action is compressed into a small number of hectic and deadly days. Like most stories with a lot of violence, if one actually had to endure the narrative in real life, one would probably drop dead of exhaustion. TVs 24 being the ultimate example.

On a slightly different note, I switched the name on my ghetto cover (my home-brew one on the right, placeholder until I commission a real one) back to “Andy” as opposed to “Andrew.” I keep debating this. At some level it feels slightly odd to be in my 40s, a husband, and a father and not have dropped my nickname. But I just never have, and on the plus side all my SEO points at Andy, not Andrew. The later is what the Gas Company calls me.

For more posts on writing, click here.

Vocal Whiplash

I started a new read through and edit on my first novel, The Darkening Dream yesterday. I’m waiting for feedback on my newer book and wanted to cleanup the first one so I’ll have it ready to be proofread for possible self-publishing. This is the first time I’ve looked at it in eight months (I’ve been working on Untimed) and the difference in voice is flogging my brain.

It’s weird and not a little disturbing to read your “older” work. I started TDD in January 2008, writing the first draft of what’s now the opening twenty percent (before heavy alterations). I stopped (because of work and the birth of my son) and picked up in fall of 2009. Although I’ve done about a zillion (more like ten) drafts, traces of this oldest style remain in these early sections. And boy has my literary voice changed since then. Most dramatically, I no longer detail out as much of the action and setting. Nowadays, I concentrate on sketching and implying important points, choosing my scenes less to block through the whole action than to paint in important moments. These old sections have been heavily trimmed down, edited and reworked, but they are still organized in a stodgier more sequential fashion.

And the beginning of my story is tricky, introducing a period world with a large cast of period characters. I’ve several times restructured the start of TDD, including one late attempt this year to write a number of alternate starts. But I have never found a way to replace the measured build up I currently have with a more hook driven start like Untimed has. It’s easier to start that way. Oh well, live and learn.

The biggest shocker, however, is how difficult it is getting used to past tense again. TDD is written in the normal third person past limited, where different chapters focus on different characters. There is no omniscient narrator but the implied narrator shifts from chapter to chapter. Untimed is first person present. Single narrator obviously. I’ve really grown to love the immediate quality of the present tense. One also gets to ditch most the “hads” used to indicate the past perfect. In past tense, you might say, “He went to the store,” or to indicate prior time “Earlier, he had gone to the store.” In present you’d likewise use “He goes to the store” and “He went to the store.” The normal past tense takes over for the past perfect, and it’s a much cleaner tense.

The first mini-scene of TDD is as follows:

As services drew to an end, Sarah peered around the curtain separating the men from the women. Mama shot her a look, but she had to be sure she could reach the door without Papa seeing her. After what he’d done, she couldn’t face him right now. There he was, head bobbing in the sea of skullcaps and beards. She’d be long gone before he extracted himself.

“Mama,” she whispered, “can you handle supper if I go to Anne’s?” Probably last night’s dinner debacle had been Mama’s idea, but they’d never seen eye to eye on the subject. Papa, on the other hand, was supposed to be on her side.

Mama’s shoulders stiffened, but she nodded.

The end of the afternoon service signaled Sarah’s chance. She squeezed her mother’s hand, gathered her heavy skirts, and fled.

As an experiment, I rewrote this in present tense, a fairly straightforward change:

As services draw to an end, Sarah peers around the curtain separating the men from the women. Mama shoots her a look, but she has to be sure she can reach the door without Papa seeing her. After what he did, she can’t face him right now. There he is, head bobbing in the sea of skullcaps and beards. She’ll be long gone before he extracts himself.

“Mama,” she whispers, “can you handle supper if I go to Anne’s?” Probably last night’s dinner debacle was Mama’s idea, but they never saw eye to eye on the subject. Papa, on the other hand, is supposed to be on her side.

Mama’s shoulders stiffen, but she nods.

The end of the afternoon service signals Sarah’s chance. She squeezes her mother’s hand, gathers her heavy skirts, and flees.

Which do you guys like? I suspect that past tense is more appropriate to this story, being conventional and also given the setting in 1913. But I’ve grown so fond of the present tense that I can’t judge anymore.

For more posts on writing, click here.

All Things Change

So I’m about halfway through my last polish pass on my third major draft of Untimed. [Update 7:44pm, finished the polish] This is one of the umpteen revision passes. Only another day or two to go before I send it off again and get down to waiting for feedback (hands down my least favorite part of writing).

The book totally kicks ass BTW — biased opinion but true.

Anyway, this has me planning to spend my “downtime” (waiting) doing some really serious research on self-publishing my first novel, The Darkening Dream, and seeing if I can get it out there before the holiday season.

I’ve been following self-publishing blogs like A Newbie’s Guide to Publishing and Dean Wesley Smith for around a year. These guys — rhetoric aside — have made sense for some time but the arguments for traditional publishing grow lamer and lamer. Check out something like this, which lays it out there — albeit with a lot of flavor. Publishing is in the throws of the cataclysmic “doing digital” change that has or is shaking up all the media businesses. For example, in music the conversion from media (vinyl, cassette, CD) to MP3 during which the labels/studios stuck their head in the sand and found themselves nearly destroyed.

The fact is, the change is coming no matter what any big old-school companies want or try to do. Readers are well on their way to embracing ebooks, the rise of the tablet (aka iPad), and dropping smartphone and reader prices (order your Kindle Fire here! 250,000 preorders in 5 days!), has etched the writing on the wall (in blood). In a few short years print will make up 20 or less percent of the market. Paper books (and I say this as someone who has a two story library with over 15,000 of them!) aren’t going to vanish instantly, but they won’t be majorly relevant for novel sales.

So this basically guarantees completely and without any doubt that print revenues will crater, leaving publishers unable to support their big overheads. Borders (and nearly every independent) going bankrupt will just hasten this. Barnes and Noble is next. They tried with the Nook, but Amazon is going to crush them (again, Kindle fire, not to mention $79 regular Kindle). And publishers, being large old-school companies that employ LOTS of people under the old model are showing lots of signs of panic, but pretty much not a glimmer of adapting to the changing business.

But they won’t have one soon. Because without control of the gates to bookstores, they don’t control anything.

Right now they still make the better product. But as an author they:

1. tie up rights

2. take way too much money (15% vs 70% doing it yourself)

3. take way too long (15 months instead of like 1-2 to market!)

4. charge too much for ebooks

5. don’t actually do any marketing

6. often have really stupid ideas about “marketability” (like “sex doesn’t sell” or “vampires are over” *)

Eventually new meaner leaner packaging companies will make the murky ground of processing books a bit easier, but in the meantime. Time to get researching.

If anyone knows a kick ass indie book marketer, I’m looking to hire one (that’s the only part I can’t really do myself).

For more posts on writing, click here.

* From above: The Vampire Dairies and True Blood both prove both statements simultaneously asinine. And while TDD does have a vampire, he does not ever sparkle in daylight (900 years and he hasn’t seen a glimpse of it) and he is not in the least sexy. He is, howeverfrightfully smart, cautious, and happy to decorate your house with the entrails of your closest family members.

Revision Slog – Novel as Algorithm

As I slog toward the end of my third major draft of my new novel, Untimed, I felt the need for brief procrastination in the form of detailing the process. Most people seem to discount how much grind and sheer time investment is required in writing (and revising) a novel, even a vey steady workaholic like me. Let’s do a little breakdown.

Untimed is actually fairly short, currently at 83,000 words and 38 chapters. This is MUCH shorter than my first book started out. Length is a factor because you have to iterate (i.e. read through the book a LOT of times).

Think of each major draft as a loop (I am a programmer) with various sub loops.

. Generate Idea (for the most part this kind of happens or doesn’t)

. Character Design and High Level Plotting (you could spend who knows how long on this, I don’t find it that useful upfront, most of it just comes to me while doing other things)

. The First Draft:

. Initial drafting: For each chapter (1..38) loop:

. Plot the beats in the chapter. This takes an absolute minimum of 1-3 hours even if you know exactly what’s supposed to be in there. Sometimes it takes several days of banging your head and talking to others.

. Pound out a first draft. I can do 2000-2500 words of new draft in one 8 hour day. I generally make this a chapter. Occasionally I’ll be on a roll and do two.

. Reread it to catch really stupid typos, phrasing, and make sure it makes sense (1 hour)

. Subtotal. For above book that represents 50-60 workdays (NOTE: if you take days off, it’s chronologically much longer). Notes on finishing the first draft, here.

. High level pass:

. It’s impossible when writing a chapter or two a day to see the big picture in the book, so you have to do at least one faster pass through afterward.

. I can do about 10-15,000 words a day like this, which is actually fairly brutal

. Subtotal. About 7 workdays. 1-2 full reads.

. Quick read:

. If you want to judge pacing you have to read it all in a day or two like a normal book, not on the computer

. Subtotal. 1-2 days. 1 full read.

. Draft total. About 60-70 workdays. 4-5 full reads.

. Wait for feedback:

. Since you have to finish something and send it to someone, even a paid editor will take some time to read it and return feedback. This usually takes several weeks. I try and overlap it with the cleanup passes, but it’s tricky.

. Revision Drafts (I’m currently finishing the third major redraft) so I’ve done two of these so far on Untimed:

. Plan, outline, and organize changes.

. Can take from a couple days to a couple weeks. Some thoughts on this with Untimed HERE.

. I can do about 2-3 chapters a full day of revision. So for each block of 2-3 chapters loop:

. Do the actual revision. This can be fairly grueling, involving initial big surgery, a smoothing pass, then a cleanup pass

. Reread it to catch really stupid typos, phrasing, and make sure it makes sense (2 hours)

. Subtotal. Plotting 7 days, revising 15 workdays. Generates 2-3  extra reads per chapter.

. Medium Quick read:

. Checking for consistency

. Subtotal. 3-4 days. 1 full read.

. Total for each revision draft. Approximately 25 workdays. 3-4 full reads. Notes on the second draft HERE.

. Wait for feekback. You have to find out from others, often people who have never read the book before, how a draft comes across. This takes awhile. A reader who gets back to you in a week is amazing. It often takes several and some gentle (or not so gentle) prodding. Or tossing them some money. Sometimes that doesn’t even work. I had one (paid) unemployed beta reader tell me that they couldn’t start it because it interfered with their watching TV! NOTE: Said individual did not get paid.

. Line Editing:

. When the big picture is all settled out one sends it out to an editor for Line Editing. This involves more editor time than author time, but still chunks of the book come back and one must go over the edits and install them.

. My editor will request a “compression” pass before sending it to her. This is an extra pass to try and self edit it first.

. I can do about 8000 words a day like this. Approximately 10 days. 1 read. This is brutal but can be overlapped chronologically with the editor’s line editing. I.e. I can self edit a chunk and then send it out, meanwhile self editing the next chunk while the editor is working on the previous one, then also fit in the next part (processing) of returning chunks in a pipelined fashion.

. I can “process” returned line editing at about 6,000-8,000 words a day. For each chunk loop:

. Read over the track changes version of the line edit in word, approving and rejecting various edits and making cleanups

. Copy over each scene in into the real draft. Cleanup formatting.

. Do a quick read of the chunk or chapters to make sure nothing got screwed up

. Subtotal. Approximately 12 workdays, but spread across more chronological time as the edits can’t churn out this much per day. 2-3 full reads.

. Quick read:

. If you want to judge pacing you have to read it all in a day or two like a normal book, not on the computer

. Subtotal. 1-2 days. 1 full read.

. Total for line editing. approximately 24 days. 4-5 full reads.

As you can see. This adds up to a LOT of days and a lot of passes. Finishing up the third draft here, I’m already on eight months and at least 12 read throughs, and I can look forward to several more of each.

For more posts on writing, click here.

So you want to be a video game programmer? – part 5 – The Method

…CONTINUED from PART 4. Or start at Part 1.

This post is presents an algorithm of sorts for learning to program. It applies not only to the fundamentals, but to all aspects, including the acquisition of small component skills. Thirty years after learning, I still follow the same basic procedure. To tell the truth, modified, it works for leaning most things.

Step 1: Goal. Invent some manageable goal that excites you (in a later context as a profession “excites” is often replaced/supplemented by “need”). My first program was a text-based dungeon master (see here). If you want to be a video game programmer, there’s nothing better than a game. If it’s one of your first programs, make it damn simple. Copy some REALLY REALLY old and simple game like anything from before 1981 (PongBreakout, etc.). Truth be told, using text only for a couple weeks/months might not be a bad idea. Graphics just complicate matters. They’re awesome — and you’ll need them soon enough — but first the fundamentals, like variables, flow of control, scope, etc. Any individual task should take no more than a few days. If your goal is bigger than that, subdivide.

Step 2: Environment. All programming is done in the context of some environment, and you must learn about it. You need to start with a simple one. In my case it was mostly AppleSoft BASIC. For learning interpreted is good. Some decent starter environments today are Python, Ruby, Flash, Lua. DO NOT START WITH A LANGUAGE LIKE C. I will elaborate on this environment question in a separate full post, as it’s a large topic and highly religious for programmers.

Step 3: Research. This means reading. If you don’t like to read, either learn to or find yourself a new career. I’m serious. Reading separates the Neo Cortexs from the gibbering marsupials. I’m serious. Be a New Cortex. Your love of reading must be so extreme that you can stomach slogging through 900 page Library Reference Manuals (maybe not at first). Programming is full of details.

Step 4: Theory. Get out a pad of paper, a text file, Evernote, or whatever. Design what you are going to do. Later, you might or might not skip this step (and do it in your head), but it’s useful for the beginning programmer. You don’t need to write out the entire program, but you should design your data-structures and modules or functions. If it’s one of your first programs, you should hardly HAVE data-structures. You might instead write down the modes and loose flow chart between them.

Step 5: Code. Actually try coding your program. This is best done in an iterative way. My advice is generally to start with creating your core data-structures, and then the functions or methods that support them. Test each of these individually. Interpreted languages with a listener are the best because you don’t have to write test suites, but can just test the components as you go at the listener. Time spent debugging individual functions and groupings (say all the methods that belong to a data-structure) pays for itself 100-fold. I still do this. The less code you are testing, the easier it is to spot and find bugs. If you know that your functions are reliable (or semi-reliable) they provide robust building blocks to construct with.

Step 6: Debug. See above in “code” because they are heavily intertwined. Coding and debugging happens together in small loops. Again. The less NEW code you have to debug, the better. Debugging is hard for novices. Do not write an entire big program and debug it all at once. If you are using a language that syntax checks, check each function after you have written it. Fix the syntax errors (typos) and then test and debug the single function (or component of a program). Baby steps. Baby steps.

Step 7: Iterate and improve. Just keep adding things to your program to get it to where you want. Add a new feature. Improve an old one. Rip out some system and replace it. Add graphics. Upgrade them. Try to keep each of these changes as small as possible and test after each change. The longer it has been since it ran, the harder it will be to make it run.

_

I can not emphasize how important baby steps are. They are the key to avoiding fatal frustration. I have a law that helps define the size of subtasks: DO NOT EVER LEAVE THE COMPUTER IF YOUR PROGRAM DOES NOT RUN. You can take a piss or stretch. That’s it. I lived by this rule my entire programming career. You can’t always follow it, but try. Get your ass back in that chair. Mom wants you for dinner. Shrug. Your co-workers call you for a meeting. Snarl. I always think of a program like a car engine. You can sometimes merely tune it up, but a lot of times you have to take apart the engine to fix/add something new. That time when the engine is apart (the program does not RUN!) is very important, and should not be very long. If it is, you are not subdividing your tasks enough. I write all sorts of custom code to allow the engine to run again (even if in a half-assed way) while big changes are going on. These intermediate constructs are intended as throw-aways. But they save time. Having your program broken, writing more than a couple hours of new code that has not been tested, is a recipe for disaster. You could easily reach the point where you have no idea where the problem is. If you test in small bits as you go debugging is MUCH easier. Bugs are perhaps 80% likely in the most recently stuff. It’s the smoking gun you goto (haha) first.

You can do a lot with ASCII graphics!

A starter example of this whole process: My first game was a text based D&D type RPG game. I wanted to include a number of “cool” (to a 10 year-old) encounters. So I structured it as follows: There was the “character.” This was to be just a number of global variables (this is long before object oriented programming) like G (gold), HP (hitpoints) etc. I wrote a couple “methods” (functions – but they didn’t have names in BASIC, just line numbers) like “takes a hit.” This subtracts from HP, and if <= 0 branches to the “you are dead” part of the code (not really a function in those days). Then I wrote a number of “encounters.” These were the main flow of control in that program. It popped from encounter to encounter. They might be like: You have met an orc. draw orc on screen with text graphics (aka print statements). present options: “attack,” “run,” “use magic,” etc. wait for input and apply logic. If you are still alive send the player back to the main navigation loop (the place that doesn’t have a particular encounter).

That’s it. I expanded the program by doing things like: Adding more encounters. Adding resurrection as a pay option when you died. Adding an actual map to the main loop. Moving the “combat” logic from individual encounters into a function. Then adding to the character attributes like strength and dexterity which influenced combat. Beefing up character creation. Etc etc. These are all tasks that can individually be accomplished in a few hours. This is key. It keeps your program running most of the time. It provides good feedback on what you are doing.

The entire above “goal” -> “debug” loop can be repeated endlessly. Example: “add a save game.” You now have to save and restore the state of your player (various global variables). But to where? Disk presumably in those days. So you crack the BASIC manual and read about file I/O. First you go simple. There is one save game. It’s always named “adv.sav”. You write a function to open the file and write the vars into it. You examine the file to make sure it put them there the way you want to. You write another function to read the file. You add options to the game menu to call these functions. Then test.

Next baby step. Allow multiple save games. You add “filename” (or save slot or whatever) to the load/save functions. You hardwire it to something and test again. Then you add interface to the game’s main menu to specify which slot. You test that.

Iteration is king! Good luck.

_

Parts of this series are: [WhyThe SpecsGetting Started, School, Method]

Subscribe to the blog (on the right), or follow me at:

Andy:  or blog

Or more posts on video gaming here.

And what I’m up to now here.

Crash Memories

In honor of Crash’s 15th Anniversary I wanted to make a post whose primary purpose is to serve as a repository for comments from you — the fans — about your first and favorite Crash Bandicoot impressions. Please make them in the comments. This is the place to tell that story of how you got your Playstation and Crash Bandicoot for Christmas when you were five, etc. etc. So to that effect, I’ll start it off with a brief tale that begins the night Crash Bandicoot launched.

In September 1996 all of Naughty Dog flew to New York for the combined Crash Bandicoot / Playstation 1 year anniversary party. It was on a big rooftop deck in the meat packing (hehe Beavis, you said meat packing) district. All of us got pretty drunk. There was a loud band. Very loud. Simultaneously, Ken Kutaragi (father of the Playstation!) decided to engage me in a highly technical discussion — against the 120 decibel background — using his rather broken English and my exactly zero command of Japanese. But in any case I didn’t sleep — we saw dawn in some New York greasy spoon.

About four hours later, Jason and I were on a plane to London. I didn’t sleep — why waste good reading time.

We arrived in London for ECTS and various Crash launch promotional meetings. We were immediately conducted to small hot smoky cubicles and interviewed by a variety of game journalists in numerous European languages for about eight hours — also against about 100 decibels of trade show. We then went to the bar (scotch). Then to dinner (wine). Then to a night club (more booze). Then a cigar bar (more scotch). Then to our hotel room (with about 15 or so European marketing and sales folk). There we consumed every single item in our minibar. We called down to the desk (4 in the morning) and had them bring us a NEW minibar. Yes, a complete refill of all items at 4 in the morning. We consumed that. Except for two miscellaneous tiny liquor bottles I can’t remember. The cost of just one minibar was 800 pounds sterling. We ate/drank two.

We didn’t sleep.

But we did spend another eight hours giving interviews. Then we went out again. That night I think we got 2-3 hours of sleep. But interviews again starting at 8am.

Somewhere in there I visited Westminster Abbey.

By day three we discovered that a number of our new friends (English) had never left the Island of Great Britain. So we all boarded the Chunnel and went to Paris (from Waterloo to Napoleon stations specifically, which is amusing). In Paris we started drinking at 10am. We kept drinking (many bars). We ate dinner (more wine). We went to someone’s apartment (more drinks). There was no sleep involved. After staying out all night (drinking) after the day of (drinking) we boarded the Chunnel back to London. I might have dozed. We went straight from there to the airport and got on a flight back to LAX.

Ah, first class. There were scones with clotted cream. And perhaps an hour or three of sleep. But we landed in LA at 7am. I was on the beach jogging by 8:30am. In the office at 10am. Back to work on the Japanese version of Crash. I went home early that day. Midnight.

Making video games builds stamina.

Don’t forget to put your own Crash memories in the comments section!

_

Subscribe to the blog (on the right), or follow me at:

Andy:  or blog

Or more posts on video gaming here.

And what I’m up to now here.

Middle Madness

I think I’m over the hump with the third major draft of my new novel, Untimed (for a quick blurb see here).

Story structure is hard. And while this book is much better structured than early drafts of my previous novel, it had two major problems: the ending and the first part of Act II. Late (very late) in the second draft I cracked the ending. So that just left the middle.

Therefore, I wasn’t surprised when the biggest comment from my awesome freelance editors’ (I use three: Renni Browne, Shannon Roberts, and R.J. Cavender) involved problems in this middle section. It’s not that the scenes wen’t good or exciting, but mostly that I fell prey to a personal need to sneak Napoleon into the story (time travel seems to call out for the most pivotal personality of the modern era) and this resulted in a bad case of “Double Mumbo Jumbo” (or a variant thereof).

So what is the dreaded Double Mumbo Jumbo? Most specifically it’s the phase coined in Blake Snyder‘s Save the Cat book (which I discuss here). DMJ is invoked by throwing two unrelated implausible things into the same story. However, my specific problem is really a cousin, what my editor Renni calls “1+1=1/2”. This is, the idea that doing the same improbable thing twice in the same book isn’t twice as good as doing it once, but actually half as good. Even if the thing is cool. So a kind of DMJ.

And I was doing it in my middle.

Still, this section of my story accomplished a lot of other things too. And I had to figure out how to rework it to keep as much of the good as I could, avoid a DMJ — and not make TOO much work for myself in terms of repercussions later in the book. Thinking about various ways to restructure, particularly given the constraints of my story, my elaborate time travel scheme, and history itself, was quite the brain buster. I thought on it all day for at least a week. So hard one Friday that I literally gave myself a migraine headache! I found myself pondering time travel so aggressively that I became confused as to what year it was — and then my vision began to shimmer (migraine).

I probably outlined 15 different scenarios and talked about countless more. This part of the writing process is very peculiar. I often end up with a half-baked scenario that satisfies some goals, but just doesn’t really work. One quickly reaches a point where no new ideas surface internally and you need to shake it up. I then find it extremely useful to talk with a limited pool of friends who have read the book in it’s latest incarnation. This allows me to efficiently go over the possible elements. Then we talk out the problems. By vetting numerous failed scenarios it’s often possible to collect enough different disconnected ideas that a single coherent new plot can be jig-sawed together. Or at least coherent enough to polish out in the writing.

This last week, I even twice resorted to writing out (as prose) incomplete outlines to see if they worked. The first revealed itself as a miserable failure. The second made it to the finish.

Now it’s off to friends and editors to see how it passes muster.

For more posts on writing, click here.