31 Things, Day 18: Lay down

31 things I'd rather be doing right now

I’m two days behind on this 31 day challenge, but there’s a good reason.

Paul Reiser had a stand-up comedy special in 1992 called 3 1/2 Blocks from Home where he went on a tirade of all the things that life bombards you with, and how marketers think they know what we all supposedly want. “You know what we want? We just want to lie down, that’s all!” It was really funny, and I never forgot it. (I’ve searched for it, but I can’t find a YouTube clip of it; you’ll just have to take my word for it, sorry.)

If given the opportunity, I would most certainly rather lay down than move. I’m lazy like that. But lately I’ve been bombarded by a lot of those things that life throws at us, and it seemed much more than usual. So you know what I did this weekend? I lay down.

And it was wonderful. Nothing more to be said.

So that’s another thing I’d rather be doing now, laying down.

31 Things, Day 17: Read more nonfiction

31 things I'd rather be doing right now

Note: Amazon Affiliate links below

Although I prefer fiction over nonfiction, I find it’s good to read a couple nonfiction books every year to keep myself educated about something real. Also, it helps mix things up a bit.

Over the past few years the topics I’ve read about have been varied:

  • A lot of books about writing, so that I can becoming a better writer. The two best so far that I can recommend are Stephen King’s On Writing and Larry Brooks Story Engineering. Both have totally changed my mind about what it means to be a writer, especially in the creation and the architecture of a story.
  • Books about being a better husband and father. After all: happy wife, happy life. Seriously though, I strive to remind myself of how to be a good servant leader of my family, and these kinds of books help me do that. Recommended: His Needs, Her Needs, Bringing up Girls, and Bringing Up Boys
  • Books about understanding myself better (not exactly self-help, but has that flavor). Some notable ones I’ve read lately are Seeing Through Cynicism, and Quiet: The Power of Introverts in a World That Can’t Stop Talking
  • Books that are just interesting based on my own hobbies or career, such as software engineering (Want to learn to program Java in a fun way? Head First Java)

I’d like to read some history books and biographies, but haven’t gotten around to it.

Currently I’m reading a book that is blowing my mind apart (and scaring me quite a bit) that talks about how Artificial Intelligence will be our last invention – and then it will kill us all. That is, unless we make AI very carefully, which this book hopes to convince AI programmers to do. It’s called Our Final Invention: Artificial Intelligence and the End of the Human Era. That’s not ominous at all. But it’s also very interesting.

ourFinalInvention

So that’s another thing I’d rather be doing now, reading more nonfiction.

31 Things, Day 16: LARPing

31 things I'd rather be doing right now

LARP stands for Live Action Role-Playing, where a group of people get together to play a game by acting out characters. They dress up, and really try to be someone else for a little while. It’s like a play, only improvised; it’s like a game with rules, only people are the playing pieces.

So yes, it’s considered incredibly nerdy, but LARPers themselves consider that a badge of honor.

LARPingMotivator

Full disclosure: I’ve never actually participated in a LARP before, nor have I even seen one in real life. And honestly most of me doesn’t want to. It’s a really weird activity that takes playing a game a bit too far, and the people who are regularly involved in it are kind of … intense.

But you know what? I’d be lying if I said I never wanted to try it… because a little part of me wants to. Makes sense, right? I like games, I like acting, I like fantasy worlds. It could be fun. But… I’m 35! You know, an adult! I’m all for imaginative playtime among children, but… adults? Really? Wow.

Yeah, I think I still want to try it.

So that’s another thing I’d rather be doing now someday. Maybe. LARPing.

31 Things, Day 15: Programming

31 things I'd rather be doing right now

There is something very satisfying for me about programming. I’m specifically referring to coding here; it’s part problem-solving, part art. The problem to solve can be small (make this mess of text into a nice table), or big (make a game).  The art part is the design of the code “building blocks” that will work together to make a computer program. The term used among programmers is “elegant code,” and I think it is an apt word. If you can create some code that can be reused for many things, both now and in the future, you just saved a lot of time. You never have to touch it again, because you know it works. I love that.

Take this example from my own game code, which I find to be very elegant, (if I do say so myself). A tile-based game is a grid where objects can move in any direction to a tile next to it. Sometimes an object can’t move for various reasons, maybe it’s blocked by a wall. In any case, a game needs to be able to handle an object moving from one tile to another.

2dgame

 

When I first made my Heroquest game, the code handled moving objects very specific to the game. I would never be able to use the code again, because it was very closely tied to only that game. Later, I discovered I could refactor that code and make it reusable. In order to do that, I had to completely generalize what was happening when an object moved from one tile to another. It doesn’t matter if the game is Heroquest or Monopoly or Sorry!

This is what I came up with:

When a pawn wants to move in a certain direction, follow these steps

  1. Does the pawn meet the prerequisites to be able to move in the first place? If no, do something else because they are not met. Otherwise, continue
  2. Are Diagonal moves allowed? If no, does the pawn want to move diagonally? If yes, do something else because diagonal moves are not allowed. Otherwise, continue
  3. Does the tile the pawn wants to move to exist? If no, do something else because the tile can not be found. Otherwise, continue
  4. Is the tile the pawn wants to move to accessible based on where the pawn is now? If no, do something else because the move is blocked. Otherwise, continue
  5. If you got this far, the move will now happen:
  6. Process/do the physical move itself
  7. Evaluate the ramifications of the move to the pawn, the surrounding area, and/or the whole game itself
  8. Do any post-move processing (clean up, things that always happen at the end of a move, etc)

Now I had a skeleton framework to make some reusable code, and I could use it any game I wanted. Here is the actual code:

public void move(TileOccupier pawn, Compass dir) {
  if (movePrerequisitesMet(pawn))
  {
    if (!(!diagonalMovesAllowed() && dir.ordinal() > 3))
    {
      AbstractTile targetTile = 
        tileMap.getAdjacentTile(pawn.getLocation(), dir);    
      if (targetTile != null)
      {
        movePreProcessing(pawn, pawn.getLocation(), targetTile, dir);
        if (tileMap.isEnterableFromOppositeDirection(targetTile, dir) ||
          ignoreTileBoundaries(pawn, dir))
        {
          processMove(pawn, pawn.getLocation(), targetTile, dir);
          evaluateMove(pawn, pawn.getLocation(), targetTile, dir);
          movePostProcessing(pawn, pawn.getLocation(), targetTile, dir);
        }
        else { processMoveBlocked(); }
      }
      else { processTargetTileNotFound(); }
    }
    else { processNotAllowedDiagonalDirection(); }
  }
  else { processMovePrerequisitesNotMet(); }
}

Not that long at all. And the way it works is that any game I make in the future will be able to use it because it is abstract. I simply have to make some concrete decisions about what happens in the particular game at the various stages of the move. (For example, one game may yell at you when try to move diagonally; another game may do nothing at all.)

For the non-programmer types reading this blog, this post may have been boring. But whenever I look at that code above – something I made all on my own – I think, “wow, that was a really elegant design.”

And then it makes me want to go code something!

So that’s another thing I’d rather be doing now, programming.

31 Things, Day 14: Playing Video Games

31 things I'd rather be doing right now

I love video games. Not all video games, mind you; I have specific types I like. What I love is the interactivity of the art form. Yes, I consider video games an art form. Whether the game designers have created a story for me, or I create the story from playing, the adventure, to me, is as real as reading a book or watching a movie. The creativity of the games’ stories, concepts or graphics appeal to my artistic side, and the execution of the mechanics of the gameplay appeal to my technical/programmer side. What’s not to love?

Still the best game ever.

Still the best game ever.

Once a game has its hooks in me it’s hard to pull away. I know because if I’m not careful they can consume my time and thought. These days as a husband and father, I purposely try to limit my screen time, for the health of all. I’m not always successful. There’s a twinge of selfishness that creeps up now and then, and I choose games over real life. But I’m much better at controlling that aspect of myself today than I was years ago.

The Atari 2600, Nintendo Entertainment System (NES) and Super Nintendo Entertainment System (SNES) were the video game consoles that started it all for me. As a shy and quiet kid who didn’t play sports or go outside that much, video games were my form of adventure, competition, and yes, escape. Later I moved on to PC gaming, and because of its versatility it remains my favorite platform; I circled back to consoles with the Nintendo Gamecube and Nintendo Wii, and even dabbled in iOS games with my Apple iPod Touch, but I still remain a loyal PC gamer.

Was never caught up in the story more than FF2

Was never caught up in the story more than FF2

My favorite types of games are simulation/city-building games (Dwarf Fortress, The Sims, SimCity, Banished), complex strategy war games, (Age of EmpiresCivilization, Europa Universalis), open-ended role-playing games (Elder Scrolls), story-based role-playing games (Final Fantasy, Eschalon), Exploration/Puzzle games (Myst, Portal), Sandbox games (Terraria, Minecraft) and Action-Adventure games (The Legend of Zelda, Rogue Legacy). Those are all mostly single player games for a reason: not a big fan of multiplayer games, usually because I’m not good enough to go against people who play all day.

 

The city of Vivec, Morrowind

The city of Vivec, Morrowind

So many games, so little time, but I enjoy them when I can (key word enjoy, not conquer), but mostly try to keep my head above water so that I don’t miss real life at the same time.

As an artist/writer/gamer/programmer, it should come as no surprise that I want to create my own games. We’ll talk about that tomorrow.

So that’s another thing I’d rather be doing now, playing video games.