Tuesday, June 12, 2012

setting up shop

Having my work desk in my bedroom just isn't sitting right with me, so today, I decided to start clearing out some of the things I have laying around in the garage of where I'm living. I set up a fan to keep the temperature at a reasonable level, moved a few things around and made enough space to set up a small work table I haven't been using, and plopped a few piles of books that have been sitting in boxes for months onto it, along with my laptop with a fresh install of Ubuntu 11.10 (Ubuntu 12.04 just rubs me the wrong way), got the wifi going, and started putting some things up on Amazon Marketplace.

A significant portion of the books I've gone through so far either had some redeeming quality about them (being about a geeky subject that I don't know much about helps), or would actually end up costing me more money to sell through Amazon than I could possibly hope to earn. The books in the latter category will probably end up going to Goodwill or a public library. The geeky books might just go back into boxes, because honestly I have enough books in my reading queue as it is to keep me busy for at least a year or two. It may turn out to be the prudent thing to just sell them now to someone who could put them to better use and then, if I need the information down the road, just purchase another copy, possibly a newer edition of them. Some of the books in my collection that I would honestly tell you are completely useless turn out to have pretty decent selling prices (read: > $10) on Amazon Marketplace. I suppose there are other people out there who value them more than I do, and that, I suppose, is a good thing.

The aim of all this, of course, is not merely to make money selling books. The money from this is really secondary. It's really more about clearing out enough space in the garage to bring in my work desk and get a proper office space going. I am thinking that it is important to be able to fully engage in work at work, and to fully disengage from work at home. Be fully productive at work, and fully relaxing at home. Having a big desk and a bunch of computer in the bedroom is not exactly conducive to this.

I also made a decision to finish my “work” day around 6pm and then go into chill-out-and-make-dinner mode. The computer I do all my games work on is still in my bedroom, so in a sense, right now it's kind of something I'm only doing in my spare time, of which I do not have very much of. I'm trying that on for size. I'm finding myself trying to sneak in a few lines of code while I'm doing this other thing that I told myself I'd do before the day is done. It's interesting to zero in on my passion like that.

Hopefully, with some more organizing of things and maybe even some books and other things going off to other places in the next few days, enough space in the garage will clear up that I can start to really bring the games work into this garage/office space that I'm setting up, and some really cool shit will start to happen.

Sunday, June 10, 2012

square-lined moleskine

I ran an errand today, to find a notebook. I know that I have more games to design, and that I like to design things on graph paper, so it follows that these future games will be designed, at least initially, on some kind of graph paper. I've been using regular 8.5x11 graph paper that can be found at pretty much any place that sells office supplies. 

I thought I'd try doing my next game –  the one after the one I'm working on right now –  using a moleskine notebook. The thing that particularly strikes me about using a moleskine, the pocket-sized ones especially, is not just that it can be carried pretty much everywhere I go and requires no electricity to record things into, but the pages are each sized just a little bit larger than a typical touchscreen phone. This is enough room to design a fixed-view screen/scene/level at actual size while leaving a fair amount of margin for jotting down notes.

Why am I doing something related to my next game, which isn't even really my next project? For the same reason that I've bought a moleskine notebook to design it in –  these things take time to bake. Maybe a better baking analogy would be proofing –  the process of allowing the dough to rise in a warm, moist space before putting it in the oven. I have an idea for the game that I find very much to my liking and showing many signs of being a good game for me to make. I am pretty certain that I would like to do something not centered around procedural content, i.e. with static level layouts. I know from experience that those can take quite a bit of time to work out the right designs for.  In the case of mobile phone games, individual levels aren't supposed to take very long for the player to complete, so in order to have enough 'meat' to the game, there is a fairly high quantity of levels that seems to me is generally expected at any price point. For the game to be worth someone's $.99, and especially to be able to command a higher price than that, the quality of these levels is what must go up.

As I fully intend to render the best possible quality of service in my capacity of game designer in addition to the highest possible quantity, this means spending a good bit of time preproducing something on the order of 100–200 levels. The specific gameplay is something I have yet to prototype, but like I said I have an idea or two of what I'd like to do, and I'll make a prototype probably some time after I finish this maze-on-a-voxel game (voxels as a theme, maybe?), obviously because I'd like to stay focused on finishing what I've got going now before moving on to anything else. In the meantime, I can still occasionally divert myself and sort of pre-produce the pre-production by working out design language and layout conventions on paper, in a very conveniently sized notebooke.


Friday, June 8, 2012

rounding some corners

I've been quiet the past couple of days. Some of that is due to some amount of Skyrim playing.  Much of the rest of the time has been spent on a couple of key features in the maze game.

I wanted to add a surface distance heuristic to use for the A.I. and maybe object placement. I generated a list of test cases using PICT, wrote a quick perl script to add curly brackets and commas into the output, which I then pasted into some code to use as input for a fairly simple API-type test with some error checking and logging. This script got attached to a dummy object in a scene cloned from the one I use for the main game. Working with the data structure I use for “cube space” requires the object I use for the cube itself, which defines how big the cube is and thus how big the array for storing the generated data needs to be and all the edges and faces wrap around to each other. Distance is measured as a line wrapped around the surface of this cube. Spanning multiple sides of the cube is a less-than-simple special case of this that I would expect to occur quite frequently.

Since we work in real space, and are not trying to generate things in a certain way with the edges, the shared edges idea is completely absent from distance computation. Instead, I created a new delegate table, using the same component operations I refactored from the edge wrapping code used in maze generation, only here the wrapping is more explicitly from side X to side Y instead of from one type of edge to another. I do this because it is possible for this function to have to completely wrap around to the other side of the cube, so transitions from any one face to any other face need to be taken into account. What's more, wrapping around to the other side can be done in four possible directions, of which I select the shortest one. Depending on the direction taken, the wrapping may occur in one of two different ways –  the same opposite face wrapped vertically will appear inverted relative to if it were wrapped horizontally. This occurs very subtly in the game and is by design to kind of throw the player off a little bit –  the maze appears to shift but it's exactly the same, just from a different perspective.

So the distance function uses this table, which effectively “rotates” the destination face, if we're finding distance across sides, so that the local coordinate system for that face, when viewed as a flat, unwrapped linear space, lines up with the source face, making a straightforward linear distance computation possible. If the distance span is only to an adjacent face, the above transformation is performed and the distance is computed –  pretty simple. If the distance span is over to the other side of the cube –  two faces –  the same thing is done four times –  one in each of the four possible directions, and the minimum of these is returned.

It took a while to wrap my head around this, but the resulting ~60 lines of code (37 of these are the delegate table) came out pretty elegant looking. There were a few test failures that I had to work through and debug. These were relatively easy thanks to the prefactoring I had done using the 15–line rule and SLAP.

The next thing on my list was to make the randomly generated mazes a little more interesting to navigate and a bit more suitable for pac-man-esque player-chased-by-AI gameplay. What this means is there can be no dead ends, because this would complicate the “ghost” AI and would also create some nasty surprises for the player quite frequently. I want the player to have fun playing the game, while still being challenged. There may still be some nasty surprises lurking around a corner, but I'd like to make it as much as possible such that a skilled player can either deal with these or avoid them altogether.

The first approach I took was to just randomly pick some walls that had exactly two open spaces on either side and remove them. The chance of removing a wall could be adjusted from a public variable. This did work somewhat, but I still had dead ends, which suck. So, I wrote a small helper class to remove the dead ends. It literally goes through the generated maze, and if there's only one open adjacent space, it sees that as a dead end, and opens up one of the other adjacent walls. Problem solved. Occasionally there are some “loner spaces” that are the probably the result of some kind of bug I haven't yet tracked down in the maze generation code. These will slip through the dead end catcher, so I added a little extra code to also detect these in the same pass and just add an extra open space.

So now I've got randomly generated mazes with no dead ends. One other thing that I had in the original LD23 game that I haven't added yet is the rounded edges. Everything has just been solid cubes up to this point. I have what I think is a pretty straightforward solution. I'll see if I can implement that today and maybe also see if I can also do some mesh-optimization work later tonight. The actual A.I. code might be a little bit more involved. There's a couple of other key pieces to that I will have to figure out and implement solutions for. I'll also need to block out some time this weekend to go to town with the sound effects. I'm putting that off until I've got a more or less completely playable level to the game functioning. I'll probably also start soliciting people for beta testing around then, so feel free to e-mail me if you want to get in on that.

Tuesday, June 5, 2012

Controllers and Control

So, according to the twitters, there is some kind of conference going on this week. Something about the mainstream video game industry and selling stuff into “the channel” or some kind of archaic 20th century leftover bullshit.  Only now everyone is trying to be all “21st  century”, whatever that means. Apparently, it is supposed to mean using touchscreens and motion control and voice commands for everything.

I get that innovation is a naturally occurring thing (see this post), but this is getting a little bit ridiculous. The technology being invented supposedly for games does not seem to have been developed in close partnership with someone who actually has a background in making things fun, like, oh, say this.

Where are the first party games that were developed alongside these technologies? There aren't any. These were cooked up in research labs and shoved over to product teams to make a “return on investment” to keep the shareholders happy. And now they're being shoved over in consumers' general direction to “consume”.

To put a finer point on it – the technology of buttons and joysticks came long before Pong or Computer Space ever saw the light of day. The games played off the familiarity of the players as users of those input devices, effectively making them more playable.

When presented with an unfamiliar input device with no other practical use, the tendency is to think of it as a novelty. A one-trick pony, if you will (a term Steve Ballmer has used more than once to describe Google). At least Nintendo had the good smarts to make the WiiMote usable as a wireless gamepad that could be used to play people's favorite NES classics. Can you imagine the Wii doing nearly as well as it did if they hadn't?

Earlier, I was thinking of making this a “crystal ball” type post about what I project the future of such-and-such game technology will be like in 2, 4, and 10 years down the road, so, for the sake of scratching that itch:

2 years: Smart TVs coupled with ubiquitous handheld touchscreen devices –  whether they be phones or simple wifi-connected touch devices –  start to obsolete the traditional remote control, at least the gigantic ones with lots of buttons for this, that, and the other. It stands to reason that the computing capabilities of these smart TVs might also allow for some amount of gaming to be done directly from the TV itself, or via the Internet. The big difference here is that someone has figured out a way to do this all without any extra boxes. You just plug the TV into the wall, and maybe a cable hookup, and that's it –  you've got internet, TV, movies, games, everything. As I've said before, my guess is that Apple is working on something like this as the next atom bomb they'll drop on the tech industry.

4 years: Around this time is when the 10/10 rule will start to kick in with the touch-screen-centric smart phones. By this I mean they will be so ubiquitous and cheap that even the low-end budget phones that carriers practically give away in exchange for a service contract will be a touchscreen-enabled phone-enabled device with capabilities rivaling a netbook or a laptop of today. So, given this, I'm hoping the touchscreen latency problem will have been at least mitigated somewhat, to the point where it is actually possible to play Contra using a virtual gamepad on a touchscreen. Haptic feedback through a touchscreen will also become more of a norm, mitigating most of the physicality issues that people have with touchscreen-based virtual button interfaces. It may be possible at this point for a console game platform to actually obsolete the use of physical button gamepads.

10 years: Brain-Computer Interface – I remember seeing some of the earlier commercial attempts in this area in the 90s, with this doohicky you'd slip around your finger and it would sense the nerve impulses, or something. I never tried it, but I don't think it worked very well, because apparently it never really caught on. But we keep seeing this idea pop up again and again –  most popularly in The Matrix. Full-on virtual reality mindjacking is probably still another decade or few off, but not entirely out of the question for this century. What I'm talking about here is a solid first step toward that - enough to drive a video game or a UI on a screen a few feet away from the user.


Sunday, June 3, 2012

creativity happens

I have come to believe that creativity is not something that can be forced, and that it never needs to be, because it is everywhere, all the time. All we need to do is be able to listen to it and channel it through ourselves into our craft.

To quote the Tao Te Ching (translation: http://www.taoism.net/ttc/complete.htm):

The Tao that can be spoken is not the eternal Tao
The name that can be named is not the eternal name
The nameless is the origin of Heaven and Earth
The named is the mother of myriad things
Thus, constantly without desire, one observes its essence
Constantly with desire, one observes its manifestations
These two emerge together but differ in name
The unity is said to be the mystery
Mystery of mysteries, the door to all wonders

It's there, but it can't really be “named” –  there's no one set, specific method to making some creativity happen. It just happens. It's just there. If I grasp at it, it just evades me. If I pause for a minute and just let go, it becomes clear, as if it was there all along.



Saturday, June 2, 2012

ego, money, and free sex

On one hand, there is this egotistical desire that I, and I would guess that most other game designers, have - which is to see lots of other people enjoying the games that we make. It is satisfying to eat a bowl of soup which is very good –  it tastes good, it satisfies your hunger impulse, and it can also be very healthy and satisfying on a conscious level knowing that this is something that can help you live longer and function better. It is a level of magnitude more satisfying to make that really good bowl of soup –  even to just follow a recipe for really good soup –  to serve that to a group of people, especially people with whom you have some level of relationship with, who you have gratitude for, and seeing them genuinely enjoy the soup. Of course, along this same line of logic, (I'm no master soup chef, so I cannot claim to have experienced this, and am just going on logic here), it must be yet another order of magnitude more satisfying to invent a new soup, maybe even just a variation on an existing recipe, and see those same people enjoy that, perhaps even more.

On the other hand, everyone in this society is expected to “make a living”, by which is meant to earn some amount of monetary income such that they are able to live whatever lifestyle they choose to live. This in turn creates an exchange of goods and services, which, collectively, we call an “economy”. Sometimes, this economy is “good”, or “healthy” –  many people are doing well, and it's fairly easy to do well for oneself with an honest and consistent work ethic. Other times, this economy is “bad”, not healthy –  a few people may be doing really well, but the vast majority of people are living below what is considered “standard”.

What i think is interesting is that, by that definition, the world economy on the whole is probably not, and maybe never has been very good, even in times when it may have been very good for one country or another. I think it may not require a huge stretch of the imagination to consider that this may be a root cause for a lot of the conflict in the world, armed or otherwise. At this moment, I am of the opinion that the economy of the U.S., in both a monetary and a political sense, is not in a healthy state.

But I am no economist. I am simply someone who wants to get some bloody satisfaction in making some damn good video games for other people to play and enjoy, and to “make a living” doing just that. This means somehow getting paid for the act of making video games, and balancing that with the desire of having a lot of people enjoy playing those games. I think this is a commonality that I share with most of the people who call themselves game designers.

I think the differences start to arise when it comes to how we come to having this massive number of people enjoy our games, and how we decide to get paid for our work. I think it's very noble to give away one's work for free. It might not be at all profitable in most cases, but I've never heard of anyone faulting a game developer for giving away a game for free. I only ever see people taking issue with paying money to play a game. And a lot of the time there is no issue –  a person sees the value in playing the game, i.e. it looks cool and fun and whatnot, and is worth whatever price the developer or publisher or distributor or operator or whoever is asking. Money is exchanged for some enjoyment. Perhaps one of the oldest economic exchanges there is, if you believe what is said about “the oldest profession”. 

I like that analogy. Let's run with that. So, let's say a guy is walking down the street and happens across a prostitute who is offering free sex. Let's assume for the sake of example that she's clean and carries condoms, etc, so the risk of STDs, etc is very minimal. The guy, being a guy, does not turn down the offer of free sex, and follows her up to a bedroom in an apartment in a nearby building. They take their clothes off, and start having sex. Just as the guy is about to blow his load, she stops, and says “that will be $500”. The guy says “I don't have $500. I thought this was free.” “No, I said free sex, not a free orgasm.”

If you were that guy, would you be a little angry?


Friday, June 1, 2012

money vs ethics.. FIGHT!

I don't particularly like where I am living right now.  While I do get to maintain a fairly decent standard of living, there's quite a few things I could go on complaining about.  I'm certain that I will leave the second I am able to maintain a lifestyle somewhere else.  At the moment, though, it's really the only option I seem to have that allows me to keep working for myself while I build up my business independently. I hope to change these circumstances in the near future by designing, developing, and releasing a whole bunch of cool games into the market for people to download and play. Ideally, I'd like to stick to a straightforward business model of using the app store model to sell complete copies of each game, rather than the “futuristic” method of giving away part of a game and selling extra content to slap on top of the same game. Some people would have us believe that unless we give in to this model of doing business in games, that we're destined to all be not successful and left behind.

I'm going to go ahead and disagree with this notion, because “the future” is an illusion. What works for some other studios right now may work for them and work very well at that, and that's great. I think it is presumptuous to say that, because the selling-in-app model works for certain games and certain audiences, that it will work just as well for all games and all audiences, and that games that can't fit this mold shouldn't be made, or at least deserve some implied forthcoming ass-beating in the market, and audiences that don't like this model can suck it.

And just when we thought things couldn't get any more screw-the-customers-let's-make-moar-munney, along comes Diablo 3. In all fairness, I have not bought or played Diablo 3 just yet, and don't really have any plans to in the near future, so I may be a little ignorant here in just going off of what I've been hearing from other people. Some people seem to really like it, and, given that I'm still playing Skyrim for no really good reason other than “let's see what happens when I try a slightly different character”, I'd probably be in with this camp saying the game isn't all that bad. On the other hand, Skyrim does actually still let me play the game even when there's a server hiccup. I don't understand this idea of forcing people playing a single player game to be connected to the Internet at all times in order to play a game. I have to wonder if things have gone a little too far with this idea of doing this all in the name of enabling a “real money auction house” for in-game items, i.e. you paying real money to buy in-game items, in a game that you've already paid $60 for.. hello?

I'd like to think that the issue at hand is one of developers in general not innovating enough in the right areas. I'm pretty sure that I don't completely understand all of the problems in play. The issue that I have, though, is that it seems a bit dishonest and manipulative to “monetize” players' addictions –  or at least it seems moreso than selling an addictive experience and enabling players to play that to their hearts' content. While the impact on a person's life is highly debatable, I think it is pretty safe to say that there's a lot of value in an experience like that. And so coming along and tossing in a few strategically-placed mechanics that are there simply to harvest real money from those addiction.. I'd like to think it would cause people to think twice about playing the same game for hundreds of hours, but I know in my heart of hearts that it wouldn't, and they'd more than likely submissively pay up to play basically the same game they were playing ten years ago but with better graphics. I'm having some difficulty in seeing this practice as “ethical”.



Thursday, May 31, 2012

i think i see a light a little ways down this tunnel..

Got the new game working on my EVO 4G last night. I have to say it really fits well with the accelerometer controls. There's a bit of fit & finish I could add in from a previous project, as well as a Unity feature I haven't tried out yet, but I think would help make things look a bit smoother and faster. I still haven't added any collecting of things back in. It's still just a ball “rolling” around a branching maze. I'd like to poke holes in some of the walls to make it a bit more navigable and maybe add back the collect-all-the-noms mechanic. Also, sound. Gotta have sound. I might spend half a day to a day messing around in Bfxr and doing mixdowns in Audacity. Or I might break out the MS-20i to try and get a somewhat more authentic early-80s sound.

Still haven't settled on a name yet. Still undecided on the chasing enemies thing. That will require a bit of prototyping of how the AI would work. I don't think it should present a whole lot of difficulty, but I have been known to be proven wrong, so I'm taking a wait and see approach there. I think there could be other ways of adding tension to the gameplay if that were to go totally wrong for some reason. It should be alright, but it never hurts to have backup plans.

It was really exciting to see the game working on my phone and to have other people play it and start to intuitively get it pretty quickly. I may want to add in maybe one or two lines of instruction for people who've never played a tilt-to-roll-a-ball-type mobile game before. I'll probably also just spend a couple of days just jamming on the basically-complete game and just keep adding more juice and polish to it.

So, given all that, it's starting to look like it could be done sometime next week. The thought of that even possibly being the case is making me giddy. :)

Wednesday, May 30, 2012

an innovative use of the word "traditional"

These are some thoughts and speculation that I have about the "console gaming" "space". Tim Cook referred to this recently as "traditional gaming", which struck me as a rather innovative use of the term "traditional gaming", because I had associated that with things like board games, card games, and running around outside, not sitting in front of the TV with a gamepad making imaginary people made out of colored blocks jump over things. One of the hot questions these days seems to be "what if Apple were to make a games console? wouldn't that be awesome?"

I'm going to go out on a limb here and speculate that what Mr. Cook meant by his statement, and his follow-on answer about TV games in general "that could be interesting" to mean that Apple has no plans to make a games console, but might have plans having to do with video games played on big screen TVs. There's a bit of rumor flying around about Apple developing a smart TV, or "iTV", if you will. If this turns out to be reality, there's going to have to be some way of controlling it. There are several possibilities for this, some of which I'll enumerate as follows in an attempt to appear intelligent:

 - classic Apple Remote - as used on current Apple TV - media-centric, conveniently not obnoxiously large, but more easily losable in beween couch cushions. Built in magnet makes it a little easier to stow, however.

 - iPod Touch / iPhone remote control app - this seems pretty obvious. I haven't checked myself, but this may already be implemented on Apple TV. If the TV device can work as a wireless hub, not only can they eliminate the need for another box in the house (the router in addition to the cable box), but now it has integrated support for using everyone's iDevices not only as remote controls, but as virtual gamepads (assuming API hooks are implemented - can't see why they wouldn't do this).

The latter also opens up the possibility of having games implemented for said supposed TV device to interact with companion "controller" apps written for iPod Touch / iPhone / iPad, effectively enabling it to compete with Nintendo's upcoming Wii U. The Wii U would still have the advantage of actual tactile buttons. These are a bit more important for games played on a TV and controlled by an external device, i.e. gamepad, because the player is not looking at where their fingers are touching. They're effectively playing blind and must rely on tactile sensation in order to effectively navigate the controller.

On a touchscreen device, this actually isn't quite as important, except in cases where input latency is critical. Again, this is all just my own speculation. I have no knowledge of what Apple's actual plans are, and am not intending this as suggestions to them. I'm sure they know quite well what they intend to do in this area of the market and will let the rest of us know in due course. I will now return to my regularly scheduled programming. (perl!)

you'll never get out of this maze

Did some additional refactoring to the core player movement code tonight, revisiting it for probably the first time since I wrote it during the Ludum Dare jam. Being code written under time pressure, it was pretty messy, although not totally unreadable. The vector math for moving the ball around the cube surface turned out to be fairly simple in the end, if a bit counterintuitive in a couple spots.

Removing Debug.Log code and some of the spatial conversions I was making to make things more suitable for debug output really sped up maze generation time. It went from generating a 7x7x7 cube maze in about 4 seconds on my PC (this is with some other optimizations I had done earlier), down to less than two. That data structure I mentioned in an earlier post seems to be really doing its job, because maze generation time appears to not have any exponential characteristics. I was able to go up to 15x15x15 and higher with hardly any additional performance hit.

Of course, this is all on a high-powered PC, and not on any target device. One of the next things to do is to implement the accelerometer code, which shouldn't be much trouble in and of itself; however, I have not tested this at all using accelerometer-based movement. It's all been direction key movement so far, so I may have to do a bit of tuning to get that right.

Aside from that, there's still the matter of are we munching dots, escaping ghosts, finding an exit, or some combination thereof. I'm thinking the testing on an actual mobile device will yield some clues as to what would most make sense as far as the overall theme of the content of the game.  That said, I would like to post an updated version of my Ludum Dare entry, which would still be themed around the idea of “Tiny World”, and would necessarily involve collecting all the dots in the maze –  only this updated version would have randomly generated mazes that could be of just about any size, but given the theme I may just peg it at the smallest one possible and maybe work with that :)

Tuesday, May 29, 2012

rainy day

My main computer has been turned off all day today up until about five minutes before I started writing this post (about 3PM). I got up around 7AM because my body just woke up and it just felt futile in trying to go back to sleep when my body was saying “Here I am! I'm up! Let's go!” I spent the morning reading through Learning Perl and working through the exercises, which are starting to actually become a bit challenging. I actually found myself looking in the back of the book on one or two of them because the clever/tricky solution I was supposed to come up with was just not happening with me at that point in time. It really is quite fascinating how a programming language can be in and of itself based around cleverness. Maybe it is just my perception at this point. I can't even really say that I'm learning Perl for any directly practical reason, other than that I do tend toward code-oriented solutions and those necessarily a lot of typing of text and occasionally having to go through and make the same stupid edit on a thousand different lines somewhere. If nothing else, I see it as an interesting mental exercise, a set of interesting problems that require thinking in a slightly different way; and I know from reading about and practicing lateral thinking that that's the sort of thing that can really stimulate mental growth and more habitual innovative thought. Plus, it never seems to hurt for a programmer to know how to write a quick & dirty Perl script. Or so I've heard.. from a friend or two, and maybe a movie.

Anyway, I've got my main machine up now and have all that other stuff taken care of, and even have a blog post pretty much written, too. So about the only thing I have left to do today is to actually get some work done. I noticed that some people bought my earlier game Patience over the weekend, as part of the Because We May promotion, which is awesome (thank you!). I was thinking that maybe it's getting around time to update the game.. seeing as the last update was, oh, last July.. I was playing the game a bit over the weekend after having watching this video on “juiciness” and thought maybe the game could use some of that.  I have a couple of ideas about what to do. I should probably write some of them down.. :) Then again, it might be more fun to just wing it and do it all game jam style. I haven't even looked at the project file yet, so it might be a good idea to let it simmer a little bit longer so I can get some of the ideas down on paper and then blast into it. In the meantime, I can do some of that boring visually-aided debugging I've been doing lately..

Monday, May 28, 2012

i failed at being lazy today

I really tried not doing any work at all today. I read a bit more, slept a bit, went through and organized my stuff a little bit, played some video games.

At the end of the day, I wanted to write some code.

I may have just been the slightly more computer-sciencey nature of the problem at hand in my project (a specialized O(1) add/remove/access bi-directionally associative data structure, if you must know). It might also have been that I would really like to finish this game I'm working on soon, and getting this working is just one step closer to that of probably quite a few steps still left to go.

I've been intentionally trying to scope my projects small enough that they don't really need any sort of extensive planning and can thus benefit from a somewhat improvised approach. I have an idea of what features I'd like to get in, and maybe some idea of how much each of those might cost –  but in all honesty a lot of times the features are things that I've haven't done before either at all or in the specific context in which I'd like to implement them. I try to limit the number of things in any given project I take on that's like that, but there's always something. I'd go so far to say that if there weren't anything like that, the project wouldn't be very interesting to me, and I might not be motivated enough to finish it at all.

Here, in this game, so far, it's been a cube-shaped world, now it's random maze generation, and probably some kind of pathfinding AI. I've done random dungeon generation before (recently, actually – I may still have what I did on the test arcade page), but the whole area of procedural player space generation in general is still a bit new to me, and seems to have lots of caveats and things to get the hang of that maybe I haven't quite gotten the hang of just yet. Of course, once I get the hang of those things, I'll naturally want to move onto more challenging problems in PCG, and I'll be back here again.

In the end, my goal is to make a fun game that a lot of people, including myself, would be able to enjoy and find a lot of value in, preferably in as minimal of a time period as possible so that I can move onto to making more fun games that are just as good, if not better.  The difficulty of the problems I encounter in doing so seems a bit disconnected from this.  On one hand, a fun game is not necessarily very complicated or very innovative, although it very well could be.  On the other hand, a game that's not at all innovative (read: blatant clone) is probably not going to go very far, at least, not without a lot of marketing thrown at it, which even if I was able to do, I wouldn't be very comfortable in doing it. 

So it comes back to this drive I have to innovate, to make new things, new ways of having fun, of enjoying oneself. It just doesn't compute in my mind to throw out the same thing that's already out there, that in almost every case I can think of looks a lot better and is much better known to people simply because the people who made it had a lot more money at their disposal.  I do not have that advantage. I have to work with not having a lot of money to throw at things like marketing and licensing and paying people to do things for me. At least for now. That might change later. But right now it's just me, myself, and I throwing everything I've got at these games to make them fun and cool and worth people's whiles. That's my value proposition, so to speak.

Then again, there are plenty of examples of games that don't use cutting edge technology, but might still be considered very innovative, if not valuable. I'm sure they all still have a lot of hard work put into them in lots of the right places. Maybe that's the commonality of all this. Doing the right work in the right places. It seems like a very vague proposition, but I'm starting to get the feeling that it's more like riding a bicycle, and that once a person learns how to recognize the right things to work on and is able to just motivate themselves to keep working on them, it becomes like second nature. I can't say that I'm quite there yet, but maybe in recognizing what it is, I can move in that direction.

Tuesday, May 22, 2012

Learning Perl.. on a Mac

One of the nice things about Mac OS X is that, because it is a UNIX descendent, it has things like Perl and Bash built into it (at least, I think it is bash..). My inner *nix geek can happily geek out in the terminal window with pipes and shell scripts and whatnot.

I'm starting to use my Mac a bit more because I plan to start co-developing for both Android and iOS. It's a late-2006 model iMac –  one of the last of the white polycarbonate-enclosed iMacs. I bought it way back when I was working at Microsoft in the Windows org, and wanted to at least get an idea for myself of real comparison between Windows and Mac at that time instead of relying on silly TV commercials telling me what to think.  For what it's worth, the iMac has generally performed favorably, especially considering how long it's been in use, so I'd say it was definitely worth the $1200 or so that I spent on it initially. I did have to take it in to the local Apple store to have the screen replaced at one point due to vertical lines popping up all over the place, but other than that, it's aged pretty well. It still works –  a little slower and less powerful than the beefy workstation I do most of my work on, but still pretty usable. And it takes up very little space, which makes it a great secondary computer. Its purpose now is to serve as my iOS build and debugging machine.

I'm also starting to really dive into Perl, because, well, it's a useful language to know, or so I've been told. I think it might be interesting to write a game in Perl, maybe a text adventure that scours your hard drive for plain text files and mad libs in some of the most commonly used words it finds :) That aside, it's always useful to learn new programming languages with different programming styles to broaden one's perspective. And somehow, I got all the way through a UNIX-based computer science education without learning Perl. Time to fix that.

Since the iMac never really gets turned off, because it's quiet and off enough idling in sleep mode, it's easy enough to just start typing away on it in the morning while I'm reading the llama book. My inner UNIX geek uses VI, so I've put mvim on the system and use that for editing scripts. The scripts I've been writing so far have been building up gradually from the 'hello world' into the basic arithmetic and string operations into lists and arrays and so on –  a familiar sequence and a useful one in relating the specifics of the language to what I already know. 

I've also signed up for the perl-beginners mailing list, and have been getting this daily deluge of mail threads on various questions which, if really beginner level, must mean that I am a total newb at this language and have a lot to learn.

Monday, May 21, 2012

randomly generating mazes

One of the more interesting suggestions I got as feedback on my Ludum Dare 23 entry was to randomly generate the maze that the player must navigate. When I say “interesting” in this context, I really mean “wow that sounds pretty tricky to do but man that would be awesome.” This was one of the earlier comments that came in during the judging period, and I could see how it would definitely add a lot of replayability value to the game, so I went straight to work on attempting to add it.

The first thing I did was look at the entry for maze generation algorithms on wikipedia. The key takeaway I got from this was that this is a bit different than the roguelike dungeon generation I had been toying with earlier, and is really quite a bit simpler, is it there is no differentiation between rooms and corridors. It's just all corridors in a pure maze generator. The different algorithms that can be used basically boil down to some variation of depth-first search. I eventually decided on Prim's Algorithm, as it uses a standard iterative loop rather than recursion – less messy.

The hard part, of course, is making it work on a cube-wrapped 2D map in such a way that the sides all connect together seamlessly. To do this, I'm having to build a system to work with spatial coordinates of the form (face, x, y), where face is an index in the range [0,6] and x and y are within the range [0, size], size being the length of each edge of the cube. These face coordinates get mapped into a 2D array, where each (row, cell) combo maps to a specific location on the surface of the cube. To prevent the annoying situation of having an edge space on one side be open while the corresponding edge space on the next adjacent face of the cube be closed, all such edge spaces share the same (row, cell) location with each other. The corners of the cube are always occupied, as having to work with open corner spaces would be needlessly complicated and would not add much value to the mazes.

With the corner spaces not represented at all and the edges being special case rows in the array, we're left with the the inner (size-2)x(size-2) area of each face. Since the parts of the edges that are not corners are also (size-2) units long, this means that everything can be mapped to a 2D array that is (size-2) units wide. Since each face is (size-2) units high, and we always have 12 edges, we get 12+6*(size-2) rows in the array.

The mapping code to go from (row,cell) to (face,x,y) and back is a bit complicated. I created a suite of test cases using PICT-generated inputs, hand-calculated expected results from those inputs, and a small data-driven test harness class to check just this mapping, as it really comes down to a lot of if/else code that can be highly error-prone otherwise. Using the PICT-generated test cases snuffed out like 95% of the issues I had with this code directly through the test cases themselves, and got me close enough to the other 5% that they were easily visible as I was fixing the other errors in the code. This experience has led me to take a more TDD-esque approach wherever possible, particularly with this mapping code. I'm in the process of creating a distance function to find the surface distance between two points on the surface of the cube, and have created a similar set of test cases using PICT and manually-calculating the results on paper (and Excel).

The actual maze generation code got a bit messy at first. My initial implementation produced these odd-looking mazes that hardly ever would be completely navigable and were thus not very fun to move around, which was disappointing. I took another crack at this yesterday, refactoring the maze generation code using the 15 line rule and the Single Layer of Abstraction Principle (SLAP) into several short, concise functions, and made a little tiny change in what turned out to be the middle layer of abstraction in this former spaghetti mess, and was amazed to find the algorithm generating mazes similar to the ones pictured in the wikipedia article, only wrapped around the surface of the cube.

There's still a bit of work to be done before I can call it a game and release the thing. I'm still debating whether to go the simple find-the-end maze route where I pick an end point and have the player navigate there, or open up parts of the maze, populate with dots, and add enemies that chase the player around, or both. Either way would definitely involve the distance function I'm working on now as a key element.

Sunday, May 20, 2012

the indie gourmet: buddha bowl

My first encounter with the buddha bowl was in a place called Thrive that is in the neighborhood I lived in for several years in Seattle. They made it as a lunch special for like $8 (which is cheap for them), so that's what I tried the first time I went there, and I was pretty damn impressed with how f***ing awesome it was in so many different ways. It was really filling, it was really good, it was not at all greasy or loaded with sugar, and just felt really healthy to eat. Oh, and it is vegan and almost entirely raw food.

Being super impressed with this, though a little sticker-shocked, I went searching online to see if anyone had some recipes to at least approximate what I had stumbled across at this trendy hole-in-the-wall vegan/raw/organic oasis. What I found was a way to make a decent buddha bowl for a bit less than $8/bowl (I'd still drop $8 on the Thrive version, though, FWIW).

Here's the basic recipe that I use:

1) Whole grain starch: brown rice or quinoa, cooked
2) Marinated greens: kale, collards, chard –  the leaves have to be a bit thick to stand up to the marinade
3) Sauteed onions
4) Raw broccoli
5) Raw carrots, julienned
6) Hummus
7) Soy/Lime Garlic dressing –  1 tbsp low-sodium soy sauce, 1 tbsp lime juice, 1 clove finely chopped garlic

Offhand, I'd ballpark this at maybe $2–$3 a bowl, tops. I usually buy/prepare all this stuff in bulk, so that tends to bring the cost down quite a bit.

The marinade for the greens is fairly straightforward. There are lots of different recipes readily googlable, but I like this one that I have since forgotten the source of, but it works and is very cheap to prepare :)

* 1 bunch stiff-leaved greens: collards, kale, or chard work well IMOE
* 2 TBSP olive oil
* juice of 2 fresh lemons
* 2 TBSP low-sodium soy sauce

Wisk the olive oil, lemon juice, and soy sauce together very well in a bowl. I've found that beating it against the side of the bowl like beating eggs helps to mix everything together with the oil.

1) Wash the greens thoroughly.
2) Strip the leaves from the stems.
3) Arrange the leaves on top of each other in little piles.
4) For each pile of leaves {
 a) roll the pile up into a tight roll
 b) slice across the roll in very thin increments so that you get these little discs of rolled up leaf ribbons
5) Put the sliced leaf ribbons in large flat dish suitable for marinating (i.e. it can hold liquid and can be covered easily)
6) Pour the marinade mix over top of the ribbons; mix it around well with a spatula or spoon
7) Cover the marinating dish and let it sit in the refrigerator for 6–24 hours

Makes about 6 buddha bowls worth of greens. Keeps in the refrigerator for about a week or two.

I'll remind myself to take some pics to add here the next time I make this (maybe tomorrow)

Friday, May 18, 2012

oblivion vs skyrim

I've been playing The Elder Scroll IV: Oblivion over the past couple of days. I got the PC version on Steam even though I already have the game for XBox360 because

1) I've heard on several accounts that the PC version is the best one on account of having higher resolution, more memory to play with, more hard drive space, and a much more open modding capability, along with an ever-maturing collection of mods available for the game.

2) I'm lazy when it comes to playing video games, and would rather play one at my desk on my high-powered Core i7 PC with 20GB RAM and terabytes of hard disk storage than go out to the living room and play one on a five year old console with the computing power of an obsolete Macintosh.

3) On my PC, I can play a game fullscreen on one monitor in one window and have, on the other monitor in another window, any of the following: the help guide for the game, Twitter, Facebook, or the thing I'm actually supposed to be working on, which I can shift to during pauses in the gameplay and sometimes think about while I'm playing.

With these in mind, I now find myself a little puzzled as to why the focus for Skyrim was apparently shifted over to the console versions. While I'm not going to deny that the game has been very successful in the marketplace, the PC version didn't do too badly, and I've read that there has been a significant amount of (mostly technical) trouble with the PS3 version.

Anyway, so I was playing the PC version of Oblivion, and noticed a few interesting things about the game. The game obviously lags behind Skyrim in terms of graphical detail, the quality of most of the voice acting, the leveling system, among others. What's interesting is that there are a few areas where it actually seems to be subjectively better than Skyrim: the landscapes are more colorful, the cities are bigger and more populated. The Thieves Guild quests have a much greater emphasis on actually stealing things and is more like Robin Hood vs Skyrim's mafia-esque thieves guild that is largely in the employ of the rich and underhanded. Oh, and spell crafting can be pretty awesome.

This isn't necessarily to say that one game is better than the other, and to give BethSoft credit, there is quite a bit more to like about Skyrim for the millions of folks out there who just want to play a fun game and maybe get lost in it for a few days. Where Oblivion still seems to shine, to me, (at least after a few hours of playing the PC version) is a certain depth to the game world.

Maybe “depth” isn't the best way to put it –  but it does seem like there are more people who attack you in Oblivion that actually have names and maybe even a bit of backstory to them –  kind of like Star Wars, in a way, where practically ever character that appears on screen has some kind of story behind them, even if it is never explicitly referred to it the movies. There are quite a few instances in Skyrim where the player is fighting named opponents –  even some of the dragons are named. In Oblivion I've been getting the impression that this is happening a bit more at the lower level, like even some of the grunts you fight have names.



Tuesday, May 15, 2012

porting to iOS

One thing I've been meaning to do for a while, but have kept putting off is starting to make games for iPhone and iPad, and porting the one game I have released so far on Android Marketplace, as well as the one I'm working on now to the iTunes App Store.

In order to do so, I would need, at a minimum, the following:

* An Intel-based Mac running a recent version of Mac OSX (Lion or Snow Leopard)
* The most recent version of Xcode that I can run on the version of Mac OS X running on this Mac

To get the latest version of Xcode would require OS X Lion, which requires a Core 2 Duo Intel Mac. The iMac that I'm using is an earlier model Intel Mac, and only has the Core Duo. It works fine, albeit a little slow, but only has OS X 10.5. I just put in an order with Apple for 10.6 so that I can install Xcode 3 with the iOS SDK. Once that arrives and I get it installed on the machine, the plan at this point is to go ahead and get the Unity iOS Pro license added onto my existing Unity Pro license and start porting my Android game Patience over to iOS.

The actual porting process may just be a simple re-compile, a bit of smoke testing to make sure it doesn't crash, as well as getting the right-sized icons and screen shots ready for the App Store submission. It might, however, involve a little bit of debugging, which feels a little scary to me right now, because I have no idea how that's going to turn out, if it is even an issue. The only iDevice I really have in my possession right now is a second generation iPod touch. I have no idea if that's going to be able to handle the game or if I'd have to require a newer generation iPod Touch / iPhone / iPad. I may need to enlist some beta testers (please e-mail me if you might be interested in participating in this) to help me identify any issues in the iOS build of the game, device-specific or otherwise.



Monday, May 14, 2012

Feedback from Ludum Dare 23

The judging/feedback period for Ludum Dare 23 ended last night.  I had put off any serious effort at rating games until the end, but still managed to get in 93 ratings, many with comments that I hope will be helpful to the developers of those games. The game I made, which I so creatively titled “Tiny Cubic Maze World” did ok relative to the entire 330 games submitted for the jam, but still not terribly great. Here are the scores I got:

#116 Innovation(Jam) 3.00
#129 Fun(Jam) 2.75
#136 Humor(Jam) 2.24
#164 Overall(Jam) 2.79
#180 Graphics(Jam) 2.72
#196 Mood(Jam) 2.29
#201 Audio(Jam)1.36
#226 Theme(Jam) 2.22

Quite frankly, I'm surprised I even got a score for audio, which was lower than my score for theme, which had a lower rank overall. I scored a bit on Humor, probably just from the “YOU ARE WIN!” message displayed at the end when all the yellow dots are collected. Innovation was the highest raw score and the highest ranked score, which is not unexpected, considering that I can't think of any other game where the game world is wrapped around a cube that rotates each side into view as the player moves from one to the next. Apparently some people found that fun, which is awesome.

Of course, these scores definitely indicate that there is a ton of room for improvement in the game.  Here is a condensed and prioritized listing of the feedback on got on the jam entry of the game:

1) Make the maze more complex / harder to navigate / more meaningful

2) Add pac man ghosts (or some kind of AI-controlled enemies or obstacles) to keep it challenging

3) Too short ; make it longer

4) Add additional levels of increasing difficulty / challenge

5) Randomly generate mazes and other obstacles

6) Add timer / some sense of urgency

7) Ending a bit anticlimactic

8) Add some atmospheric music

9) Add sound


Sound would probably be the easiest thing to add. Bfxr is very good at generating arcade-style synth noises and iterating on them very quickly. I may even have a few sound effects laying around my hard drive that would be already useable.

I would love to add random maze generation. I've even spent much of the last three weeks working on a prototype maze generator. The end result wasn't much fun –  the maze it generated was more of the classic get-from-here-to-there type maze than one where you'd collect a bunch of things and avoid enemies. My implementation might have been a bit buggy, as found myself unable to explore the entire open space of the maze, so some parts must have been totally blocked off, which would not have been by design. I did however get the start of a serialized map data format that maps from a 2D array to positions of blocks around the surface of a cube, which may very well prove useful still.

The AI enemies, i.e. pac man ghosts, seem like the big low hanging fruit here. The trick is to make them work across sides of the cubes. Failing that they must at least be able to move around each side of the cube in a manner that challenges the player. There's a great article here that dissects the behavior of the ghosts in pac man that I did start to read earlier at some point, and might re-read a few more times to get some inspiration on how to do this AI. Whether I stick closer to the original pac man model or work in some good ol A-star or something else is still being debated in my head.

Failing entirely randomly generated mazes, staticly designed mazes would still be a very good option to pursue, and would lend themselves especially well to some kind of story or theme wrapped around the whole game. I could stick with the “tiny world” theme, although not necessarily since the Ludum Dare jam is well and over with now, but it's certainly a good option. If I lean more towards classic pac man style gameplay, with increasingly challenging AI each level, then a large number of different levels might not be entirely necessary. That said, it doesn't take a terribly long time to create a given level –  the level in the jam version was created in less than an hour. So, let's say I put in three hours per level, then I could, in theory, do about 8–10 levels in three normal working days, possibly more if I do another crazy LD48–style jam just focusing on making additional levels. Adding one or more themes on top of that would definitely help guide the creation of those levels and also address some of the other comments, too.

Music of some sort would be good. Maybe an ambient/atmospheric style. I might decide to go with some a little faster paced, given the other feedback about adding a sense of urgency.

One thing that might not be entirely obvious from the jam version of the game is that I ultimately would like to release this on mobile devices –  Android and iPhone/iPad to be specific. The controls were intentionally limited to just directional keys for this reason, as I think this maps pretty directly to accelerometer controls. I didn't do an Android version for the LD48 as I felt that would involve some extra porting work that wouldn't really add much value to my entry, although I noticed a few people did make Android games and did get some kudos from people, myself included, just for submitting an Android game. The original idea for this game was to have it played on a phone or tablet device and the player would control a ball rolling around the surface of a cube that had a maze built around it.

So that's pretty much the feedback I got on the game so far. Sorry to end the post a bit anti-climactically, but there you have it. My thinking is that if I can address most or all of these issues with the jam entry, then I'd have something worth releasing.

Saturday, May 12, 2012

new power supply smell

I didn't realize there was such a thing as “new power supply smell”, but when I opened the box of the ThermalTake TR2 600W power supply I got today to replace the Rosewill RP600VP2–S-SL power supply that burned out last night, there was this very apparent chemical odor escaping the inside of the box.

The computer just lost its juice last night. I was playing Skyrim, which may have been putting some increased strain on the power through the video card, but it's obviously never been a problem. I googled the issue and found a post on a forum (don't have link handy) saying that something called “dirty power” is a fairly common cause for power supply burnouts.

Dirty power is the reason why we plug computers and monitors into surge protectors. It is electrical current that varies by more than 10% from the usual 120 volts coming out of the wall socket. It can fry your hardware, which in turn costs money to replace and time to repair. What I think gets taken for granted –  what I took for granted – is that any old power strip will do. This might be the case in areas where there are few, if any, thunderstorms, i.e. Seattle, but definitely not the case in a place where the local hockey team is named “Lightning”.

So I made sure to get a real surge protector today at Best Buy along with the replacement power supply. I went to Best Buy because this was sort of an emergency purchase. I need to have this computer working this weekend because it is the final two days of the Ludum Dare 23 judging period, and I plan to play and rate as many games as I can before the time is up. So waiting until Monday for a shipment to come in from Newegg was not an option.

By “real surge protector”, I mean one that actually lists how many Joules of protection it provides, and lists a pretty big number –  the bigger the number, the more surge protection. One nice bonus feature the one I got came with is four outlets that are spaced further apart to allow for AC adapters to be plugged in without obscuring the adjacent plug. The limited warranty built into the product doesn't hurt, either. In any event, a real surge protector is one that takes its surge protecting business seriously, and is no mere run-of-the-mill strip-o-plugs.

Installing the new power supply was not too much of a hassle. I just had to make sure everything plugged into the motherboard and the hard drives correctly. I did have to mess around with some BIOS settings when I got the computer running again, as they must have reset at some point between the old surge protector blowing out and being powered on again with the new power supply. I totally forgot I had Ubuntu installed on one of the drives of this machine. I might've went ahead and started using that if not for my dependency on Windows-only applications and games. Some day I will have to enter a 12–step program for Windows users. Does such a thing exist?


Friday, May 11, 2012

landscape vs portrait screen orientation

I posted about my dual monitor + virtual desktop setup on Facebook and Twitter yesterday, and a couple of Facebook friends mentioned using portrait orientation for coding. I've seen and used this myself before, and have found it useful. I made a conscious decision this time around to just have both monitors be landscape, though.

There are a couple of reasons behind this:

1) Fullscreen games and movies designed for a widescreen format will letterbox pretty severely when played on a portrait screen

2) I don't have a seperate gaming machine. My dev machine is also my gaming machine, which I don't really have too much of an issue with as games are my business. I'm able to chalk up game purchases as business expenses on my taxes, so I don't see any harm in running them on the machine I use for work.

3) Dual-monitor screen capture and recording, tends to work better when the entire screen area is a regular, convex quadrilateral, so having one screen as landscape and one as portrait, as I've done before also, won't work.

4) There's a shelf going across the desk about a foot and a half above the main part of the desk. If I were to make one or both of the monitors portrait, I'd have to move this up a few inches, which would involve taking an allen wrench and unscrewing the shelf and re-screwing it in at the higher position. Not a completely insurmountable problem, but not something I'd do casually.


And really, I probably should have emphasized the greater leverage provided by the virtual desktops, as that was the real revelation that I had yesterday when I started using that –  on Windows, no less, where this kind of thing isn't exactly provided natively. Not only do I have eight screens worth of screen real estate now, I effectively have four taskbars across all the desktops – so the desktop with my Unity IDE and code editing up doesn't also have a bunch of Chrome windows with Twitter, Facebook, e-mail, etc. I don't have to close those to get them completely out of view, either. I can just move them to another desktop and forget about them for a while.

Having the double-wide-widescreen monitors is actually kinda nice in and of itself, FWIW. I have more of my peripheral vision focused on my computer screen at any given time.

Thursday, May 10, 2012

productivity level up

Today I spent some time clearing all the stuff off my desks, dusting everything off with a bit of rubbing alcohol and paper towels and screen wipes, and re-setting up my main development machine on what used to be my main desk with my former dual monitor setup.

I had been using a single monitor setup for a while on the notion that the restricted screen space would allow me to focus on one thing at a time more, and discourage me from multitasking too much. I suppose it did, to some extent, but I also found myself having to work with restricted-sized windows when I would be doing things that necessarily involve having more than one app open at a time, like, say, debugging a Unity app, or working with a 3D model to be imported into Unity.

Lately, I've been reading through The Productive Programmer, which I got a few years ago, way back when I was still working for Microsoft, and had started to read through it, but must have gotten distracted by all the things going on at work at the time. And, also because maybe I was working on this thing called Windows 7 which wasn't entirely 100% compatible with everything the book was talking about, and in some cases, may have been working toward superceding in some respect. Since Windows 7 is now definitely out there and has had plenty of time in the open air to bake with the development community, I thought I'd give the book another go, and in the cases where the information is a little outdated, I'd just do my own homework via Google. I suppose if I were still working at Microsoft, I'd use Bing, but whatevs.

One of the things recommended early on in the book, in the chapter on Focus, which I would say is a pretty key element to being more productive, is to maximize one's screen real estate. Two things to do this are to 1) use multiple monitors, and 2) use a virtual desktop manager.

The first part, the multiple monitors, was a fairly straightforward (albeit messy) process of rearranging my office so that I would have enough room on the desk that I'm using for my dev machine to have a second monitor running. I have two desks in my room: one has one large deskspace, with a smaller-but-equally-long shelf space up top; the other has a smaller main desk space, with three 1 sq ft shelves off to the side. I had my single monitor setup on the latter desk, with the first desk having my iMac and a smaller TV with a NES on it, along with various piles of things. All of this stuff got cleared off. Much of it is now on my bed. The basic essentials –  my dev machine, printer, TV, NES, and iMac –  are either set up or at least placed where I'd like them to be. The remaining 10% of stuff is in piles on the floor. I'll have to spend some time cleaning the rest of this up so that I can actually go to bed later. My desk, though, is refreshingly clear of distractions.

I also brought back my old executive office chair that I had put aside for a while. I had forgotten how nice the extra height and lumbar support of this thing is. I had brief fleeting thoughts of some day splurging on an Aeron. This will do for the time being.

Part deux, the virtual desktop manager, is something that might take a couple of days to ensure everything is working properly. I first tried the SysInternals Desktops tool, but found the Explorer process separation between the virtual desktops to be problematic, particularly with web browsers, which would try to re-open the user profile on each different desktop, causing a permission failure. Next, I tried VirtuaWin, an open-source virtual desktop manager, and am so far finding it a bit easier to use. The jury is still out, though, on how well this works with the automated screen capture tools that I use to record my daily work progress.

My iMac is over on the second desk, now, where it seems a bit more at home. The keyboard and mouse even all fit into the little pull-out keyboard tray. The TV is on the middle sq-ft shelf of that desk, with the NES and a Sega Genesis arranged side-by-side up top, leaving the lower sq-ft shelf for storing games and a single pile of books that I plan to definitely read.



Wednesday, May 9, 2012

the indie gourmet: ramen & vegi soup

One thing that has gotten me into trouble in the past was spending way too much on food, particularly “healthy” food. For a while I was a real health nut. I was working out almost every day and religiously eating a healthy, balanced diet. This would cost me something like around $400 per month between all the fresh organic this & that, protein supplements, etc –  which is fine if that kind of money is rolling in easily, and there's no one else to support but oneself.

As an indie game developer in the “developing” category of “earning adequate monthly income”, corners have to be cut. Of course, it is best if these corners are not cut at the expense of one's health, without which one could not live (or make games for that matter).

I think it is an important part of being independent to be self-sufficient in all walks of life, and food, being one of those mandatory base-level needs, is one such thing.

The problem with eating healthy, though, is that a lot of the “healthy” food being peddled these days is way too expensive and/or too complicated to prepare for most people to eat on a consistent basis, and so I've noticed the tendency is for this inverse correlation between “convenient/cheap” and “healthy”, as well as “tasty” and “healthy” to emerge, which I don't see as a good thing for society on the whole.

Anyway, one question I occasionally hear or read floating around the indiesphere is what to eat, so I thought I'd share a few of these culinary shortcuts on this blog. The first and probably the simplest and cheapest of these is ramen and vegi soup.

I'll fix a bowl of this in the afternoon or late at night sometimes. It's not the most filling thing in the world, but it's enough to tide me over until dinner or bedtime, respectively.

Here's the recipe, in case you haven't already guessed:

1 pack of ramen noodles, with flavor packet
1 cup of frozen mixed vegetables
2 cups of water (preferably clean/filtered) [use whatever amount specified on ramen package]

Boil the water per directions, then add the frozen vegis with the water and continue cooking.

(Pro Tip: You can add other stuff to it too, like tofu, chicken, hot sauce, etc)

So, considering that ramen noodles go for something like $.50–$.75 per pack, and, last I checked, a 16C bag of frozen mixed vegetables is about $1, I'd say this is pretty cheap (<$1). The most expensive part might be the tofu, if added, which, depending on how tofu-friendly your area is, can be anywhere from $3–$4 a pound. I always get the high-protein tofu –  it is still much cheaper than meat and has almost as much protein. So, let's say we add 4oz of cubed tofu, that's $.75–$1.

So, $2 for a bowl with a serving of vegis, a serving of protein, and (debatably) a serving of carbs.

If you're watching your sodium, as I have to do sometimes, you may want to consider replacing the flavor pack with something with less sodium, maybe a low-sodium soy sauce or broth boullean cube.

Tuesday, May 8, 2012

daily blogging habit

I've started making more of an effort to blog daily after seeing a couple of people I know do it themselves for various self-development reasons and also reading in a couple of places that it can be useful for taking responsibility for one's own thoughts. Having just admitted yesterday (earlier today really) to blowing most of my weekend on playing Skyrim when I should have been working on my own game or at least playing some of the other Ludum Dare 23 submissions might be one example of this.

Because I'll be writing every day, and because blog posts are better when they form some kind of complete thought, I may jump around in topics from time to time. While I plan to mostly focus on video games and video game development, I am also at the moment studying various productivity techniques and philosophies, learning Perl. I may also at some point, probably at least a couple of months down the road, start reading The Art of Computer Programming and then The C++ Programming Language after that for what I would estimate would be something like a months-long computer science refresher.

I keep my reading habit to about 30–60 minutes in the morning, after breakfast, with coffee, and 30–60 minutes at night, just before bed, and after I've closed everything down for the day.

Some days, I might relate something from my reading that I thought was interesting, and some days I might just be talking about making games, and some days I might just talk about whatever game(s) I blew the day playing. I don't expect any one of these sub-topics to, on its own, form a complete blog on the topic, as I don't expect to be that completely focused on any one thing in my blogging. If this were to be all strung together into a book, it might be called The Diary of a Journeyman Game Programmer.

did i mention i play skyrim way more than i should?

I spent entirely too much time playing Skyrim yesterday and the day before. I built up this rather interesting assassin/thief character with the idea of minimizing actual combat while still being quite deadly. As usual with such a character, Sneak was a primary focus early in the game until it got maxed out around level 27 or so, at which point the focus has shifted more towards crafting skills, mainly alchemy and enchanting, as well as the more utilitarian thief skills like pickpocketing and lockpicking. The other main skill being used is Illusion magic, particularly the Fury spell, which is nicely useful for thinning out herds of powerful enemies. Calm is also good for getting the large wilderness creatures to just leave you alone - which honestly I think should, along with Fear, be built into the A.I. for when the player is obviously vastly more powerful.

The idea I had wanted to pursue with this is to see how a more stealth-action spin on the game plays out at the mid-higher levels. The character is something along the lines of what's called a "nightblade". My thinking with this one was to eventually go the whole nightingale route with the armor and ability and all that. Actually getting those is way too easy in the game - it's really just a matter of going through the thieves' guild questline. Actually playing the role of a nightingale is a somewhat different set of skills to be built up from the beginning.

So I started by just being generally sneaky everywhere, not being shy about stealing things, and preferring to use the Fury spell to get herds of enemies to kill each other rather than to engage them head-on. I took over Anise's Cabin early on in the game, which has this cellar that's great for crafting. I've been deliberately avoiding anything having to do with the main quest. Instead, I went through the Dark Brotherhood questline, and then went around collecting the Stones of Barenziah when I was done with that. It's really just been mainly a mix of Sneak, Illusion, as well as lots of potion, particularly poison crafting. Now the character is doing some work for the Thieve's Guild, cashing in on the Stones of Barenziah with the side jobs as well as the radiant quests from the Night Mother.

Crafting poisons as well as healing potions would really save my bacon in the rare battle where I'd be forced to fight an enemy head-on. After a while I started to get good at crafting invisibility potions, which, combined with a high sneak skill and the Assassin's Blade perk, is pretty much a battle-ender. I also found the Sanguine Rose to be very useful for unavoidable combat situations, especially in the draugr dungeons where both poisons and illusion magic are useless.

So the character is basically leveled up to what I'd call the "mid-game", around level 28-30, where there's at least one questline finished, one skill tree is pretty much mastered, and the character is starting to move up one or more other skill trees. For this character, it means shifting from a more purely assassin play style over to more of a traditional thief.

I have to say it was a bit of a hoot going through the Treasury House in Markarth picking everyone's pocket, "borrowing" those extra rings and necklaces they had on their persons, and then just sauntering up to the vault behind the front desk, crouchy-crouchy-no-one-can-see-me, and grabbing a whole bunch of silver ingots, leaving only an iron ingot because it wasn't worth carrying around and the gold, because there seems to be some kind of bug where stealing any amount of gold corrupts the rest of your gold and shows it as "stolen" in your inventory, although I haven't really had any guards take it when I'd pay off my bounty in a town.

Eventually, of course, it's all going to play out, and this will just be yet another playthrough of Skyrim with yet another character build. I guess I do find it interesting that it is possible to play the game from this variety of perspectives, even if the do for the most part converge into either killing things with a sword/axe/blunt object, killing things with magic, or killing things by sneaking up on them. Maybe the reason I found this character a bit more interesting is that being an assassin is really a bit more of an honest take on the gameplay itself, rather than try to befuddle it all up in all of this "honor" business. Sorry, I just don't empathize with computer data quite as much, no matter how beautifully rendered it is.

Sunday, May 6, 2012

making this fun again

I made a few tweaks and adjustments (read: ugly ass hacks) to the implementation I had for converting the 2D buffer format I created for storing generated maze data into actual objects that appear in the game. It looks like this part of the system is working fine now, but the mazes generated still seem like they could use some improvement.

For one, the algorithm itself assumes that we're generating a maze with a set starting point and ending point, which isn't really the case with this game. We just want something to navigate around that has some twists and turns and isn't just straight corridors all around. It does need to have plenty of alternative pathways to get from point A to point B, because we're really navigating to a set of randomly-determined points where macguffins will be placed.

The other thing, and perhaps if this alone were cleared up, then a more straightforward maze setup might even be interesting enough on its own, is that even if there were a start point and an end point, it would likely be impossible to navigate between them, probably due to some bug in my implementation. So working this out is going to be top priority. Once that's done, then we'll see about adding some things to collect and maybe revisit the idea of adding some AI-controlled things-to-avoid.

Saturday, May 5, 2012

a maze

For Ludum Dare 23, I decided to have another try at a game I had attempted to make early last year, in which you navigate a maze wrapped around a cube that rotates as you cross each edge so that the side you would wrap around to flips up to face the viewer. At the time, I had tried a few different solutions to the flipping-around problem, none of which worked at all, and usually involved the cube catapulting the player off into infinity.

In Patience, I ran into a similarly perplexing issue with rotating this cube-of-cubes around in 3D space and still maintain some kind of intelligible structure so that the game knows which cube you're pointing at with you touch the screen. The problem is really that the cube is rotating around in 3D space, and so the real positions of the various points on the surface of the cube are just all over the place and require a bit of 3D math to normalize everything into a neat and usable structure. So I decided to just make it all static - the cubes don't actually rotate or move around at all. It's really the camera orbiting around the cubes that's controlled by the touch-drag input.

So for Ludum Dare 23, in the spirit of making some kind of "tiny world" (the community selected theme), I thought "well, if I were to take a maze and make a sort of planet out of it, that might work." And making things that are normally round in real life into boxes and cubes seems like a fashionable thing to do in games. So I went and revisited the maze-on-a-cube idea, with this camera-orbiting-around-the-cube idea worked in.

I should mention that I only decided to do the maze idea after going through a few other ideas which I was just getting way too ambitious with. A maze with dots, i.e. pac man without the ghosts, but in 3D, seemed like the right combination of coolness and simplicity.

Even with this simplified concept, the edge-flipping mechanic still gave me a lot of trouble. I spent the majority of the time I had for the jam just getting this right. As usual, the solution turned out to be much simpler than the various attempts that preceded it. There's a concept of "face local space", and if you go beyond certain boundaries within this space, you're off the face, and you're moved onto the adjacent face. The rest is really just keeping track of which faces are adjacent to each other, rotating the player's world-space movement around, and slerping the camera over.

The overwhelming feedback I got from this was that it is too short, which struck me at first as a little ironic for a theme of "tiny world", but ok, point taken. So I started working on a way to randomly generate mazes that wrap around this cube, because the alternative to building this out into a more complete game would be to make lots and lots of maze levels, make a level editor, and so on. Generating the mazes, in the end, requires less manual effort per unique maze generated - and, given that some kind of a mapping is needed to generate the maze data anyway, it doesn't require much of a stretch to simply be able to serialize that data into a file format. The only other thing aside from that to build an editor into the game would be to add a mechanic similar to the one in Patience where tapping interacts with the cube (i.e. toggling a wall space on/off) and dragging moves the view around.

The editor might come later. There's also the matter of simply getting the serialized data in and out of the game and onto some kind of permanent storage, which on mobile devices is not quite as straightforward as it is on PC. There's usually some kind of cloud sync-y type stuff involved, which would be completely new territory for me as a developer at this point. Which would be cool, no doubt, and I'm sure that's something that we'll be seeing in neocade games at some point if not soon - so.. who knows. I haven't really thought about that much just yet. When I do it, I'd like to do it right.

Anyway. For the sake of making this a complete game experience that's worth a buck forty two, I'm working on a system for randomly generating the maze each time the game is played. This way, you're always getting a fresh thing to navigate around, and we don't have to go through all the pomp and circumstance of writing hundreds of levels. Just generate the mazes and be done with it. Pretty simple. Still thinking through whether it should still be 'collect all the noms to win' or just 'find your way to the exit'. Collecting stuff needs a somewhat more open labyrinth, rather than a maze with a definitive start and end point, which is what the maze generation algorithms I've looked at generally do. Modifying one of them to make a more open structure seems easy enough though (fingers crossed)

As I said before, the capabilities do exist for this to grow into something a little more user-editable, so if there's enough of a demand for such I thing, I will most definitely see what I can do.

Thursday, February 16, 2012

open world games are bad for my productivity

The past few months…could have gone a little better in terms of productivity. This game called Skyrim came out, and lots of people were talking about it, and so I thought I’d get a copy for myself and try it out. Well, 570 hours of play time later, and only 4/50 achievements still locked (gotta love Steam), I’ve managed to explore the play space quite a bit. I’ve tried out several different characters of varying races and skill tree builds and played through the game to varying degrees with each, noting the differences in game play between each one. Not a whole lot of progress as far as making games for neocade, though.

Still, if there is one thing to be learned from this, it’s that open worlds are absolutely fascinating to me. I love being able to explore the fantastic randomly generated worlds of Minecraft, and have to stop for a moment to marvel at the grand vistas within the world of Skyrim. Before these, though, I would be doing speed runs through Super Metroid, playing through and re-playing Zelda game after Zelda game, and living an alternate life as a master criminal in Grand Theft Auto 3.

Minecraft is particularly fascinating to me for a couple of reasons:
1) It’s able to generate entire three-dimensional worlds at runtime that are believable enough to warrant exploration.
2) The player is able to build a huge variety of things within this world.

The block selection UI element of Patience is somewhat inspired by Minecraft. It just seems like such an obvious way to do it that it would be silly not to interact with the blocks that way. Earlier prototypes of the game did involve building up a 3D form out of the blocks, but I couldn’t quite put a game around those. I’m seriously considering adding some kind of block form editor thingamajig as an update. I just want to be sure that it fits into the game.