Wednesday, January 10, 2018

Andrew's hide and seek adventure

Originally envisioned as a tweetstorm, hence the abbreviations:

So, walking home from a late workout, the wind tunnel just by the athletic club did its thing. My glasses flew off. I saw them, then I didn't, and I hoped they didn't fall through the manhole. I didn't have my phone for a flashlight either.

Not the first time. Then, they flew the other way & it was daylight. But a passerby helped for a while with his own flashlight. I figured the approximate trajectory & noticed a Divvy bikerack sort of blocked the wind.

Went home&got my phone. Bicyclist stopped/helped a bit. I thanked him too. Went home again & got paper to write lost and found info & tape for a pole I found. Wished for a (otherwise loathsome) selfie stick to help look in dark places/keep the light close to the ground.

Watched trash blow by for more data. Then a weird clattering noise. More plastic? No, my glasses, right where someone had tried to release a Divvy bike & couldn't. I'd sworn I was standing there talking to them. But it was in the center of the trajectory lines I guessed.

I had a lot of duplicated effort but I'm proud of not panicing too much & observing what I could. Whatever journey my glasses took (80 feet maybe) I ... tried enough to give myself a good chance to get lucky.

90 mins to save glasses that cost well into 3 digits. That's a good bit of work (& more exercise than I planned!) But I still need to buy a backup pair for next time. And I wish I had gotten the passerbys' mail to say thanks.

I feel smarter about this than the time I dropped my keys in the dumpster while taking the trash, because 1) holding the trash and the keys in the same hand (and not taking 2sec to put the keys away) was ASKING for it 2) there was a lot more ground to cover than the dumpster.

Monday, March 6, 2017

A tribute to McGonagall.org.uk

William McGonagall was a poet. You can read his wikipedia entry, visit the site, or guess how good he was from my poem below.

Oh truly it was a most glorious day
I found mcgonagall-online-org-UK.
The lovely site did not even have to bribe
Me to click the link that would let me subscribe
And get via email a fine daily gem
For which must thanks must be afforded to them.
Too soon one repeated, my land, shock of shocks!
Until I recalled the birthday paradox
And right then and there did I take a wild stab    
At reading them all: right click, use new tab!
And since it was mostly just text in each node
No poem took overly long just to load.
A new shortcut later made me feel contenter:
A poem read, alt-left arrow, tab and then enter.
I counted them all and saw 245.
To read them up quickly this author did strive.
On finishing I knew my time was spent well
Much better than if I had binged on FreeCell.
And yet when I finished, a sense of pure gloom.
I staved off with a DVD of "The Room."
Before moving on like a stone cold top boss
To prose by Amanda Mc-Kitter-Ick Ros!

Wednesday, September 21, 2016

Spellchecking your WIP: instructions, and a question

I've realized that spell checking can be tricky to do for a tester on the other side. It can also trip them up if there are bad typos. So someone I was testing for, for IFComp, asked how I was able to do it for them, for a twine game. This may seem late in the game for such a post, but I think it will give high value for the time it takes. So, have away!
I have Windows, so I run Notepad++. Which is a really awesome app if you don't have it. Worth the install time and not just for this spell check.

TWINE:

Right click to get the source of a twine game, then ctrl-a, copy and paste. Then paste to a document in Notepad++.
Do ctrl-f to find, then click the "regular expression" radio button.
For what to find, type <[^>]*>
This translates to <(bunch of HTML tag stuff)> but nothing outside the tags.
For what to replace, type \n
Replace all

Then I ran the native spell checker in notepad++. ctrl-shift-alt-s.

You may have to also define c:\program files (x86)\aspell\en.prepl as not read-only in windows explorer.

INFORM 7:

http://superuser.com/questions/411071/grep-like-functionality-for-notepad was a BIG help for me.

Ctrl+F --> go to the Mark tab --> toggle Bookmark line --> Click Mark All. (you want to search for say ")
Select menu Search --> Bookmark --> Copy Bookmarked Lines.

Then you can replace say " with nothing, and \[[^\]]\] with \n, and then spell check as before.

If anyone knows a good text editor this works for with Mac, that'd be a big help.

Sunday, September 11, 2016

Grubbyville Postmortem



Well, it was nice to be able to place, which was my competitive goal for IntroComp. Thanks to Jacqueline Ashwell for holding and organizing it, for so many years.

But what about creative goals?

It's always a bit frustrating to read criticism of stuff I should know, or I thought I fixed or looked at, and realizing--yeah, I didn't quite nail that down. And that's what I got from various reviews. Part of this was picking the project up maybe a week before the deadline, after a lot of on and off futzing, and a few years' failed entry.
So I'm grateful to my testers for helping me cut down a lot of extraneous stuff (enough I won't detail here) and for their positive contributions as well. One bug that slipped through was a special case I could/should have checked for. I'll describe it later. Doing so now immediately after seems like a backhanded compliment to my testers.

It was nice to be on the other side of the criticism, which was civil and helpful. And a note: there was more than enough, but I think IntroComp is a fantastic tune-up for IFComp judging: less pressure, no dreams destroyed, less of a big deal if you're wrong, and because your complaints are anonymous, that can help. Even if it's not a major one, it helps the writer. So I really hope to contribute feedback at the very least next year, and hopefully reviews to push Introcomp as much as I can. Being on both sides of the competition has been very positive for me, for relatively less investment than IFComp. Maybe it can work for you, too.

As for the game: Grubbyville is almost based on a real story. I remember the Valedictorian Wars at my high school. Two years ahead, someone got a B+ in Health, costing them the #1 spot. One year ahead, someone got a B+ in Food for You (no! Really! They apparently smart mouthed the teacher. On a more serious note, they were icky and manipulative to the new #1, and when someone reminds me of #2 that is a huge red flag) costing _them_ the #1 spot.

Friday, June 3, 2016

More on Zarf's testing scripts: automating yes-no, and debugging

One problem with Zarf's scripts is that they hit a loop if there's a pause without a > for a cursor. This isn't unique to them. The IDE can trip up, too. Or maybe you just don't want to remember when to say yes or no.

This is the sort of Inform 6 dabbling that I think helps you understand what's going on without getting overwhelmed. Below is code cut from the Trivial Niceties extension I use for testing.

volume yes-no substitutes

[this lets the programmer skip over yes/no decides]

debug-state is a truth state that varies.

to decide whether the player yes-consents:
    (- YesOrNoExt(1) -).

to decide whether the player no-consents:
    (- YesOrNoExt(0) -).
   
[ YesOrNoExt yn;
    if ( (+ debug-state +) == 1)
    {
        return yn;
    }
    return YesOrNo();
];

-)
Let's go over what this does. First, YesOrNo() is the standard Inform function for getting a yes or no from the player and moving on. If you want to see its details, it's in Parser.i6t in the reserved folder. It's worth a look to see that it's not terribly intimidating.

YesOrNo is pretty straightforward, and you can change the 'Please answer yes or no' message if you want. In fact, I did so in Threediopolis. You can search for EdBlab here in its source, though I may not detail it here. You can also see how to insert Inform 6 source into Inform 7 code. Not that I did a brilliant job of it, but yeah. It's not THAT esoteric if you want to change the default message or cut the player off after X tries.

So what do yes-consent and no-consent mean? Well, yes-consents goes to YesOrNoExt with a parameter of 1. If debug-state is on, it returns 1. If it isn't, it returns YesOrNo--which is 1 for yes and 0 for no.

I also defined a function called switch-consents which means the user can set a flag to decide whether or not to make yes or no the default. And I suppose the yes-no automation variable could be separated from debug-state.

Because I've actually defined debug-state earlier in the extension, and it's useful for other things, such as

to d (x - text):
    if debug-state is true:
        say "DEBUG: [x][line break]";

This is handy for, well, printing debug values when something doesn't quite work, or just making sure you have the right row in a table when the text is constantly changeing. It also is a great way to be sure that the end-player won't see these commands. After a while, typing d has become second nature for me when I've wanted to include diagnostic stuff. As long as we have this sort of section:

chapter debug setting - not for release

when play begins:
    now debug-state is true;

dbting is an action out of world.

understand the command "dbt" as something new.

understand "dbt" as dbting.

carry out dbting:
    now debug-state is whether or not debug-state is false;
    say "Now debug-state is [debug-state].";
    the rule succeeds;
We're okay. The point is that, well, the programmer can toggle debug-state, but the user never can.

This is only the surface of debugging, but I think it's a good start, and it helped me worry less about "what if it slips into the game text" or other issues. I've had it so long I've almost forgotten about it, but...a little I6 can go a long way, so it's good not to be scared, and to explore (if you haven't already) the Standard Rules.i7x file or even the Parser.i6t file.

I felt pretty clever making my first I6 edit to make Inform do what I wanted, and once you have a bit more you want to do, you will, too. Just remember to use the "include" syntax instead of editing the core files.

This can similarly be applied to skipping over narrative breaks, which I did so that the "test" commands wouldn't freeze. Emily Short's Basic Screen Effects needs to be included, but once you do, you can replace wait for any key with wait-key-d, or something even shorter, if you want.

include Basic Screen Effects by Emily Short

volume regression test - not for release

when play begins:
    now debug-state is true;

volume regression test stubs

debug-state is a truth state that varies.

to say wait-key:
    if debug-state is false:
        wait for any key;

to wait-key-d:
    if debug-state is false:
        wait for any key;

 

Wednesday, June 1, 2016

Applying Zarf's automated testing scripts for Inform

Zarf's script is something I wish I'd tried much earlier. It had the added bonus of helping me learn python. As wonderful as the Inform IDE's "test" command is, it has limitations:

* no undo, which is sort of a problem if you get killed
* only one test run, with restarts being awkward
* can't check the content


I've been tinkering with this in my own games, but I think I've found a sub-script that's flexible enough to share with others. Eventually I'd like to do a whole post on using Zarf's framework from Windows, but for now, here's an idea of how to get things rolling if you have the framework up.

It's one of my favorite axes to grind, fixing the "You can't go that way" generic command. It's always meant restriction more than exploration to me, and changing it helps me develop my world, and I look for it in games I test. So here is my Python script:


https://github.com/andrewschultz/miscellany/blob/master/python/noway.py

This needs a text file in the same directory, labeled reg-noway.txt, to start. I ran this test on The Problems Compound, which had a test file at https://github.com/andrewschultz/the-problems-compound/blob/master/testing/reg-pc-noway.txt converted from https://github.com/andrewschultz/the-problems-compound/blob/master/testing/roomlist.txt.

You can see the general syntax--just list the name of the rooms, and adjust the binary names accordingly. Obviously, this can be more flexible as I build the script, but the main thing is that it will take a text file full of rooms and spit out a bunch of tests. I like this because insta-death movements are neutralized, and the "undo" means you can try a different direction right away.

I also disabled diagonal directions in some games, which means a lot fewer tests need to be run.


But this only does so much. You want a working walkthrough, with the right clues. So I spruced up https://github.com/andrewschultz/the-problems-compound/blob/master/testing/reg-pc-thru.txt and just made sure everything worked okay...and it turned out I had a few typos to look through.

Thus my fears of just doing-over work I already did, and not really getting anything, were misplaced. I even tuned up some double-text I should've seen before. I think just the process of sitting down and creating the test cases switches the focus from "I should've tested this, I think" to "I'm going to make sure I tested this." And if I cheated with some GOTO commands, well, I was able to cover the major walkthrough and check off on more than just "you won."

It's already helped me fix a few trivial annoying bugs, because I could just slip in a test and say "OK, does this work? I'd hate for this to break." And so I've gotten a lot of mileage. And I suspect it'll help you, too, but I'll write more later.

Still, the short take-away is: do it on a game you want to re-release. Or a WIP. It provides a lot of security that stuff you fixed will stay fixed. Or you'll know when it broke.

Three chances to sac my queen in chess

I ran across an old chess game from the past. If the ghost of Mitch Hedberg were around, he would say <a href = "https://en.wikiquote.org/wiki/Mitch_Hedberg">every old chess game I played was from the past. (I used to like that joke. I still like it, but I used to like it, too.)</a>

Anyway. It wasn't a very good game, but it was much more instructive than if I'd done what I was supposed to and won it quickly. Let's look at the start.

1. e4 e5 2. Nf3 d6 3. Bc4 a6 4. d3 (d4 is a good idea, but...I still just sort of got all my pieces out and didn't try anything crazy) h6 5. Nc3 b5 6. Bb3 Bg4


Black hasn't bothered to get his knights out. Now, I remembered Legal's Mate, but I also remembered that if you did it wrong, you just went down a piece and were kind of in big trouble and your coach and teammates probably thought,  gee, what the heck were you doing? (Note: this sort of thing can get in your way with general creativity. There are things to check off on. But it's a legitimate fear, and one that needs to be dealt with.)



The right move, here, is 7. Nxe5! because of Bxd1 Bxf7+ Ke7 Nxd5#. And it's a weird thing, here. Every chess player dreams of sacrificing a queen for a quick win. But I remember talking myself out of it: well, it's not an ORIGINAL sacrifice. Well, I'll feel dumb if I get it wrong. And I don't know when it happened, but at some point, I stopped trying for cool stuff and started grinding out wins. I was still a pretty aggressive player at this point, but...well, not this game.

7. h3 7... Bxf3 8. Qxf3 Qf6 9. Qxf6? Now I still had a big advantage, and Qe2 or Qg3 keeps queens on the board and also still threatens the annoying Nd5. So I am letting him off the hook and letting him get his knight in the game. Even an immediate Nd5 is rather good, but I don't know--I think I was learning about endgames and so tried to steer the game that way.

9... Nxf6 10. Nd5 Nxd5 11. Bxd5 c6 12. Bb3 a5 13. c3 Na6 14. f4 (this is rather good, giving the rook an open file) b4 15. fxe5 dxe5 16. Be3 bxc3 17. bxc3 Rd8 18. O-O-O Ba3+ 19. Kc2 Bc5 20. Bxc5 (this is where d4 really should have been obvious) Nxc5 21. Rhf1 Nxb3 22. axb3 and I felt I could gang up on the a-pawn and win and I did but it took way longer than I should have. The main moves aren't important here--it's that I'm trading down and not giving a weaker opponent a chance to mess up. As if I was running from the position with lots of pieces where I didn't want to face my chicken-ness.

Now I learned a lot from this game, with the endgame small advantages etc. And overall, it was favorable, though being exhausted may've cost me in the next two rounds. I got a bad position in round 2 then lost a tricky (but again instructional) game in round 3. So, yeah, I remember missing my chance. I remember fearing my (kind of sarcastic) chess coach saying "Mi-i-i-ster Schu-u-u-ltz! What took so long?" and also fearing him asking about why I didn't play Nxe5. The thing was...it's something I wished I'd nailed down. But I sort of let my fears trap me. And I didn't really do much after that.

And so I remember this when I think about missing chances or not going with what I know or intimidating myself into going for the safe route without checking off. But the story doesn't end sadly.

I eventually did get my queen sacrifice later. It was actually a sham sacrifice--in other words, I got the material back quickly. But then a month later I had a chance for the real thing, and I took it, and it was glorious. It was a positional sacrifice! The guy next to me said he was glad I had the guts to play it! The end of the game was ridiculous--I pitched a bishop in a winning position, then my opponent pitched a rook. But--I got my queen sacrifice, and it was my own. Let's not worry about the opening play too much.

1. c4 b6 2. Nf3 Bb7 3. g3 Bxf3 4. exf3 c5 5. d4 Nc6 6. d5 Nd4 7. Bg2 Rc8 8. O-O g6 9. Nd2 Nh6 10. Nb3 Nhf5 11. Nxd4 cxd4 12. Bg5 Bg7 g4 Nd6 13. Qxd4 Rg8 14. Bf4 Bg7 15. Be5 Rxc4 16. Bxg7!? Rxd4 17. Bxd4 f5 18. Rfe1 Qa8 (he really should've played Kf7 etc. It looks ugly but it starts to untangle. King safety first, and ...b5 can develop the queen) 19. Bf6 Nc8 20. d6 e6 21. Be5 21... Qd5?! (...b5 and Nb6) 22. f4 and I'm having all the fun.

The sham sacrifice is below. In this game I went up a pawn then my opponent won an exchange for a pawn, but I had two passed queenside pawns, so I won material back.



I remember this when I talk myself out of something good, or if I think I might be about to. It's a good way to check off. You never know when good fortune is going to happen--but it occurs to me I never gave myself a chance to make another queen sac. I just didn't play aggressively enough. Well, there was 1. e4 c5 2. c3 d6 3. d4 cxd4 4. cxd4 Nf6 5. Nc3 Nc6 6. Nf3 Bg4?! 7. e5 Ne5 8. Nxe5! but that doesn't really count (Bb5+ gets it back.) Still, you take what you can. The only reason I'd return to tournament chess is to get one more queen sac. That'd mean playing aggressively, with confidence, and so forth, and not second guessing, but having fun calculating to make sure of things.

Sunday, May 29, 2016

A 15-year-old question

Yesterday I asked a question on stackexchange's mathematics subsite. It was about a problem I thought up 15 years ago, and I got the basic stuff done, and I got stuck along the way. I wouldn't have remembered it if I hadn't just signed into one site and poked around.

I wondered when you could make a big n-sided equilateral triangle of pennies together from groups of 3 pennies. I suspected the answer was 12x+(0,2,9,11) and proved it worked for them but couldn't find a parity argument for 3/5/6/8. Maybe if x was large enough, there was something.

It was fun to mess with and I even wrote a brute force script to try things out. But I put the problem aside after a few unsuccesssful googles (I got the puzzle where you have 10 pennies and need to flip the triangle moving 3, and so forth) I figured why not.

And got an answer in an hour. Not only an answer, but one that pointed me to John Conway's work. I'd read about him and how important he was, etc., but my eyes glossed over. Here, though, there was a paper based on his work that solved a neat problem I'd wondered about.

I haven't processed it totally. But it's nice to know my intuition was right even if my technique never stood a chance. The basic idea is, you can build the triangle with 3-rows of pennies or triangles of pennies. If you build it with an odd number of 3-rows one way, that is the only way to build it, and you can't build it from triangles. But with an even number, you can. I'd had that idea but had no way to prove it because standard tilings like the checkerboard problem fell short.


There's a small moral here about asking questions and not waiting too long. I can box myself in with the "I should know this" and I've even become more comfortable asking those I should've known. Because in some ways it's not me asking the question but someone trollish from years ago. And once I asked the question I thought, boy I'll feel silly if someone responds quickly, because time wasted, and boy I'll feel silly if nobody responds.

So, on to the next question I've had for a while. Or maybe even one(s) I've forgotten.

Wednesday, May 11, 2016

Fourdiopolis/Spring Thing 2016 postmortem

This postmortem has spoilers for Fourdiopolis and Threediopolis. The TLDR is, I had an idea and waited on it a bit too long, but thanks to Spring Thing's forgiving format and rules, I pushed through with something I'm pleased to have finished, and I wasn't much worried about reviews, posterity, etc. But I'll have to do better preparation to enter IFComp.

Hanon Ondricek pushed me into it at first. His fake review of Onediopolis (we had a nice long thread for fake reviews) in the 2013 IFComp authors' forum got me laughing that it wouldn't be much of a game, and
neither would Twodiopolis.

Fourdiopolis, though? No! It'd be too tough to choose directions! It occurred to me that there were 20 choose 4, or (20*19*18*17)/(4*3*2*1) possibilities. 4845 in total. And teleports, well, they just SCREAM future, so they're perfect for a sequel.

I'm going to go with the technical stuff, first. If you want to skip it, search for the equals sign.

@unusedLetters = ('a', 'b', 'c', 'f', 'g', 'h', 'i', 'j', etc);

for $a (@unusedLetters) (etc)
{
grep -i "nsewud$a$b$c$d" files.txt | grep -i "[$a$b$c$d]" > "$a$b$c$d.txt"
}

Where files contains first names, last names and words.

I suppose I could have run a script to track all of them, and see which would've given enough words without giving too many, but I figured I could cut down on them by looking for obvious opposites. Kata and Ana fit the bill, as did From and To. Which way would From be, and which way would To be? And what would their displacements be? And how would they fit on a 10x10x10 cube? Some neat locations were sure to go out of bounds if the teleporters led anywhere interesting! And if they didn't, how were they different from walking?

These obstacles were too big to overcome, so I put the idea aside. But maybe something was there.

Then it hit me. I could make the city bigger in the name of progress and global overpopulation. That's always a good one! I just needed to know how--and the break came when I realized the locations didn't have to go 0, ..., 9, a, b but I could put 000 at the center. I remember Threediopolis slid by with you starting at 444, which is not the center but it said it was, until Jenni Polodna called me on it. I laughed a bit, because her reviews are good for that, then I fixed it. So it felt good to have a bona fide center.

So I felt having i..a 0 1..9 was also intuitive enough. It made things bigger. But I still had to decide on direction names! One thing I let trap me was that Inform wants directions to be opposite. Down/up, in/out, etc. But they don't have to be. I had an idea for a pinwheel sort of direction-collection, but I was just stuck on four moving directions, and rotating four moving directions through three physical directions didn't work. So stuff like +2x-2z, +2y-2x, +2z-2y was appealing, but I felt I needed another letter.

And so I thought for a first try I might have the four teleport directions be +2 x, +2 y, +2 z, -2 xyz. Or with the signs flipped. This was...symmetrical enough.  The most used letter would be the one that took all three directions. But it still felt a bit artificial. I mean, the game's ideas are, at their base, artificial, but it seemed like a pain to remember which direction was which. And how would you sort out the +2x directon from going east twice? And would the -2xyz be too obvious?

So. Teleports that kick you far enough away that they aren't confused with walking, well, at least until it gets hard. And some sort of symmetry. This was a tough one, but it wasn't until I saw a pyramid that I had a bit of an idea. What if each transport leap was at the edge of a regular pyramid? Where would the center be? I still had the idea +2+2+2 would be a good leap, and suddenly I saw -2-2+2 and the three others--well, every one was the same distance!

So I had my directions. I declared pairs (H/I and J/K) as opposite though they weren't. As for not being able to reverse? Well, pseudo science fiction mumbo jumbo takes care of that. Just--what if two people transporting the opposite way ran into each other? Too much risk. So that was solved.

I had trouble with the directions, though. But then I was reading about, well, something. Maybe it was Galois theory and why there's no quintic formula. But I recalled the Quaternions. And cross products, and so forth, and how IJ=K and JI=-K and so forth. I liked them, and both HIJK and IJKL gave a lot of results. They were equally enough matched that I became the donkey between the two haystacks. Well, not really, once I saw L would get confused with LOOK. Not much to do about I and Inventory, though really, you weren't going to HAVE inventory in the game.

I ported the Threediopolis fake-moving code over (did I mention there's only one room in each game?) made sure SID showed an entry and gave you a point, and then put it away til late March. The thing was, I had a vague idea that 100 things to find would be too much until they got too easy. It'd crowd out your inventory, etc.

===========================

The story took a long time to get going. I liked the idea of more friends--finding people is good first. And the idea of finding things: who wants what? Why? Supplies--what for? I didn't want some rich random guy telling you what to do, so I decided to go with the opposite route. You needed to escape detection. Doing things with technology was traceable. But I didn't want a super-big table that just sprawled, as that'd be a pain to search through, even if alphabetical listings would make it easier to track the next clue the more you had. Maybe smaller tables could organize things. And I just decided on 20, which turned out to be a perfect magic number.

I also might not have had an idea how to wrap things up if I hadn't grepped my last-names.txt file with nsweudhijk. But once I did, it seemed like a nice evil final puzzle, if you liked the rest of the game.

But all this took a while, even with a handy test file of all the possibilities. There was stuff I could've been doing even when I was deciding this. Okay, I wrote a rudimentary script to make sure a word-path didn't go outside the city bounds, Sorry, "hehheh" and "huhhuh," I need another way to make that Beavis & Butt-Head reference!

Just porting Threediopolis code to Fourdiopolis would've been big, though. Writing random stuff or helper functions or game text in. This doesn't seem big, but it has a way of building up, or making me feel at least I didn't forget (insert basic thing here). And if it doesn't feel inspired, it organizes things so I can just drop any inspiration in. And I brain-locked myself by saying, well, I'd better be working on the biggest thing, but it wasn't clear what it was. I didn't just hack ahead to see it--and I should've had faith I could get it done with steady progress. If I'd used my "off-days" to paint the corners, writing in commands or stubs big or small, I wouldn't have been worried about those details while writing the big stuff. This is non-technical stuff, about doing what you want with the time you have, instead of wasting it with something no longer (or never) fun that's just easier to start.

I didn't motivate myself to work on 4dop at the start, and it all piled up at the end once I realized it may be intimidating but I didn't want to leave it for another year. The result was several days of intense programming. And the stuff I was scared about? It wasn't hard to port from 3d to 4d, because I'd already made the big technical mistakes I wouldn't make again. And it would've been simpler to do so back in January, where if I made a mistake, I could just kick the can to tomorrow or next week with no stress. I had experience, but unfortunately, all I remembered was how long it took, when what I could've remembered was that the code worked, and cutting and pasting would get me 95% there.

Fortunately I'd taken time at the athletic club or on the bus to draw out the big picture: get a list of 20 or so different things, roughly related, and slap them together. Remember "x is a table name that varies." Change it with a save-file. This meant Fourdiopolis would have to be glulx, but eh well.

But given my silly procrastination I was grateful for the things that let me create and fix Fourdiopolis. I gave my testers something pretty, well, awful. One of Aaron Reed's "helper elves" managed to give me a mulligan to fix something pretty obviously broken. Then I started checking off what I could've done. With the few extra days, I even wrote up a script to detect clear errors in the logic document, e.g. if a location was wrong. And I wrote the logic document for more than just friends. Working through it, I realized a certain repetitiveness in the puzzle-solving. But I couldn't do much, then.

I also used bitbucket/source control before releasing, but again, I didn't use it enough. It was extremely helpful for in-comp updates, of which I had a lot. The pressure was off. I could offer a hint here or there. Or just take a feature from Threediopolis. I was aware the logic document was...rickety, but that took a back seat to actual bug fixing.

Still I got a nice list of bugs and features tweaked, and Aaron Reed let me roll in the updates, which was nice. I'm glad I took the time to mark my changes individually. I figured stuff like how to give "almost" clues where maybe you didn't realize there was a plural. I figured I'd have to put headers that listed all your tasks off until post-comp.

But...source control, again. Easy to revert if I made errors. I did some basic stuff for an hour or two, and, well, it looked okay! It looked more than okay! It was nowhere near as tough as for Threediopolis, which had modes depending on which scenarion you were in, and all sorts of toggles. With 4dop, all that mattered was the current table. I even snuck in a fix so the game didn't refresh the header *until* you found something new. This was something I'd have liked in 3dop, and it's going in, in the final release for that. Other things followed--cluing what "kinda far" and "far" meant will also go in, and even the logic document checker for 3dop got a rewrite. I found a few bugs.

So writing Fourdiopolis, which I worried would be frivolous, turned out to help me in a lot of ways: nailing down threediopolis features, really using BitBucket, and also being able to get through a project and not let it hang around. I also noticed the code was more compact than for 3dop--200k vs 120k.

And I think having that stressful week--for me and my testers--was the final straw. I set up things like my nightly build system to make sure projects, new and old, built. I even put my logic document checker in it. Any errors go right to an HTML file, so I know what's fixed, and I'm not worried what needs to be. It's already been a big help for my Stale Tales Slate (fixing bad anagrams and punctuation in my random tables, as well as flushing new random anagrams into the source--I'd written these scripts but they were a pain to remember) and Problems Compound (make sure the EXPLAIN verb tracks everything) as well as just generally making sure I've got no backlog of notes. There are a lot of tests to run, but it's nice to know what's messed up--and even to know that some stuff hasn't broken for a while.

So overall 4dop was worth my time, even though I should've spent that time better and earlier, and it was more than just something to get out of the way to clear my brain for a real game. I hope it was worthwhile for those who played it, whether you just browsed and grokked the idea or tried to solve all the scenarios. Given the bugs in the initial version (even after my helper-elf mulligan,) as well as the level of competition in the main entrance, I'm glad I put it in the back garden. But unlike Dirk, my entry last year which was clearly a joke with no real reason to go into a serious competition--even not a very intense one--4dop feels like it holds up and is a bit more lasting. If I'd prepared it better, I could've put it in the main event.

I feel like I can move sooner than from my other projects. Part of that's due to Fourdiopolis not having a lot of story nuances, and whatever technical nuances it has, I covered in 3dop. Of course, one more run through the logic document. Maybe add some more scenery, too--there's a text file with a few stragglers. But I feel like, once I got started, I knocked things down quickly enough. And writing 4dop wound up being more fun than the things I used to procrastinate it. That's a lesson, there, one I want to apply to my next work.

AutoIt: building in the Inform IDE automatically on Windows

You don't have to know much about AutoIt to do this, but I've found this helpful. You can just create a script like the following in notepad. I called the file ide.au3.

Local $project = "Compound";

if $CmdLine[0] > 0 Then
  $project = $CmdLine[1];
  if $CmdLine[1] == "pc" Then
    $project = "Compound";
  Endif
  if $CmdLine[1] == "3d" Then
    $project = "threediopolis";
  Endif
  if $CmdLine[1] == "4d" Then
    $project = "fourdiopolis";
  Endif
Endif

run("C:\\Program Files (x86)\\Inform 7\\Inform7.exe");

WinWaitActive("Welcome to Inform 7");

Send("!O");

WinWaitActive("Open a project");

Send("c:\games\inform\" & $project & ".inform!O");

WinWaitActive($project & ".inform - Inform");

Send("{F5}");
This will open up a project and compile it. You may want to change the c:\games\inform directory, or the project name, but I hope the code makes intuitive sense. The CmdLine stuff basically says I could try ide.au3 threediopolis or ide.au3 fourdiopolis or, better yet, theshortcut ide.au3 3d, if I wanted. Awkward code, but I'm too lazy to read if hashes are a Thing in AutoIt, and what I have works.

It's handy for me as it'd be nice to be the first thing to see in the morning, so I do that instead of silly internet browsing. Or if you edit outside the IDE (I use notepad++), pushing the button here can work.

You can obviously tweak this to check for if a window is already open, but this basic script says: build every night, and have the IDE open when you get started.

A script like this may not be profound in itself, but it certainly starts things right. Now I've done it, I feel like I should have a few years ago. These things seem like they only save a few seconds, but when they're more convenient than accessing a time wasting website, they can save a lot more time.

(Note: this was updated for ide.au3 to allow a command line argument as well as shortcut text)

Friday, April 15, 2016

Nightly builds and Inform 7: release builds

This probably applies more to Inform 7 than anything else, but I like the idea of having a nightly build with tests that report success or failure. This came about as a result of me finally wanting to nail down a few things in some old projects. But I know a big trouble fellow writers have had is...they build a debug version of their story okay for months, then ... the release version throws a bug! Usually it's pretty easy to fix, but it's still a bit of panic on September 20th or so.

Now it started as just checking stuff not related to compiling.



# my source code had no [??] annotations -- shorthand for something I should get around to understanding
# test chapters/volumes were minimally annotated e.g.
volume x
book skip
[* this tests ways to skip to certain puzzles. Usage is SKIP NUMBER]
# for the -opolis, making sure the walkthroughs I wrote correspond to the entries in the tables of things to find. This only tests that what we've found so far is accurate.
# for the Stale Tales Slate, checking the viability of certain random entries and also checking for duplicate entries, as well as sorting the tables in alphabetical order etc.
## verifying that the random text is capitalized properly

This is all stuff I ran by hand but it piled up. Finally I put it all into a nightly build and--well, there were a lot of errors! But they were finally organized and helped me see other details. And I knocked things off quickly.

For instance,the capitalization I was able to break down into ALL CAPS, Title Case, Sentence case, lower case needed, and any case being okay. Maybe you have other tests you can run. Apparently linux lets you run tests on a blorb from the command line somehow & that would be the next part of my nightly builds, to make sure nothing breaks.

So, the moral? It may feel silly making a nightly build to track your projects that are "just games" but it helped me take care of a bunch of details I'd let sit for a long time.

Now, how to do this? For those with Windows you can have your Task Scheduler send output to a log file, or even reparse it to an HTML file, every day. Then you can see if release or debug builds work okay. (I don't use the IDE for when I'm writing narrative stuff. I just check what's changed with Git and then test that all in one bunch.)

You'll have to change the name of the project, obviously. And if you are using zcode, you'll want to see the different flags in the "progress" tab of "errors." The below compiles for glulx.


Tuesday, April 12, 2016

A year of Github

So I made my first commit to GitHub a year ago. It wasn't much, but the daily streak eventually helped me to REALLY get going.

Since then, I've

* made documentation and code changes to Trizbort
* made repositories for my 2012-2015 IFComp games
* also merged in my 2013 Spring Thing game with 2012
* created a miscellaneous files archive for all kinds of things
* copied over some of my old RPG map creation files
* made 1000+ changes
* started an almost 5 month + daily streak

This is a lot, and I can't call myself a GIT wizard. I just know the basic commands. In fact, I have a cheat sheet for some of them below the cut.

So why am I posting this to planet-if?

Because many people I know have questions. They wonder how to get started. They think it'll be impossible.

But I think the way to start is to say, okay, I want some sort of backup so my files don't get lost. I'll push story.ni to it. I don't care about anything else. Maybe I'll report an issue. And then build from there. That's how I did it. Just pushing trivial changes, maybe even starting with something silly like an EctoComp entry where I needed to clear up typos.

The drawback is that I've neglected bitbucket, which doesn't have that small nudge. But I've done well with modifying my current Spring Thing game as well as my possible IFComp 2016 game.

My cheat-sheet is below. I'm not worried about too much else. Clone, commit and push are all you need to know. I even forget the difference between clone and fetch--but the nice thing is, you can't ruin too much. So go ahead. Make a blank project. Poke around. Start with small changes. You might be happy and impressed what you've come up with.


Wednesday, April 6, 2016

Spring Thing 2016! Go! Play! Enjoy! Judge!

It's good to see so many works in Spring Thing this year. I barely scraped by, and I'm grateful that Aaron allowed a bit of post-April 1 tweaking to shake out an embarrassing bug or two as well as (I hope) latitude for a post like this. (If not, I'll delete this.) Thanks to my testers for putting up with something that must've been frustrating.

I won't say much about my game, but chatter on Euphoria seems to indicate that some authors really love other authors' works. The IFDB already has game info and a few reviews.

So, this was meant to be a post-comp release post-mortem of Problems Compound, but that'll wait. Especially since I found a bug--and then, how I should've tested for it.

I'd like to post reviews post-Spring Thing of works I got to, but I don't feel comfortable doing so now, although Aaron Reed wants to be lenient about author commentary. Go play the games, and don't worry about (not) playing mine. I'm glad it's out of the way, and I think it's easier than Ugly Oafs.

I plan to submit a post-comp release of my game along with Threediopolis.

Wednesday, March 30, 2016

Problems Compound Release 2 is out!

I had some great testing during the comp and after, and now that I've been able to fix the big bugs, I think I have a good, stable release.


Thanks to Neil Butters, Wade Clarke, Joey Jones and Juhana Leinonen for testing new features and old bugs. I know my games are tough to test, and everyone found and worked through a game-killer.

I had a lot of organization to do, but thanks to GitHub, I fumbled a lot less than previous releases, and I got a lot more done! I even got a test environment working which may pay off down the road. So I'm very happy.  I'll have more ideas in a more detailed write-up.

An example of how it helped is here. If you want, you can view the previous commit, but you may notice one change I was able to make quickly because I was able to review the source code. Okay, I could've reviewed it before committing, but I was able to notice pretty quickly that

  1. "SHORT" didn't toggle short descriptions at all
  2. "WHO" had the wrong test case
  3. I forgot to tell the player they could THINK
It was originally a small fix to see if it was easier for the player to see who they were talking with, and I wound up being able to look at the previous commit and fix some obvious things so testers or players might not run into it. And that's a big help--of course, you want to be careful, but you don't want to be bogged down.

There are minor issues--I wanted to get something out before month's end after JMac's post-- but Jacqueline Ashwell at ClubFloyd has been kind enough to let me send them an updated version beyond this one, with a few more fixes. I'm also not sure the end puzzles are user-friendly enough...but they're a lot better than they were.

Now on to release 3. There are still some issues but they're not game breakers. They're more looking at Inform stuff I never did before.

Wednesday, December 2, 2015

Heezy Park (EctoComp 2015) reflection

Heezy Park (EctoComp) retrospective


First of all--a break to say thanks to all the visitors who helped me reach 10000 hits! Woo! It's a neat milestone.

Spoilers abound. The game shouldn't take too long to play, and you just need to guess a verb at the end, so...hopefully it'll only take 5 minutes if you're interested.

The short version: Even before the nice placing (3rd of 9, best numerically and percentile-wise) I'm happy with it. I'm happy others seemed to be happy with it. I put a lot into it, but it never felt too heavy. And reflecting on it, the idea didn't just pop into my brain. I bet the deadline helped, but I had a few things floating around.

It was a matter of saying, what if I could do X or Y simply? And a few things came together. So maybe this will help other people make things click, whether it's for the IF New Year's thing, EctoComp next year, or maybe even someone will have a string of short games tied in a packet for the Spring Thing Backyard. Or if it provides a theme for an IFComp 2016 game.

Tuesday, November 24, 2015

The Problems Compound postmortem, part 3: what was it about?

I really didn't give myself time to flesh out that I wanted it to be more of a puzzle game, so I'll share my ideas here. First of all, I'm grateful for Paul Lee's review which saw things I hadn't considered, and I also appreciate the kind comments of several authors in the authors' forum. I also think Doug Orleans found a theme in that I dislike internet arguments and people trying too hard to start and win them, or running up the score after they've won them. It's hard to get the last word in at them(ha ha,) but I've managed to achieve distance. And humor is the most effective way to do that. But it has to be smart humor.

The Problems Compound was intended to be a story about dealing with, well, pride and nastiness and jerks in general. Particularly overbearing, overwhelming jerks and even personality cults and the people who ascribe to "lead" them. It was also about my own introversion and lack of confidence..

This was difficult because many things people do to gain a cult of personality are similar to what people do to be nice, and being unable to differentiate the two causes a lot of cynicism. I've been there.

I tried to put myself back to high school, and I tried to avoid mapping each antagonist to any particular person I knew or have recently known--which probably accounts for a lot of vagueness. I wanted to make sure that I wasn't pinning anyone specific to the wall. And at the same time, I wanted to be able to laugh at them. I think it's important to be able to laugh at the prideful--though there's a danger you can become too proud of your ability to do so.

Unfortunately, this didn't quite work, by and large. Someone in the author forum said they were able to map each character to a member of RAIF, which was interesting, but I didn't really get involved until well after it had died. Still, I was generally disturbed that that is how things were. I certainly wanted people to say "I knew a jerk like that and I can laugh at him."

The reversal-names worked on two themes: one, how do we twist things around? And two, some of the names were complete lies, so how do we deal with that? I also thought they were just funny, but they were a bit scarce. Scarce enough that I dropped the project in March. The thing was, I wasn't looking hard enough, and even with idioms.thefreedictionary.com, I didn't really get going until I forced things and tried things wrong and buckled myself in and said, this word HAS to go somewhere. I was concern trolling myself a bit, fighting against the Baiter Master myself. Saying, why bother, etc. Instead of just sitting down and trying to make things right. Which is what Alec does in the game. And I think that's important--to do so despite all the nastiness and bravado and people seeming to know more than you do.

I didn't really implement the idea of the Baiter Master as a mysterious figure until late, where even people who dislike him have to admit he's got power, or charisma, or whatever, but I've found that a lot of people can garner this sort of support, where people lose focus and say their excitingness is more important and bolder than someone saying, they're going too far. Maybe it is, to use a modern example, Donald Trump. Maybe it is someone pointing out what a jerk Donald Trump is before lashing out at someone else. They have social currency. They know how to use it. And I know that I always felt frustrated, for all my logical abilities, that this sort of thing was wrong, and I needed to fight back, and I couldn't.

Worse, there's the fear and paralysis of being stuck in the middle of a "friendly" argument and feeling others are looking down at you. Being bad cop/good copped. Examples include the Stool Toad and Punch Sucker both condescending to you, Uncle Dutch and Turk Young giving life advice, and Art Fine and Harmonic Phil giving advice on art.

The puzzles dropped out from necessity and saying "oh, this works," or "oh, I need this" and I just felt they had the right bit of nonsense. I was pleased when I finally figured out who or what could guard the Compound itself--three brothers--and I'm happy with how the Baiter Master put them in (what he thought was) their place and how I released them from that.

I'll give a drive by of all the characters and my intents.
--Guy Sweet: a "nice guy" with an edge willing to "help" people kiss up to. He's superficially nice to Alec, giving Alec logic games he (Guy) is bored of, even giving backhanded compliments. He is "learning" to be "exciting" and is testing it out on people like Alec. Perhaps Alec does need to be more exciting, or he can be. But he doesn't need to be hit in the face.
--the Word Weasel: not really a character, but the sort of person that says "can you just do a little for me?" then asks a lot. I've certainly been out-bargained by people I am smarter than, and it dented my pride, especially when someone came along and say "How'd HE out-bargain you?" That was tough to let go of. But there are different sorts of intelligence. Also the whole process of signing a permission slip of sorts -- well, I wanted to capture that even animals were ahead in the pecking order.
--the mouth mush: a late addition, but I giggled about it, and overall I like the image
--the Howdy Boy
--Fritz the On: I wanted him to capture what I feel is a nasty hypocrisy. I am pro-decriminalization, but the Baiter Master takes that stance and, if you talk to Fritz, still shames Fritz for several things. Which ruins a major point of decriminalization in the first place. "Hey, be grateful to me, I'm not shaming you as bad as the next guy!"
--the Stool Toad: well, I confess, this was the one I felt was most obnoxious. I mean, he's basically a lazy cop, or that annoying adult who complains about kids these days. And of course he is horribly corrupt because he isn't bothering much about the bar! Basically, he only arrests someone if he can show off about it.
--the Punch Sucker: not developed well enough, but he condescends to you and Lily and looks down on the Stool Toad. Yes, there are good bartenders that do listen and care. He's not one of them. Plus, the whole feeling he is above the law thing.
--Liver Lily: this was tough. I'm not good at writing women characters. But I can assure you I've had both men and women tell me I need to be more exciting. I know the difference between that and "hey, I bet you might find this interesting." But she is basically a big talker who doesn't do much. And that's probably a minor sin compared to the other people, but it is one. (Also, what else do people do at bars other than pick each other up? I wanted to also show Alec as inept at this sort of thing)
--the Howdy Boy: this is a tricky one. You need friends who will help you know which rules to break. But he is a bit forcing. I remember people helping me see I could do small rebellious things then saying, well, don't just think small, and they insinuated I should start using drugs etc. and it left a lasting impression on me. We should have fun breaking the rules. But I remember it felt like people trying to score points getting someone else to try things. If you've read Robert Cormier's Tunes for Bears to Dance To, you may recognize this--someone tries to get the main character to do something bad, just to have power over them. Again, I could/should have made this more explicit.

EAST:
--Officer Petty: I think people who point out small faults with a lot of bluster can seem very exciting. But they are not. Or people who say "I just don't like you." The kicker is--you just don't like them for that, and if you're not careful, you actually believe the false equivalence "we just don't like each other." So I figured giving him a ticket to an Advanced Seminar in this sort of thing was funny. I don't think the lessons will stick, and I think he'll be a bad person either way.
--the Business Monkey: mostly for comic relief. I was worried "monkey suit" might be perjorative but a few googles about context and definition relieved me.
--Sly Moore: again, for comic relief. I missed an easy chance in the comp version to say that helping both of them gets all of Idiot Village behind you. That will be post-comp.

WEST:
--the Assassination Character wasn't developed fully. But basically, he taunts you whether or not you solve his puzzle. If you do, you're going for an easy cheat and not trying to learn anything new. If you don't, you're slipping, or you think you're too good for what you're good at. This sort of annoying trapping comes up in a variety of contexts and is incredibly hurtful. I didn't link that with the puzzle--which I was pleased with, because I always wanted to figure my own parity puzzle, and I remember saying, gee, what if going southwest took square-root-of-2 turns? In my puzzle, I've accounted for that fudge factor.
--the Insanity Terminal: I have always loved James Propp's Self-Referential Aptitude Test and wanted to make one for myself. The theme here is--Alec can cheat for a "good" ending. Post-comp, I'd like to factor in how much he cheats into things.
--Faith and Grace Goode: my views on religion are basically, I can't agree with the facts. It can't possibly be right! But I see how it brings people together to do good, and talk about doing well, on a community level. And that is what Faith and Grace try to do. They are a classic cult--suckering people to believing a "falsehood" like religion with decency. And the BM is too slick for that, ho-ho! Now, it's not all that black and white. Humanist discussions do that too. And large-scale churches do preach hate. But I've certainly seen a lot of hate and scorn from people pointing out where the Bible went wrong and saying, you religious types are just plain stupid. The thing is, the BM doesn't provide any of the decency the Goodes do, or I intended them to have. Others snarking on my own religion as a teen just hurt, and it was worse to hear "you don't still believe that, do you?" even after I expressed doubts.
--the Labor Child: George MacDonald had a quote in At the Back of the North Wind that went "When a child like that dies, instead of having a silly book written about him, he should be stuffed like one of those awful big-headed fishes you see in museums." The Labor Child doesn't deserve death. But he has learned to kiss up and be kissed up to early, and he knows how to push people around (including the jerks) and play fake innocent, etc. And he captures fears I had, when I remember people younger than me starting to mansplain life lessons. I debated a violent end at the hands of the reformed jerks, but it was a bit much.

--the Proof Fool and the Logical Psycho: again, the Logical Psycho is an expert arguer. Everything he says has truth. It's just--the truth is weighted in his favor. He doesn't let you interrupt, but all the same, he's a bit upset if you don't interrupt to say OK. The Proof Fool is the sort of person who's a bit too gullible, who takes what others say on faith but lets them zap him with "PROVE IT." Probably the same thing that happens to Alec, but in this case, Alec helps someone else find a way around it, and Alec maybe feels he can.

NORTH:
--Turk Young and Uncle Dutch: useless, self-congratulatory "life advice" that really just aggrandizes the speaker. The big thing is, they're "helping" you and they outnumber you and talk louder. They talk a lot about their success without actually giving a helping hand. I tried to make them look extra foolish at the end when they applaud each other.
--Volatile Sal: How does the old saying go? Meet a jerk in the morning, you met a jerk in the morning. Meet them all day, you are a jerk. Sal has met jerks all day--well, people who he thinks smell bad.
--Buddy Best: I thought of Chekhov's Death of a Government Clerk, here. Basically, you don't even get to finish sentences around him, and while many people in the Compound want someone to hear them babble on, Buddy goes a step further. He's too busy. So he gives you a token gift and kicks you out. Not a very best buddy.
--Pusher Penn: well, I was very pleased with this name. I wanted him to be a foil to the BM to show, well, even people who disagree with the BM and profit by him won't speak out against him. Even those you think are rebelling--well, they have it good. I've seen this a lot. It's hard to say "X is wrong," or whatever. He is also another character to heap contempt on poor Fritz, who deserves our support.
--Art Fine and Harmonic Phil: while Emily Short voiced concern that it was a shot at critics--well, it was. But here's the thing. They just don't shut up about how great the latest and greatest is, even when it's truly heinous. So I compartmentalized them as narcissists with no shortage of random superlatives. (Yes, Trump is more potentially dangerous to society than an Art or Phil could ever be. But Alec is trying to deal with his own issues.) Again, you have the position of being caught in the crossfire between two people who are arguing, but not really, and they need you as an audience, but they're not going to respect you. Art is sure his form of art (pure emotion) is right, and Phil is sure his more logical view is right. They are both heinously wrong. And I have to admit that they were based on past critiques: at one gaming site, one person who was popular but not well-liked wrote an incredibly flowery review of Missile Command. It got praise, and one person who said "Geez, it's just Missile Command" got shot down. The reviewer then switched to dry wit (aka slow and boring if someone else did it) and got praised for his stylistic diversity. This took a while to be funny, but it is, now.
--the Language Machine: it's upset it's in a bog. It writes dreary stuff until you help it. Yes, it is me, in a way. I'm reminded of the four stages of competence. But instead of (un)conscious (un)knowing, replace knowing with happiness and (un)conscious with (not) sharing. This has been my own. Even being able to write a limerick about something or someone distasteful has helped me drop it and move on--and the funnier stuff, well, I'm glad to have written it, and I can move on, too. However, there is a darker side and I see why it upset some reviewers. In a college writing class, I remember being told "well, why don't you like X's work?" He had some stories about not fitting in but the thing was he would get together with friends after class and snipe about other people's work (including mine) and I think that seeped in, as part of the "don't bash anyone I recently knew." I'd like to kill this incident from the game text and redo it more compassionately later. Or maybe hammer it into something positive.
--the Brothers: each has been insulted by the BM into feeling they have nothing better to do than prevent other unworthies from enterting Freak Control. Alec helping them is a way to show he's not just moaning to himself about what he can't do. I know I've been made to feel I'm not good for much other than standing around, and I've created waves when person A called person B (not present) useless. And this doesn't make me a hero, but all the same, it's worth fighting for.
--the Jerks: they're just intended to be everyday teens who have secrets that can be exploited. They are on the fence. The Child and BM both have something on them, but pushed right, they can change their mind. They deny their own individuality until Alec finds them out. However, I think I can make this episode more convincing. I tried to provide alternate puzzles through, where Alec doesn't have to use logic (and shows he is more than that,) but this came too late.
--the Baiter Master: a slimy little you know what. An amalgamation of the worst I've seen in people. Creating him, I was worried when I pulled a specific quote from a specific person, because no specific person deserves to BE him, and I left him a bit generic at the end. I tried to characterize him through others' opinions of him. I think I have a way to make his corruption fuller, but funnier, post-comp. I wanted to leave the player feeling 1) his power was largely illusory and 2) I've seen people like him take over social groups or, even worse, political movements and I want to fight that. There are some ties between him and Spike Price both having contempt for less exciting people, and I meant to make BM seem like he talks a good game and knows what he can get away with. Alec's discussion at the end is a partial catharsis, though post-comp I've realize how to let the BM troll Alec and simultaneously help Alec flip around his "advice" to something positive.

Of course through all this there is Alec, who has the option for a quick out with the cutter cookie. (And, post-comp, another food.) He's more malleable. I wanted to make him a bit of a cipher, but post-comp I would like to relate his past failures he realizes and maybe ways to improve. That would make him a fuller character, but I do want to avoid tooth-grinding autobiography.

Well. That's all for characterization. I hope this clears things up. I read a quote from Gustave Flaubert (I wanted to copy Madame Bovary's unsentimentality) saying you could not use literature to exorcise your demons. I do think writing PC helped me exorcise a few, but it gave me some new issues.

I think they are positive enough to discuss in a sequel. Which I've felt more confident planning.

The Problems Compound postmortem, part 2: testing

I'd like to talk about testing, first, both in general and specific to The Problems Compound.

But first, my previous entry is a hopefully humorous pop quiz, if you followed from planet-if.

From my perspective, it's hard to ask testers. If I've asked them before, there's always the "oh man, I'm asking them for another tricky thing to test" angle, but if I've never asked, I wonder what I'm getting them into. It's--well, it's hard to ask, and this actually hits on themes I didn't develop enough in my game. About finding it hard to ask, or figuring you had or were something pretty smart but no way to develop it.

So I'm grateful for the efforts my testers put in. Especially given the things I wanted to address in the game. So, mentioning everyone in no particular order, I'd like to bring up my work with Juhana Leinonen on BitBucket as something that went really well & which I'll discuss later in a post on organization, as well as September-ish interactions with Brian Rushton and Hugo Labrande, who helped despite preparing games of their own. And Wade Clarke, Marco Innocenti and Matt Weiner came back for more punishment even though they know what testing a game of mine can mean: unimplemented stuff, odd bugs, and things that should connect but don't.

The Problems Compound postmortem, a pop quiz on testing

I'll start with a true/false test. It's a bit rigged, but I think you'll see the point.

1. Testing is good for your IFComp entry. T/F
2. Testers can find bugs you can't. T/F
3. Testers can suggest features you didn't see that will make things easier. T/F
4. Testers will try the stuff you maybe didn't have time to, which saves you time and the necessity of backtracking when you really want to focus on one feature. T/F
5. Testers remind you of stuff you forgot to implement. T/F
6. It can be hard to ask testers for their time, but people are generally nice and willing. And even a 20% response rate is very good. T/F
7. It's worth working through the emotional crush of seeing where testers got stuck, because it motivates you to look for other things. T/F
8. Different styles (go fast/go slow, supercritical/super encouraging, knows the programming language/doesn't) of testers turn up different things. Whatever you're writing is hopefully far more interesting than a standardized test, so even a lack of skill can be a huge help. T/F
9. Starting testing earlier is better, because then bugs that were hidden and hard to find are more likely to turn up, and issues you just can't deal with right away may become clearer in a month. T/F
10. You should have minimal programming-tests you run before sending something to testers, so that their time is used the best they can. T/F

 I bet you got 10/10 and would've even if the answers weren't all true. I could go on like this for a bit. But ever question I write out, I've violated in some way.

Sunday, November 15, 2015

The Problems Compound postmortem part 1


First I'd like to offer an apology for the description of the Language Machine. I think a tester tried to talk to it, and I wanted to make it clear that you couldn't, and its being inanimate felt wrong, because it was doing something...so I added that. It's something another round of testing would've fixed. But I did not give my testers the time. I hope people who were annoyed find this explanation acceptable and call it sloppiness instead of malice. I also believe the fix made it into the final edited version. I saw it as a poor computer stuck in a bog, but my text opened up another interpretation for a reviewer in the author forum and a reviewer outside. Here is what I have now.

The Language Machine is scenery in Standard Bog. "The language machine hums along [if wax is in lalaland]cheerfully[else]balefully[end if], its console spewing out [if wax is in lalaland]poetry, which isn't good, but it's not overblown[else]dolorous, leaden, formulated prose about, well, being stuck in a bog[end if] in its bottom half. In the top half is an LCD [if wax is in lalaland]smile[else]frown[end if]."

Friday, September 11, 2015

The 8 Queens Problem Revisited

When I was younger I remember seeing this and hearing how difficult it was. And it certainly is. The basic problem is this: place 8 queens on the chess board so that none attacks the other.

Now you can just place one in each row/column and start shifting them around, or you can make educated guesses. Of course, you can brute-force it with a computer, and you can remember a pattern, or even that there is a symmetrical solution etc--but is there a way to *understand* it?

I think so. In fact, I felt like I cheated when I figured it out. Because I said, what the heck, let's see if this works.

The idea is this: queens in the 2x2 center invalidate the most squares. Then queens in the 4x4 center. So can we get away with placing nothing in the 4x4?

........
........
..XXXX..
..XXXX..
..XXXX..
..XXXX..
........
........

Now if you, like me, did too many logic problems with red, blue and green houses, cats/dogs/hamsters as pets, and so forth, you'll recognize--none of the corner 2x2 squares can work! If so, columns 3-6 would need 1 queen in each. But there would only be 3 rows for the 4 queens. Contradiction.

abcdefgh
XX....XX8
XX....XX7
..XXXX..6
..XXXX..5
..XXXX..4
..XXXX..3
XX....XX2
XX....XX1

Wow! There's not much left to try, especially when we invoke symmetry e.g. we consider c8 to be the same as f8 as we can just flip the board horizontally.

Now, let's note the following squares are equivalent: b/g4/5 or d/e2/7. You can rotate the board 90 degrees or flip it until one becomes any of the other. So let's say none of them are possible.

Then either c7 or f7 must contain a queen. But they're mirror images--so, c7. Now g6 or g3 must contain a queen, but c7 takes out g3. Similarly c7 takes out b6, meaning a queen is at b3. That leaves a queen at f2. This is a big problem. We can't have a queen on row 1. c6 negates c1, f2 negates e1/f1, b3 negates d1.

abcdefgh
XX....XX8
XXq...XX7
..XXXXq.6
..XXXX..5
..XXXX..4
.qXXXX..3
XX....XX2
XX....XX1

Therefore, we must have something on a square like d7.

abcdefgh
XX....XX8
XX.q..XX7
..XXXX..6
..XXXX..5
..XXXX..4
..XXXX..3
XX....XX2
XX....XX1

This means the queen on row 8 is at f8. But now if a queen is on b6, that eliminates a6 and a5. d7 eliminates a4, and f8 eliminates a3. Row a cannot have a queen. since the queen cannot be on b5 (d7) or b4 (f8) it is on b3.

abcdefgh
XX...qXX8
XX.q..XX7
..XXXX..6
..XXXX..5
..XXXX..4
.qXXXX..3
XX....XX2
XX....XX1

Note row 2 now has the queen on e2--d7 and f7 take out e2/f2, and b3 takes out c2. That leaves c1 for the queen on row 1.


abcdefgh
XX...qXX8
XX.q..XX7
..XXXX..6
..XXXX..5
..XXXX..4
.qXXXX..3
XX..q.XX2
XXq...XX1


d7 takes out h3, f8 takes out h6, and e2 takes out h5, leaving h4 for the queen. That puts another queen at g6. The remaining queen is at a5.

abcdefgh
XX...qXX8
XX.q..XX7
..XXXXq.6
q.XXXX..5
..XXXX.q4
.qXXXX..3
XX..q.XX2
XXq...XX1

There you go.

An alternative method was to notice that we get close with...

12345678
.......q
.....q..
...q....
.q......
......q.
....q...
..q.....
q.......

Here we try and see if flipping a couple queens will do the trick. There aren't too many possibilities, and I found 8-3(horizontal) and 8-7 worked fine. There are not very many possibilities, as after the first flip, you will see that one of two queens obviously has to be moved. And due to symmetry we can always start by moving one of the upper queens.

So this was an interesting way that trying for a simple cheap way to get through paid off. And if someone ever asks you about this trick, then I hope you can remember either of the ones above. I like the gut-the-center best, as it leaves (at VERY most) 6x12 = 200 possibilities. Why? Column a has 2--5 and 6 being equivalent to 3 and 4, and a5 forces b3 while a6 allows b3/b4 (3 possibilities) with 2 possibilities for g/h. Mirror this for rows 7/8, though c8 is not equivalent to f8 here, and you have at most 72. Well, minus the ones the a/b/g/h diagonals got rid of.

And even then you can remember that the solution mirrors itself over the x axis, which cuts things down totally. Again, symmetry and simplicity.