Brian Crick

Fun with Symbols

Lately, I’ve been amused by certain similarities in two recent movies, Super 8 and X-Men First Class—and how this relates to what I want to get done with Tinselfly.

Warning: spoilers ahead.

Both Super 8 and X-Men have leads who carry around small, inanimate objects of great personal significance to them. Both movies have wordless scenes in their climaxes where said inanimate objects abruptly take on a life of their own, and the audience is presented with a simple, clear, visual metaphor for the resolution of the leads’ internal struggles.

I love it when movies do this sort of stuff. I wish more movies spoke their own language like this, and get frustrated when I think a movie is missing an opportunity to tell stories through objects. I saw Midnight in Paris recently too, and I thought they could have gone in this direction with a pair of earrings a character possessed, and I was sad they did not.

Of course this is just one specific way of having a movie communicate things visually. The Tree of Life, another new release, is overflowing with visual symbolism, and those visuals did absolutely nothing for me.

So I’m trying to relate this to storytelling in games, this sort of formula. And yeah, you could argue that it can go into visual cliché territory, but storytelling in games isn’t really there yet, and we need formulas that work.

The nice thing here is, this isn’t so much different than the way I’d envision storytelling through game mechanics working. These objects already have mechanics. They’re made of metal; they’re affected by magnetism. This doesn’t matter most of the time for most metal objects you’ll run across, but in one case there was a giant electromagnet being constructed by an alien, and in the other we had a character with superpowers revolving around magnetism. The big difference I’d see for games is that, for this sort of symbolism to work, it has to kind of catch you off guard let you see it as just another thing to plan strategy around.

I don’t have any concrete ideas for translating this to Tinselfly or whatever, but it’s not too far of a stretch to imagine a video game starring X-Men‘s Magneto, and you’re having fun using your toss-metal-around powers when suddenly you find yourself using new powers in an old location for the first time, and previously non-reactive bits of character-significant scenery come to life for the first time…

Jump Down Spin Around

Set some very small, but concrete goals for Tinselfly this weekend, and hit them all, and still took time out to see friends and stuff. Feels good.

[fergcorp_cdt]

Most of what I’ve been working on has been getting all my math to work now that you have the ability to run around and have ‘up’ mean something different for different parts of the spherical world you’re traveling on. Specifically:

  • Made the camera correctly follow your character around the world.
  • Made your character point in the right direction while moving.
  • Made gems spawn in a plane around you, regardless of your position on the world.
  • Abstracted everything away so that things like gem producing and movement have no knowledge of the shape of the world. You could be walking on the surface of a donut, and the code for these sorts of mechanics wouldn’t care. Used some stuff from the design patterns book I’ve been reading there, and I’m glad I had a chance to apply some of these strategies.
  • Made a system to randomly generate mazes of placeholder obstacles all around the world. Re-used my Gemslinger code for that.

I guess there’s not anything cool I’ve learned lately, but I’m getting better at breaking this sort of stuff into manageable parts and working efficiently in Unity.

Keep Your Head Up

Just a quick Tinselfly thought today.

[fergcorp_cdt]

Been working on getting my character to stick to this round world I’ve created, and made some good progress last night.

I was flailing for a while though. When you moved, the character would kind of do cartwheels and eventually settle on the right orientation. It was kind of amusing, but I was all like, omg! I’ll never get quaternions! And I kept changing my math around and reading Wikipedia stuff on quaternions and watching Youtube videos about quaternions, and none of it helped.

But it turns out my understanding of this was fine. The issue was that I was writing a script to make sure the character’s feet were always pointing towards the center of the world, and I had a separate script made a long time ago that was trying to make sure that she was always pointed in the direction she was moving, with her feet pointed down in absolute coordinates. So the scripts were fighting with each other.

So it’s just a reminder of how important it is to know what you know, and know what you don’t. It’s sort of the opposite of the whole if your only tool is a hammer, all your problems will look like nails thing. I convinced myself my problem was a nail, and refused to use any tools on it that weren’t hammers.

I don’t know, mathematically, how quaternions work, but I do know how to use them in Unity. I should have realized that and looked for other sources of my cartwheeling problem sooner.

This week, I’ll work on refining my maze generation and high-level world building system.

It’s a Small World

Before I dive into my Tinselfly update, I just have to say, this was a spectacular weekend. Got to go to a drive-in for the first time in fifteen years, played whirlyball for the first time ever, saw fireworks, got almost 6 miles of walking & jogging in with Marie and hung out with some really cool friends.

* * *

[fergcorp_cdt]

On to the update.

I’ll start with a mistake.

Sometimes, it’s really cool what happens when you’ve coded something wrong. This particular mistake had a lovely Tron-like quality, what with its strangely geometric, sorta-backlit floating Tetris pieces there.

So what I was trying to do was make a sphere. Took all weekend.

Tinselfly is supposed to have different modes: a story mode, which will be only as long as it needs to be to tell the story I want; some multiplayer stuff, and an ‘adventure’ mode, where you can go off on any number of randomly-generated quests that will take a lunchbreak or a couple hours to finish.

So for these adventures, I figured they could all take place on little round planets. It’s much harder to do than a flat map, but Marie and I talked about it a bit and thought the extra effort would be worth it, making it feel more like you’re exploring a vast and interesting universe.

This is going to be tile-based, so first I had to decide how the tiles were going to work. I could go with a square grid, which would make the math easy but result in some really not-square squares here and there, or I could go with a hexagonal grid which would result in a more consistent grid but be harder to implement.

I decided to go with the harder, but better looking solution.

So each world needs to be divided up into a zillion little hexagons, and each hexagon can hold a tree or a rock or some water or whatever.

Much of the work I did this weekend was figuring out where all those hexagons go. Unlike a flat, square grid, you can’t just express everything in simple integer x,y coordinates where the position of each square is just some multiple of x and y.

Thankfully, I had help.

Without going into too much technical detail, what you’re looking at here are some notes I whipped up for starting with an icosahedron, dividing each triangle on the icosahedron into a triangular grid (to be converted into a hexagonal grid later), and figuring out what’s adjacent to what in the finished product. But anyway, the point I’m getting at here is that drawing this in Illustrator and having it visible all the time on my second monitor really sped up my coding. I should do this sort of thing more.

Also, I had some help from Wikipedia, which told me the exact coordinates of all the points on an icosahedron.

So here’s what I’ve got now:

It may not look like much, but what you’re seeing is a smooth shaded sphere made of 18000 triangles that represent around 9000 hexagons. The locations of each triangle were all generated through custom code.

At 9000 hexagons, that’s about half the number of square tiles you get on the original Legend of Zelda outdoor map, which seems like a good baseline to me. It’s adjustable, so the player can have longer or shorter games on bigger or smaller worlds if they want.

I’m sorta surprised the curvature of the world is so distinct. I wasn’t sure if it would be or not. But I kinda like that. Can’t wait to have moons and stars and suns in the background that will rise and set as you move around. I think that could look pretty awesome.

Next, I need to figure out how to get the player and the camera to hug the world here. That’s already making my head hurt. It’s likely going to involve things called Quaternions, which I don’t understand real well.

Countdown to the IGF

Submissions are now open for the 2012 Independent Games Festival. If I want to submit Tinselfly, I need something ready by October 17th…

…so have a nifty automatic timer thingie!

[fergcorp_cdt]

That’s a little over 100 days away, and given how busy work has been and how slow Tinselfly has been lately, that’s really not a lot of time. Still, I like working under concrete external deadlines, and many IGF submissions are far from done. This isn’t a drop-dead release date.

Given the choice between submitting something that’s not quite there yet and waiting another year… I’d rather just submit something and get on with my life. Or, at least, act as if I’m going to submit something sooner rather than later, and make the call when October comes around.

We’ll see.

With any luck, expect more frequent updates here. 🙂

Deer in Headlights

A deer walked into my yard last night.

I’m finding it strangely difficult to express my reaction to that.

* * *

I grew up in Oklahoma. It’s kind of a barren place. We had one tree in our back yard; it was sort of the centerpiece of the yard, all by itself, maybe six feet tall when I left there.

Somehow, I got the impression that it was a terribly fragile thing.

One day, a tree started growing in our front yard. I don’t know how it got there; maybe my parents planted there and I didn’t know it. But I thought this was a rare and wonderful and magical event. Something was sprouting. On its own. In Oklahoma, land of the dust bowls.

* * *

The other day, I had to trim some branches off a tree. It was leaning into my garage.

It pained me to do that. There were severed branches larger than that whole tree in my Oklahoma back yard. But here in Ohio, my yard is filled with trees. They frequently spring up where we don’t want them, and they frequently get cut down.

* * *

There was a lake next to my Oklahoma house. Not a real lake, mind you; there were lots of small, artificial lakes scattered throughout the cities to help with flash flooding.

There were ducks at the lake. I tend to think of ducks as decorations rather than living animals. They just sort of bob up and down, limbless, unless you offer them breadcrumbs.

But every now and then—maybe once a year or so—a great blue heron would visit the lake. And it would just stand there, all statuesque and enigmatic. I never saw it from less than a hundred yards away. I was convinced it was eight feet tall, and probably knew way more about the world than I did. It wasn’t just a random migratory bird. It was a sign. Of what, i don’t know.

* * *

So a deer walks into my yard.

And my first thought is, does it want something from me?

Of course, on any kind of rational level, I know that it hasn’t gone out of its way to visit anybody in particular, but there’s a certain logic to this: the whole concept of there existing wild animals is a little abstract to me. I hardly ever leave city life. But hey, random people I don’t know, or don’t know well, do occasionally walk into my yard. Neighbors retrieve stray dogs, phone company employees squint at power lines and inspectors from the City make sure everything’s up to code from time to time.

So in a wild animals-less universe, if there is a me-sized—not pet-sized, but a me-sized—animal in my yard, it must be there for a reason.

And it would only be polite to ask said animal if there’s anything I can do for it.

Which, of course, I can’t do.

So I find the whole situation kind of puzzling.

Planting Evidence

I won a 100 yard dash once in middle school. Got a shiny ribbon and stuff.

Now that I’ve started running regularly, I often find myself thinking about that.

I tend not to start any kind of new endeavor, whether it’s learning a new skill or improving my existing ones, unless I am absolutely confident I will succeed. I’m trying to get more comfortable taking risks with that sort of thing, but in general, I tend to stall if I’m not absolutely confident in my ability to succeed.

In the absence of real evidence suggesting that I may succeed with something, I frequently resort to making disingenuous arguments to myself, to support my position that I will succeed. The most common is working on nice-looking assets for a project before digging into code or story or whatever, so that I can look at the assets, and imagine that the finished, polished product that uses those assets already exists.

If it already exists, I must have been able to finish it. It’s sort of mental time-travel.

I think the 100 yard dash is another such disingenuous argument, but subtly different. At some indeterminate point in the past, I was singled out for being a successful sprinter. I could do this at one point. I just need to get that back.

The same sort of mental gymnastics apply to many things I do, come to think of it: I need to recapture the creativity I had as a teenager. I need to be the supportive, witty friend I was in college. I was a more daring cook ten years ago. I want my dancer’s body back, and I miss the focus I had when programming for DOS.

In all likelihood, I am a better artist, friend, cook, and programmer than I have ever been. I put a great deal more thought into taking care of my body than I used to. In all likelihood, I am steadily improving. But in terms of convincing myself that improvement is possible, it helps to believe that I am simply regaining skills I once lost. If I had them once, I can have them again, right?

Which is all just to say that it’s time to drop the reminiscing about some sort of youthful golden age and simply accept risks for what they are. Maybe I’ll sign up for a 5k in addition to the Warrior Dash next year. Maybe this training won’t go anywhere. Who knows.

In some ways, that makes it more exciting. More worth doing.

Whee Humbug!

Have a Scrooge for The Itty Bitty Galaxy.

I was going to give him a top hat and scarf and whatnot, but figured having him lying in bed would be more unique to the character. This was done really quickly, like in 20 minutes or so. Yay copying and pasting!

* * *

For this project as a whole, I basically see two options, not that I’m dying to dive back into coding right now.

  • I can rewrite what I’ve got in Unity.
  • I can continue writing in native Java code.

Despite my aversion to ever doing anything in native code again, I’m leaning towards option #2. First of all, it’s free. While the base Unity package is free, the Android libraries are not, and my track record with this sort of stuff is not good enough to justify dropping a few hundred dollars on a product I may never recoup the costs for.

Secondly, I should probably get comfortable with Java. It seems likely that I may need to know that for my current or future jobs.

* * *

I’ve started running regularly! I’ve never done this before, but I sort of hit a tipping point where this seemed worth doing.

  • I want to participate in next year’s Warrior Dash. Like pet projects, I’m much more likely to work on a skill if it’s in the service of some well-defined project. So since the Warrior Dash is like a dozen obstacle coursey activities spread out over three miles of trails, my goal is to be able to run three and a half miles uninterrupted.
  • My progress is measurable. Thanks to my phone and RunKeeper, I can see detailed statistics about every run I do and see if I’m improving. Without some objective way to see how I’m doing, I’d probably just get flustered and quit after a while.
  • I am confident that progress can be made here. I was doing an EA Sports Active routine for a while, and made noticeable progress doing the activities there, which I wasn’t sure would happen within 90-day program they have you do.
  • I am confident that this will improve, not take away from, my ability to write good code for work and keep pet projects moving. Again, my experience with EA Sports Active has shown me that exercise is essential to doing complex problem solving, which again, I did not expect.

So there you have it. Once the winter sets in again and the snow starts to fall, I’m not sure how this will work out. I can go back to indoor EA Sports stuff again of course, but I’m not sure about the running.

I’ll figure that out when it happens I guess.

Just Another WordPress Site

Welcome to my new journal!

Okay, if you’re seeing this on LiveJournal or Facebook, this won’t seem terribly new. But this is being posted to my in-the-process-of-being-overhauled-web-site at www.oogby.com, and cross-posted everywhere else.

And wow, does this site need an overhaul. The old site just wasn’t very easy to edit, and was therefore terribly outdated. So I’m replacing my homegrown, not-quite-functional editing system with WordPress, adding a blog, and I’m going to try to keep up-to-date pages around for all my pet projects.

It’s going to be a bit messy while I’m rearranging everything.

And hopefully, I’ll feel more accountable for everything this way, and if random people I’ve met Google me and find my site, as they seem wont to do, they’ll get something a bit more meaningful than has been here in the past.

At least, that’s the hope. Let’s see how it goes.

Copyright © 2017 Brian Crick.