Saturday, March 28, 2015

Implementing real-world real-time stamina / energy cooldown timers in Unity C#

In Hurt Me Plenty, I implemented "real-world" cooldown timers, which persist even if the player restarts the program. The cooldown period elapses in "real world" time, not in game time.

This resembles stamina delays in many popular free-to-play games, but it also connects with the design tradition of using real world system clocks to dictate game logic -- maybe certain Pokemon emerge at real world night, or you witness events that correspond with real world holidays, or perhaps you can even kill a boss NPC by setting your console's system clock forward by a week.

Much like the implementations referenced above, mine is quite weak and vulnerable to circumvention and cheating: I simply save a system timestamp in the game's PlayerPrefs, and then check that saved timestamp upon loading the game. If the difference between the current system time and the saved timestamp is less than zero, then the time has fully elapsed and the game continues.

Monday, March 23, 2015

Level With Me, vol. 1 re-release (v1.1)

I have updated my old experimental Portal 2 mod "Level With Me" to work with current versions of Portal 2. This mostly involved repackaging a menu file and rebuilding the sound cache. Assuming you have Portal 2 installed, you can download and play this collaborative interview / playable journalism project at the page.

  • Remember to feel free to stop playing the first chapter at any time.
  • Previous posts / notes are here.
  • Interview subjects were: Dan Pinchbeck (The Chinese Room), Jack Monahan (Stellar Jockeys), Brendon Chung (Blendo Games), Magnar Jenssen (Avalanche Studios / Valve), Davey Wreden (Galactic Cafe), Ed Key (Twisted Tree Games), Richard Perrin (Locked Door Puzzle)
TECHNICAL SOURCE ENGINE NERD NOTES: It was fun trying to figure out how to update everything; Valve updated every Source game to use .VPK v2, except Portal 2, so it was pretty much impossible to find the old VPK.exe compile utility. Luckily, I had a hunch that Alien Swarm hadn't been updated since forever, and I turned out to be correct. (For anyone who googles for this post, you can grab the one from the Alien Swarm SDK, or download the old v1 VPK.exe here. Make sure you place it in a \bin\ folder with a tier0.dll, and then you can just drag-and-drop folders onto it or a shortcut, etc.)

Thursday, March 19, 2015

Lighting theory for 3D games, part 2: a formal approach to light design, and light as depth

Here's how I generally, theoretically, approach lighting in my games and game worlds. Part 2 is about light and function, mostly for level design.

In part 1, I talked about how different light sources have different connotations to the viewer, and these meanings are culturally constructed. In New York City today, an antique Edison bulb connotes trendy bourgeois expense, but 50 years ago it might've been merely eccentric, and 150 years ago it would've been a thrilling phenomenological novelty.

But people rarely intellectualize lighting this way, in, like, your own bedroom. In your daily middle class Western life you don't usually agonize over the existential quandaries of electricity, you just flip the light switch without looking. When in familiar places, we experience light as a resource or tool and take it for granted. So much of our everyday relationship with light concerns its functionality and what it enables us to do.

Monday, March 16, 2015

#altgames is the no-fault divorce that indie games needs

I'm cautious. I've been watching #altgames from a distance. Quite a few years ago, Jim Rossignol said I was supposed to be part of an "alt mod" scene, but by then I was tapering off most of my work as a modder so I'm not sure if such a community ever really materialized anyway. I generally don't like labels with "alt" in them since the alt-ernative can be said to be anything, but I do like what TJ Thomas said at Indiecade East, and I like a lot of games that are "altgames", and I think much of my work shares whatever those altgames sensibilities are... so there's probably some kind of consensus, we just have to keep articulating it?

In my GDC 2015 diary, I confessed I felt disconnected from fellow indies who were concerned with running small businesses and contract negotiations. No one wants a civil war over what "indie" really means, or a witch hunt over who is authentically "indie" or whatever. We all have different relationships with games and that's okay as long as you're not promoting hate speech or something. At the same time, it's ridiculous to pretend that I'm not bored out of my mind during countless GDC conversation(s) lingering on advertising revenues and Indie Fund deals and sales figures, and then people get visibly annoyed with me when I don't say anything and check my phone instead. Where is the way out?

This morning, Zoe Quinn's altgames manifesto at Offworld really crystallized this for me:

#altgames can be the no-fault divorce that we need where we don't blame each other, where we even stay friends with contemporary indie games. We can still have dinner parties and share custody of the kids! However, we also have very different goals and concerns, so let's try not being married anymore, and maybe we'll all be happier for it.


Saturday, March 14, 2015

"Local Level Design" at Different Games 2015, April 3-4 in Brooklyn, New York

"American Corinthian" via
Paolo Pedercini
In about 3 weeks at Different Games 2015 in Brooklyn, I'll be speaking about "local level design", a practice of level design that I setup in opposition to industrial AAA level design methods and procedural level design. Local level design is level design concerned with player community, sustainability, and context; it rejects a top-down formalism that demands game levels exist as territories with strategic affordances orchestrated by an architect, and it sidesteps a technological imperative to engineer and articulate a fixed grammar that a game engine must understand. Instead, local level design is highly conceptual, to the extent that few people actually play these levels at all.

If you'll be around the New York City area in the beginning of April, come hangout at Different Games, and perhaps see me talk! Or if you can't, but still want to support the conference, then know that they do accept donations.

Details and stuff (but no schedule yet) are at their website. See you there maybe!

Monday, March 9, 2015

GDC 2015 dispatches / minutiae

Here are some thoughts I thought during GDC 2015.
  • Virtual reality: I didn't get to try Valve's fancy new thing that requires everyone to clear out a mini-holodeck in their apartment, but I was pleasantly surprised by Google Cardboard. I tried it once before, and disliked it, but I tried it again and now I think it's not bad as a VR solution. I appreciate the transparency and "honesty of materials" -- it is basically a cardboard box that holds a phone to your face, it doesn't try to pretend to be something else, while still delivering on the all-important affordance of VR headset as elaborate blindfold.
  • Phony war: The big technical news of free engine access for Unity 5, Unreal 4, and Source 2 were inflated non-announcements. They've been practically giving away Unity and Unreal for a while now; 90% of Unity feature-set is free, and Unreal only required you to subscribe for a month and then you could cancel it and keep it... and the details and workflow for Source 2 aren't public yet, other than a requirement to offer first look rights to Valve or something? So again I think there's no real story here, other than positioning these engines as the new "big three" versus Unreal, CryEngine, and idTech trinities of yore. 
  • Generations: This year, quite a few NYU students attended GDC for the first time, and I felt some modicum of responsibility. For better or worse, a lot of young people invest GDC week with a lot of emotions, and it's really important that community elders (ugh, am I one of those? let's hope not) are there to help nurture their spirits. Things like the annual Wild Rumpus party or Lost Levels or Richard Lemarchand's GDC Feet tour are about articulating and performing considerate attitudes toward games and play, to imagine this culture as something shared and owned by everyone. A lot of teaching game development is about emotional education -- to deal with people saying difficult things about your work, the ability to absorb success or absorb your disappointment and not let it crush you... so please, I beg you, think of the children!
  • Biz-culture: In contrast to what I just said in the previous bullet, I also sensed an increasingly fractured community. There's a steadily widening gulf between a games space deeply concerned with sales figures and how to negotiate with platform holders, and a games space striving to reject the existing market system and formulate alternatives. We are increasingly talking past each other, so I think a lot of "indie love" politics is about plastering over these divides and avoiding difficult arguments that we probably can't avoid forever. Films like GameLoading are about doing the work of uniting disparate artistic approaches and communities as a movement, but sometimes it smells more like a possibly empty "Radio for Change" gesture, and I wonder when the coalitions will start dissolving and we all realize we actually don't have much in common. But maybe being a family means pretending everything is going to be ok? Let's do it for the kids.