A DRY Spell

Sunday, March 30th, 2014

After a few weeks off, we made some progress today working on the following goals:

  • Refactor code for the three main classes: Inmate, Guard, and Player
  • Do a bit of storyboarding for the “Week 1″ scenes, now that the composition of the “Intake” scenes are pretty much done
  • Make some headway regarding the overall story structure

I figured this was a better time than ever to try applying (or at least not grossly violating for the nth time) the Don’t Repeat Yourself (“DRY”) principle of programming. I had previously had shamefully inelegant code, like distinct, standalone scripts for the Player class across scenes, simply because in one scene, you can walk left and right, but in another, you can also walk up and down after a delay. Lots of virtual and override getting thrown around, but surely nothing too difficult.

As for storyboarding, Terry came up with a start for how one of the scenes will look, which is pretty vital since the game’s story actually begins to ramp up quite quickly after Intake ends. Here’s a thumbnail.

Ock Week 1 Storyboard

Continue reading…

Bueller… Bueller…

Saturday, March 8th, 2014

The beauty of coroutines is that they’re actually quite intuitive once you get the hang of them. For example, I’ve split up my “Intake 2″ scene into three parts, each with their own coroutine. So part 1 tells the guard to walk by the inmates one by one for roll call. When he gets to the player, and the player does not reply, the part 1 coroutine decides to do this:


And that, in turn, just repeats the player’s given prisoner ID number forever until an acknowledgement is given.

Anyway, not much else to report–moving onto Intake 3, which is an extremely brief transition scene. Have a great weekend!

A Mouse in the House

Saturday, March 1st, 2014

Working on part 2 of the Intake process made me realize that I had to spend a bit more time on the dreaded process of preparing programmer art. The trackpad just wasn’t cutting it, so I had to dig up this $10 wired USB optical mouse that I hadn’t used since college (and even then, I probably used it twice ever). Certainly gets the job done!

Clickety-clack, down the track!

I quickly noticed that using the scroll wheel on the mouse triggered “natural scrolling,” which feels a bit weird. So I went to my Mouse settings in System Preferences and noticed that I could disable natural scrolling. Awesome, right?

Apparently not–Mavericks seems to automatically change my natural scrolling preference in the Trackpad settings as well, for some inexplicable reason. What’s the point of giving me two separate checkboxes if you’re going to propagate the setting across both of them no matter what?

Luckily, there’s a free app called Scroll Reverser which effectively lets you keep natural scrolling on your trackpad, but disables it on your mouse’s scroll wheel. Thank heavens! Be sure to check it out if you have the same issue.

I gotta put it in subtitles or something

Saturday, March 1st, 2014

As a sort of cinematic, story-based game, Ock relies somewhat heavily on dialogue/text. Of course, there won’t be any voice acting, so I’ve elected to display text on the bottom of the screen. It’ll be centered (typically on one line) in the bottom black bar that comes from letterboxing. Yes, it’s a game, the dimensions of which I can set arbitrarily to my desire, but I intentionally wanted to give it that real “widescreen movie” feel. The result is the game area being 960×540, but only about 409 vertical pixels will contain actual content. You’ll be “watching” a 2.35:1 movie on a 16:9 screen.

I understand that subtitles are never supposed to show up on the black bars in a real film, so I’m more inclinded to call them closed captions. Anyway, the tricky part was a half-decent implementation in Unity. When I was using ImpactJS, I had a “subtitle manager” that took two arguments: the text to be displayed, and the duration in seconds. Simple, right? Continue reading…

Tick T-OCK

Wednesday, February 19th, 2014

I’m typing this from my new 15″ MacBook Pro (Apple refurbished, late 2013 Retina version), which came in just a few days ago. In the middle of getting this machine ready to get back on the game dev wagon–see screenshot below of my tentative setup–I’ve decided to revive Ock, which I started way back last summer.

Hooray for Retina!

The decision to visit Ock again and select it as my current project had been on my mind for a while. Late last year, I had come across a Reddit comment about making a roguelike game about breaking out of prison. The idea fascinated me. At the time, I was reading up on procedurally generated levels and browsing the Seven Day Roguelike challenge submissions, so working on such a game seemed to be the right idea. Continue reading…