DreamForever – A Biography Part 3

The Shawnee Days

There are certain areas of a person’s life that are naturally very full. When a lot of good things happen, or equally, when a lot of bad things happen in a short span of time. When a lot of friends are made and a lot of emotions are experienced and a lot of ambitions are aroused. When friends, game engineering, big ideas, mushroom hunting in the spring rains with your dad and learning C++ in depth all align. My experiences at Shawnee left a lasting impression on my being. I find myself thinking back on my Shawnee Days quite often, and I even have the occasional dream that I am hanging out with my peeps there. I met some amazingly talented people, made great friends, and was able to truly dive headlong into my passion for game engineering in a way that put DeVry to shame. It is one of those few times in my life, that, when I look back on, I think, “Man, I wish that wasn’t over yet.”

Shawnee also helped me discover how nice it is to have a group of people you can talk to. I don’t really share anything in common with my standard posse of friends (the ones I have been hanging with since fifth grade middle school) so our conversations and activities tend to be rather dull (or non-existent.) ‘Hanging out’ usually consists of surfing NetFlix for an hour looking for something to watch while the pizza we bought turns into this nasty cold thing. It feels really great when the people you are around are actually interested in the same thing. When a group shares a common interest the air really does have an electric feel (though it may be difficult to notice at 8:00 in the morning.) Not to say I don’t like my std::vector<friend> or occasionally enjoy their company, it’s just that Shawnee filled a gap in my friendship circle that I didn’t know I was missing until that point.*Translation for those who don’t get the C++ joke: “Standard group of friends”

You Gotta Love Shawnee's Spirit
This was posted on the bulletin board one day in the Game Engineering building. Stuff like this just made my day.

So, here I was in college… again. Most people go to college so they can advance or start a career. My goal was neither of those things. As detailed in DreamForever – A Biography Part 2, my reasoning for going back to college was to buy myself more time so I could finish Didgery. The wishful thinking was that Didgery, when completed, would at least be a mild success and allow me to pay the monthly loan bills while I worked on the next greatest thing. But Didgery was suffering from the curse of game development*, my deferment from DeVry was up, and I owed a credit card company an ungodly amount of money (due to using it to fund my last trimester of DeVry.) I needed to buy myself more time. College would stave off these bills and hopefully give me enough extra to pay down the credit card. Plus there was a chance I could get a college degree. That would be an added bonus. *Curse of Game Development : It ALWAYS takes longer to complete than anticipated.

It turns out that I was able to get enough loans to both pay my first semester’s tuition and pay off the dreaded credit card debt. What a relief! But suddenly I realized I had used all my funds to pay down an old debt. I needed money to survive now. CONSTANT STRESS!

I started searching around campus for something to hold me over. Minimum wage would be good enough. As long as it didn’t involve flipping burgers or operating a cash register I could live with it. To my merriment, I discovered a job posting on Shawnee’s website that could potentially pay much better than minimum wage. It was a programming job, an iPhone game development gig to be more precise, at a place called the Cyber Center. I didn’t know anything about iPhone game development, and I had no idea what the Cyber Center was. I immediately wrote and handed in a resume at the designated coordinates. As I waited to hear back I hastily whipped together a video portfolio consisting of Nut Harvest 360, QuadTrix, and Didgery, you know, just in case the slim chance so happened that I got called in for the interview.

Somehow I did.

I vividly recall how awkward the entire interviewing process was. Now keep in mind, job interviews are always awkward. You go someplace you know little about to talk to a stranger sitting on the other side of a large expensive desk about stuff that you may or may not understand while they generally look board or disinterested and you squirm because you suddenly developed a sudden case of gastroenteritis. I assumed the Cyber Center was some special place at Shawnee. You know, like the gym or the library, except with a lot of fancy high-end workstations, flashing neon lights, and nonstop electronica music. I also assumed the interview would be a one-on-one in some sort of office. But my suspicious were aroused as I neared the location of the ‘Cyber Center.’ It was room 254…in the business building. I stood outside the door, took a few deep breaths, and went in.

I found myself at the front of a regular classroom with students. I quickly scanned the thousand of blank faces for a hint of an authority figure. Nothing. I awkwardly sat down near the front of the room as everyone stared at me in silence. Moments passed. “Are you here for the interview?” someone finally asked. “Yeah…” It turns out the interview was a sort of group interview thing and that the authority figure had ‘temporally stepped out.’ We made SmallTalk while we waited for the figurehead to reenter the room. After what felt like forever (I swear time physically slows down to a crawl in stressful situations) he came in and the group interview began. It basically consisted of them playing my demo on an iMac and asking me questions about the games. After they saw the portfolio I was asked what type of game I would make for them. I felt like a novice. I had not prepared or even thought about this question at all. In a nanosecond of incomprehensible mental clarity I devised a sprawling ingeniously unique idea and took great pains to verbally explore this idea to my interrogators: “Something like a top-down shooter.”

“How much money do you want,” the head-honcho asked.

“I don’t know, two grand?”

“That’s too low. I’ll give you three.”

“Ok”

I now had a job.

Now I had to make an iPhone game over a period of four months using Unity 3D. I didn’t own an iPhone and I knew nothing about the Unity 3D game engine. So I bought an iPhone3GS from WalMart, locked myself into an overpriced two-year service contract, and ordered a Unity how-to book from Amazon. Before long I was hard at work. Life was pretty smooth at this point. I was making a little over $400 every two weeks. I was able to buy gas, and pay my bills. Oh, and I could eat lunch every once in a while too.

But I soon learned that the Cyber Center was…sort of a joke. I guess a better way of phrasing is that it was falling apart by the time I got there. From what I can gather, the cyber center really wasn’t much of a center. The ‘Cyber Center’ was really just an introductory networking class that hired students to work on small scale projects so the students could gain experience. All this ‘special project stuff’ happened between regular networking classes. This is great idea, but the whole thing felt enormously disorganized. I pretty much had no idea what I was doing or who I was working for the whole time I was there. I mean, was I making the game for the Cyber Center, for the school, or was I just paid to make a game for myself? I still don’t know the answer to this question.

Chips On Floor
A couple of Pentium Pro chips I found lying on the floor one day in the Cyber Center.

The Cyber Center operated on some sort of grant supplied by the government (the WIRED grant I believe) and some situation or the other caused funding to abruptly cease. I was constantly lead to believe that my pro iPhone edition of Unity was on the way (it takes the pro version of Unity in order to publish to the iPhone.) I never received the iPhone version. This meant one big big thing to me: I paid a ton of money for a phone I didn’t need and locked myself into an $80 monthly payment for naught. $80 may not seem like a lot of money if you have a solid job, but $80 is a massive burden if you are a college student with an unstable job and the best you are likely to make per hour is minimum wage.

A couple of good things did come out of those first four months at the Cyber Center though. Firstly, I learned how to use Unity and was able to build a simple top-down shooter called Project NERD.

Project NERD is a pretty simple game. The premise is that you are a disgruntled IT employee at a large firm. Everyone around you is an idiot and constantly asks of you stupid rudimentary things. The protagonist, Jim, eventually snaps and builds a deadly CD launcher to slay the idiots of the corporation before his IQ depletes to 0. Each level is an increasingly complex randomly generated maze of cubicles. You play until you die, or get bored, whichever comes first.

Project NERD isn’t my best project. Something about the Unity Editor took away from the enjoyment of building a game, and it reflects in the game itself. Perhaps it was because the Unity editor is not meant for 2D Game Development, so I was somewhat shoehorning my game design into the editor. But I think it was something else. Something about the design of Unity makes it difficult for me to use effectively. This caused me to consider the possibility that I am, at heart, much more of an engineer than a designer. I love building systems and seeing games built on those systems. That’s what I find intensely satisfying.  Using drag and drop to make a game? Not so much. But I would LOVE to build the underlying system by which a person could use drag and drop to make a game. Some interesting ideas were a brewin’.

The second good thing to come from those first four months at the Cyber Center was that I was offered a min-wage job as a ‘network manager’ and assistant to the professor who headed the Cyber Center. So, while I would not be making near the money, as least I would be making some money for the foreseeable future.

Pirate Party
Oh Cyber Center, you silly place!

 

CJ

CJ commented on my first Biography post and said he wanted to read the bit where our friendship started. Well, it isn’t all that grandiose, but here it is. We were on the top floor of the Game Engineering building taking a class on C programming. One day the computer I was using broke, so I moved to a new computer. That computer was sitting beside this talkative hyperactive kid. I soon learned that kid’s name was CJ. He immediately starting chatting to me, and, thanks to CJ’s social nature, we became fast friends. CJ and I work together almost alarmingly well, and we would soon go on to create some “pretty flipping cool” stuff.

 

Platforming Block and the Ragnarok Game Engine

PBTitle

 

 

 

 

 

 

 

 

 

 

 

 

One of the best ways for me to learn any new concept is to dive head deep. One of the first things we had to do at Shawnee was learn Python and PyGame. So I did the most natural thing for me: I set out to devise a Game Engine / Framework on top of PyGame that would allow me the ability to more easily build games. I called this framework the Ragnarok Game Engine.

One of the first games I wrote using Ragnarok is a game called Platforming Block. It was really more of a test than a game or assignment, but I found the frustratingly difficult level design rather enjoyable. There was also this bug I later discovered in which if you jumped off a ledge you could do a ‘late jump.’ Basically I forgot to set a variable when the player is falling to prevent him from jumping. I became fond of the idea, however, and decided to write some levels around this mechanic.

I really can’t recall perfectly how all of this played out, but I asked Greg ( and old friend of mine ) if he would be interested in helping me flesh out the idea. During spring break we took some time and built a full-fledged demo. I remember how great it all was, crafting tilemaps using nothing but a text editor and our raw wits.

Hard at work on Platforming Block
Greg and I hard at work on Platforming Block. Greg built the levels and handled the graphics. I did the programming.

We released Platforming Block and the Ragnarok Game Engine onto the pygame website to much fanfair. OK  not really, but some people did like the game quite a bit. Some dude enjoyed the game enough to make a multi-part let’s play video. I love watching through it and observing how he is gradually driven mad by the increasingly impossible levels. Gnarly stuff.

To date, Platforming Block as been downloaded 573 times, and the Ragnarok Game Engine (released under the GNU LESSER GENERAL PUBLIC LICENSE v3.0) has been downloaded 1675 times. I find it interesting that the engine, which is somewhat malformed and buggy, is a great deal more popular than the game. It just goes to show how many creators are out there. I would like, perhaps in the short feature, to springboard off the ideals contained in this engine to allow people to more easily create games. More on that bit in the future.

Anyway, the idea was that we were going to make an Xbox Live Indie Game out of it in the ‘near’ future and maybe make a few bucks. That…didn’t happen. We started (about a year later) and actually got a number of levels built using an XNA game engine I created called PixelBurst. We got quite a bit of the core stuff finished. I built a custom Content Importer in XNA to read in the Tiled .xml format, I added in pixel-perfect collision detection, and I added in a bunch of dynamic objects that make the game ever so cool. Even in its half-finished state I find the game fairly interesting. Over time, though, Greg seemingly lost interest and developed a differing vision for the game than what we originally started with… so naturally things sort of fell apart.

We occasionally go through small spurts where we both talk about it, but nothing ever gets done. Perhaps it is a combination of lack of free time, or the fact that we don’t work well together. I would work on it and finish it myself, but there is this odd drudgery feeling that I ‘share’ the idea with someone else and I should wait until he really wants to work on it. Perhaps one day soon I’ll just stop giving a care and finish it myself.

One of the fun things about Ragnarok is that it prompted CJ to develop a rival game engine in PyGame. I can’t remember what the thing was called, but it sounded cool, and I love competition (to be precise, I love crushing it.) We had a friendly battle where we would boast the amazing features of each of our engines in an attempt to belittle the other one. It was a lot of good fun. He later created this fun game using his engine that I still remember as “Chicken Run.” It was a top-down car game where you try and run over as many chickens as possible. It was some good material. It would be nice to see an HTML5 version of this game so that I can play it all day, every day.

 

Finishing Didgery

So summer break finally arrived. I opened up Didgery’s 2008 Visual Studio solution and stared blankly at all the unfamiliar code in front of me. I figured this would happen. I’m not sure how many people reading this have worked on a large project, stopped temporally for some reason, and then resumed, but it’s pretty terrible. When a lot of time passes (or even a few weeks) the mind somehow depersonalizes itself away from the thing that was once so personal. When you go back to it you are like, “Nope.avi

The Terrible Experience of Returning to an Old Project
Wut?

I took a few days to remarry the project. It was all confusing and didn’t make sense for a while, but gradually it came to me, and I was, after a week or two, finally back in the groove somewhat. I worked my butt off that summer break. I discovered that adding polish to a game is the most challenging and tiring part of the development cycle. You go over this area over and over and over, tweaking shaders, adding in spring physics, and adjusting sound volume and texture color. In the end everything looks and feels great, except for the guy who put all the work into it. The amount of time it takes to get one thing looking great is unimaginably draining. But hey, I thought, it will always be worth it in the end.

So here I was a couple weeks before school resumed, and Didgery still wasn’t finished. Most of it was there, but it felt to be missing some bits and pieces. The tutorial code was an absolute nightmarish swap of spaghetti code, and the game felt to be lacking something.

There is some sort of divine, mystical, and equally malign rule in the universe, and that rule is this: The closer you get to achieving something, the harder it becomes to achieve. This can be seen in the physical universe as well. Take the speed of light for instance. For every bit closer to get, that bit more is exerted against you to prevent you from reaching that magical speed. So keep this in mind friends, though you may get very very close to your vision and goals, you will never actually meet them.

I somehow was able to do a total rewrite of the tutorial code and create something elegant and easy to use. I also added in the Didgery Summon and parchments. Yes, this was during the last couple weeks of development. How I did it I honestly don’t know. I think good stress (you know, the type where it’s like “I have to get this done or I am f*cked”) really creates a sort of pressure cooker on the mind, and all the good stuff comes out at once.

By the time school was resuming I was just finishing up. Now all I had to do was show it to a couple old friends to get their opinion, push it to the indie channel for review, and write a mass amount of review requests to indie game review sites. Then I could use all the money that would hopefully flow from it to quite college and begin developing my next game.

So I invited Greg (the fellow that helped me create the Platforming Block Demo) over to get his opinion.

It's Kinda Boring
It’s Kinda Boring

He played it in silence for a long time. Finally I asked, “So…what do you think.” There was a moment of silence before the truth came. “It’s kinda boring.” I’m not going to water things down here, hearing that made me feel like shit. I put every ounce of my being and intellect into this game and its boring!? As hard as it was to take, I appreciated his honesty. It’s not often that someone will actually tell the truth to your face. This fellow did. I just hoped to dear god that other people failed to share his opinion.

I invited Leo over to give it a shot, and he enjoyed it greatly. “Oh no,” I thought, “it’s going to be one of those niche games.”

 

Failure

It took about a month to get the game through review. But on 9/22/2010 Didgery was released onto the indie games channel. I skipped classes that day and starting sending out review requests to various indie outlets.

Didgery on Indie Games Channel

The next day I wrote Didgery’s website on the whiteboard of my (I think) DirectX class to hopefully garner some attention to the game. CJ, like the jerk he can be, went to erase it. I naturally attempted to prevent him from doing so. I can’t really remember how things worked out, but It eventually led to him yelling at the room and telling them all to go to my website. That was honestly the most effective thing that could have happened. The class immediately went to the website. They were all starting intently at their computer screens and commenting/jiving on the card explosions. It was fun.

But I wouldn’t be feeling good for very long…

I remember the absolute dismay that overcame me when I saw Didgery’s miserable sale figures several days later. Didgery was supposed to be my ticket to future game development. I was hoping for at least a couple grand, but what I got was ten times lower than that. Chump change. Maybe gas money for a month or a car payment. My parents had been pulling my car payment for several months at this point as the Cyber Center job simply wasn’t cutting enough revenue. I gave the money to them. I was supposed to make enough to keep me afloat for a few months while I developed other games. But no, that wasn’t going to happen.

Keep in mind that launch sales are typically the most money you will make at once from a game, especially on the Xbox Indie Channel. If $300 was my launch sales, then I would be lucky to make $10 a month a couple months from launch.

It had all failed. My goals and dreams had been shoved in the gutter. I felt terrible. In absolute despair I drove to subway, bought a veggie sub with what few dollars I had at the time, and drove to Jackson Lake. I sat under an old shelter house and ate my sub in the cold November wind as I broke down mentally. What was I going to do now?

 

Shawnee 8.0 Conference

Somehow or the other I learned that Shawnee hosted a local video gaming conference in October of every year. You can tell by the number of followers that the twitter account has that this conference is rather small scale, but it would be a useful learning experience and I thought that it might even raise awareness for Didgery. It would be my first ever video game conference, and the first time ever that I would be on the ‘Otherside’ of the table.

My ‘old’ friend Leo went with me as a support. It was nice to have someone to talk to and sit beside that I was familiar with.

I really wanted to buy a banner to help pull the few attendees that we there towards our table, but I didn’t have enough money. I actually had go into the negative on my bank account just to buy a cheap Altec Lansing speakers set so people could play Didgery with sound (bringing my 5.1 surround sound system from home would have been impractical.) Plus I was planning on running Didgery from the Xbox, and the 5.1 speakers don’t connect to it. So yeah, I didn’t really have the necessary hardware or funds to make things work as well as they could have, but hey, sometimes you just have to use what you got.

The morning held in it that sort of pervasive autumn chill. I picked up my buddy and drove down to Portsmouth. I wanted to run the game on the Xbox 360 as it was the most/only stable build, but when we got down there we found out that they didn’t have any Ethernet ports for us to plug into. Running indie games from the Xbox requires an internet connection for authorization purposes. I was nervous about using my PC, but I didn’t have much of a choice.

So I sat the thing up and hoped nothing massively terrible happened. Besides a few bugs/crashes things went pretty well.

I recall some EA guy (proper business suite and all) coming over to our table and checking out Didgery. He seemed interested. He looked at it while Leo put on a demo for him. “So tell me about your game,” he said. I did my best to explain what was happening without sounding like a self-conceited idiot. “Do you think it could be profitable?” he asked after some time. I shrugged my shoulders. “I have it on the Xbox Live Indie channel right now. It’s not doing all that well, but I think the market is more on the PC side of things. I think it could do pretty well on the PC.” He looked at it for another minute or so and walked off. I never saw him again.

My favorite part was when some dude sat down and played Didgery for over an hour. He was seriously into it. There was this one moment when he got a column chain. In Didgery if you get a full column or row in a chain it will perform this special type of explosion on the entire column. He was going about his business making chains when he got one of these column chains. I could tell that he wasn’t expecting anything special. But suddenly there was this explosion. He shot his head back, his eyes widened, and a smile that said, “Oh my god that was cool” appeared on his face. I’m not going to lie here, seeing that reaction made me feel awesome.

He got really far to. I think he made it to level 38 or something impressive like that. He also discovered a bug just as he was about to stop playing.

Didgery Error At Shawnee Conference
Didgery Error At Shawnee Conference

We talked for short bit about the game. He said that it reminded him of chess, which made me feel good. There are at least a few people out there that ‘get’ Didgery. As I feared, Didgery turned out to be a niche game. Better than a total failure though.

I had a lot of fun at that small conference. To be honest though, it feels somewhat unreal and dreamy. I may not have made much money from Didgery, but I was doing what I really wanted to be doing. I was truly pursing my goals. I get a fond feeling when I recall that time of my life. It’s the feeling of staying up late working on a project you love while the fan in your window pulls in the chilly night air. The burdens of society have since stymied the privilege I once had to dream forever. After Didgery it was all playing it safe: working for other people to make a living. Didgery was my ticket to follow my dreams, and that ticket lead to the wrong train.

I think I have written enough for part three. Until next time.

The Mona Lisa

 

 

 

 

The MeadowLark

Light streamed through the stained glass of the old Baptist church. The preacher paced the pulpit, furiously delivering the word to an empty congregation. His message contained various references to Armageddon, which may have already happened.

The church sat in a lot surrounded by dusty hills and plateaus. Only government agents walked the few sidewalks that remained visible above the endless dust. Many carry body bags that house the freshly killed. Three or so children play Russian Roulette over by that old house. Police stand by the exit, guarding them from leaving.

Drug Lords sign the official documentation and then overdose themselves with that ancient drug. Their weeping family watch helplessly nearby.

Blood trickles down the few steps that leads up to the pulpit. The preacher, lying on the stained carpet, alive with death, looks into the face of The Living God. The body would lie there, until The MeadowLark sang again.

DreamForever – A Biography Part 2

It was a decade ago this day.

I find it utterly paradoxical how one can be so far removed from a point in time physically, yet the memories in ones mind always feel startlingly recent. It is as if the mind is a natural paradise free from the swift river of time.

Part 1 of the DreamForever Biography (which was somehow written over a year ago) describes my first ever experience with game development in the form of a simple game engine called RPG Toolkit. I loved that engine. It was fun. It was easy. It was stress relieving. I began using it exactly ten years ago this day.

The Log of My Life, a nearly 400 page day-by-day self-documentary  experiment that I began writing a little over a decade ago has only this to say:

Praise the Lord, my dad got home today. I got RPG Toolkit yesterday, thanks to Brian’s dad. Brian also came out. -11/17/02

My dad had been in the hospital with serious, very life-threatening, health issues. It was nice to have something to sink my mind into, to help me forget all the spiritual/financial/health/marital troubles my family was going through at the time. I recall rushing home from the school bus just so I could spend the remainder of the evening absorbed in game development. Game Development was a solace in my very tumultuous life.

Part 1 of the DreamForever Biography left off at NutHarvest 360. I think it is time for part 2.

Didgery

“Life is a series of weighty obligations.” – William D. Trooper

If there is one thing that is fairly certain about college, it is debt; lots of it. You may not graduate much smarter or with a useful portfolio, but you will likely leave with mountains and mountains of debt.

True fact: debt creates an enormous amount of stress. I know this from a very first-hand perspective.

I needed money, and I needed it badly. I had dropped out of college twice already: once from Devry in Columbus and again from Devry Online. The grace periods on my loans were quickly running out. My parents themselves were encumbered with debt, and I would have been damned to add twenty some thousand more on their shoulders. QuadTrix was developed simply for practice, and I didn’t have the time to build proper tools to finish Nut Harvest 360. I needed to build something that didn’t require development of a complicated toolset. I needed quick money.

In a cool panic I sat on my hardwood floor with a pencil, an ancient notebook, and an equally ancient deck of cards. Didgery, or as I named it at the time, “Card Game”, was born.

The Beginning of Didgery

 

Didgery’s Unique and Perhaps Questionable Game Mechanic at Top Margin. “Idea: The longer you play, the tighter the rules become.” This would later evolve into the progressive struggle for elemental balance.

 

I wrote a lot of ideas that night and in the days following it. This old high school era notebook, which is sitting before me now, must have at least thirty pages of detailed notes. I was serious about making this work. I had to make it work.

One of the Earliest Builds of Didgery
I always develop the menu interface before I start work on a game. It helps me discover the game’s style.

Even though I had the game mechanics fairly well-grounded, I was quarreling with myself over Didgery’s visual style. Didgery actually had nothing to do with harmony or elements whatsoever until very very late in the development cycle. In fact, I was preparing to release Didgery without this harmony element at all. So…what was Didgery about?

A Month Or Two Of Development

 

Exactly One Month Later

 

Didgery, in the state presented here, was centered around the concept of Debt/Credit. Each card held a monetary value. The bigger the chain, the more money you earned. Due to interest (presumably from some debt you owed), however, you were always losing money, forcing the player to constantly create chains to avoid bankruptcy. This interest rate grew as the game progressed, which caused the game to become increasingly fast-paced and difficult. Didgery always ends with the player losing. It was meant, and still is meant, to be a deeply pessimistic game; a reflection of my emotions at that time.

The Main Menu During the “Dizzy Style” Era

The style seemed to be at odds with itself. On one end there was a disembodied hand on the menu screen with deep choir vocals, while on the other hand there was a floating money-bag that you tossed cards into to escape the ever encroaching interest rates. None of it made sense. I knew there was a problem, and I knew there was an underlying theme trying to rise to perfection, but I just couldn’t think of the ‘word’ of the theme. It felt like my mind was actively trying to hide the ‘name’ of this theme when I tried to search it out.

And I was going to release it this way. At this point in my life I was receiving notices that the grace period on my loans were ending ‘for realz.’ Add to this the fact that I had a collection agency breathing down my neck because I paid my last semester of Devry Online using a Credit Card (due to my inability to receive enough funding in the form of loans), and you might be able to understand how dreadful everything felt. It was like my spirit was knotted up and dying.

And then it happened. One of the reviewers over at the XNA Forums mentioned that Didgery felt very Zen like. Suddenly, it clicked, and I saw Didgery for what it could be. I couldn’t bring myself to release Didgery in its currently confused infancy, not now. In only a couple of weeks I removed the money bag and replaced it with something that made much more sense.

The Elements of Harmony

Didgery shifted its concept from debit/credit to balance. Interest rates were replaced with a villain, a mysterious dark presence that gradually consumed the elemental energies. The goal was now to feed the elements with energy from the cards and keep the world from descending into hell for as long as possible. There is still no win state. No matter how long you stave off the evil, it will eventually overcome your efforts. This is one of the most questionable parts of the game, and it is my favorite.

Thanks to the playtesters on the XNA forum, I was able to really pull the style of Didgery together in about a months time, and I think it really paid off. Unfortunately, it didn’t pay off my loans… You see, these changes and additional polish were pushing the release date back further and further.

The quickie project that I decided to work on to make some “seriously necessary cash” was quickly turning into a many-month serious project. I got my first loan bill in the mail, and I had no money. I had to do something. A friend of mine (Mr. Frazier) informed me that a college nearby (Shawnee State University) offered game programming classes. Why had I never heard of this? I considered the possibility and the alternatives. I could either attempt to get a well-paying job with no portfolio within a couple weeks, or I could literally buy myself more time by going deeper into debt. The latter option was the only one that seemed feasible, but attending college again presented a real threat to Didgery: how could I finish the game if all my time was spent in school?

I think that is a pretty good place for me to stop at for tonight. Keep an eye out for Part 3!

 

Getting Ambient Lighting to ‘Look Right’ Pt. 1

Many introductory graphics books present the standard lighting equation as I = Ambient + Specular + Diffuse, where Ambient = MaterialAmbientColor * LightAmbientColor. While this does give you a great deal of control on how to color the mesh, I have found that, more often than not, it causes the mesh to have a washed out appearance if the AmbientColor is not equal to the DiffuseColor of the mesh. I have found that a simplified equation looks much better in practice (at least in simple scenarios.) Instead of providing a MaterialAmbientColor and a LightAmbientColor, instead provide a single floating point value that represents the intensity of the Ambient component. Multiply this intensity by the DiffuseColor of the mesh, and add the resulting vector back into the color value.

 

Let us compare the differences in these equations. The image below uses the standard lighting equation with a white ambient light and a white ambient material color. Notice how the image appears to be washed out.

 

The next image uses the simplified ambient lighting model. The image, at least in my opinion, appears much more natural.

 

Notice that we can get image 1 to look like image 2 by forcing the AmbientMaterialColor to be equal to the diffuse color of the mesh. This is more or less what the simplified equation does.

 

It is worth noting that both of these ambient models share a caveat  If a texture is used to supply the diffuse color to the mesh, and that texture has areas of total black in it, than the ambient lighting intensity term will always evaluate to 0, which will result in no ambient light being added to the model for those black areas.

How to Save and Restore Aero Snap in Windows 7

It is a common task for many applications to remember their window state when it is shut down. This allows the application to restore to the same location, at the same size, on the same screen, when the user launches the application again. This task is most commonly, and robustly, handled via use of the Win32 GetWindowPlacement and SetWindowPlacement functions. These functions take care of all the details and fringe cases (such as what happens if the window was on a second monitor when the app was closed, the second monitor disconnected, and the application started again.) There is one major quirk to these functions, however: they do not take into account Window 7’s Aero Snap feature. In fact, quitting an application while Aero Snap is applied will cause the previous non-snapped coordinates to be used. This creates non-seamless behavior and may confuse the end user.

So, how can we get around this?

Ideally we would use some sort of Win32 API to restore the snap state…unfortunately there is no such API (to my knowledge.) The technique I ended up using goes something like this:

  • Call GetWindowPlacement on the window, keeping in mind that the window’s previous, non-snapped, position and size is retrieved if we are in a snapped state.
  • Call the Win32 function GetWindowRect to get the current bounds of the window.
  • Compare the rectangle of GetWindowPlacement to the form’s current bounds. If they are equal than we must not be in the snapped state. If they are unequal, however, then we must be snapped, and we should replace the rcNormalPosition rectangle of the WindowPlacement struct with the size of the window.

Here is how it may be done in C#:

[csharp]
public void SaveWindowState(IntPtr hwnd)
{
WindowPlacement placement;
placement.length = Marshal.SizeOf(placement);
GetWindowPlacement(hwnd, out placement);

//GetWindowsPlacementStatus does not take into account AeroSnap, which
//causes our applications to load at the incorrect location if it is used.
//To get around this we compare the form’s bounds against its placement bounds.
//If they are different than Areo Snap is in place and we should use the
//form’s bounds instead.
NativeRect formsBounds;
GetWindowRect(hwnd, out formsBounds);

if (formsBounds.bottom != placement.rcNormalPosition.bottom
|| formsBounds.left != placement.rcNormalPosition.left
|| formsBounds.top != placement.rcNormalPosition.top
|| formsBounds.right != placement.rcNormalPosition.right)
{
placement.rcNormalPosition = formsBounds;
}

//TODO: Save out the placement struct here.
}
[/csharp]

The proper bounds should now always be stored, even if the window is snapped onto the screen somewhere. Consistency FTW!

Unity’s “JavaScript” is just a .NET Language in Disguise

When developing in Unity one may come across the need to communicate between two pieces of code written in different languages. A good example is having one script (written in say JavaScript) invoke a callback function in another script (written in C#.) This is actually fairly easy to do…once we realize that Unity’s ‘JavaScript’ (a.k.a UnityScript) is not at all the standardized ECMAScript used for web development. It is best to think of Unity’s implementation of JavaScript as a .Net language such as C#, Iron Python, or C++.net. It operates on the CLR as any other .Net language.

So…if UnityScript is really just another .NET language, do we have access to the base class library? Yes, we do! Performing callbacks between C# and UnityScript now becomes trivial*, as we can use base class delegate types such as System.Action or System.Action<> to act as a common type of both scripts. Better yet, UnityScript’s anon functions can be implicitly converted to System.Action types. Take this example below:

[csharp]
using UnityEngine;
using System.Collections;

public class CSharpScript : MonoBehaviour
{
public JavaScriptClass jsClass;

// Use this for initialization
void Start ()
{
jsClass.functionFinishedCallback = Callback;
jsClass.PerformLongRunningAction();
}

private void Callback()
{
Debug.Log(“This function called from C#”);
}
}
[/csharp]

 

And now the UnityScript:

[javascript]
#pragma strict

var functionFinishedCallback : System.Action;
function PerformLongRunningAction()
{
Debug.Log(“This function called from UnityScript”);
yield WaitForSeconds(2);
if(functionFinishedCallback != null)
functionFinishedCallback();
}
[/javascript]

*There is one additional trick to this whole endeavor. The C# script will not be able to see any UnityScripts unless the UnityScripts are compiled first. This means that we must place all our UnityScripts that will be seen by C# into a folder that gets compiled before our C# code does. Note that if our UnityScript code referenced a C# script instead than this process would be reversed, requiring the Javascript classes to be compiled first. It’s best not to think about a UnityScript object referencing a C# object that references another UnityScript object, things could get ugly!

But this is just the start. We can use System.Collections.Hashtable or System.Collections.Generic.List. or any other type that is exposed in the base class library. A couple important things to note however:

  • Events are depressingly absent. You can mimic their behavior somewhat by storing a System.Collections.List of System.Action’s and exposing Hook, Unhook, and Invoke methods, but it isn’t quite the same. That’s a bunch of Hong Kong Phooey right there.
  • Remember the C++ C98 standard that had trouble with nested template tags, requiring you to put a space after each > so that the compiler would not interpret it as (operator >>)? Well, UnityScript appears to have the same issue. Just add in the extra space and all should be well. Ex:
    [javascript]
    var thisWillFail : System.Collections.Generic.Dictionary.>;
    var thisIsOK : System.Collections.Generic.Dictionary. >;
    [/javascript]

A Case Against a Loving God

As I sit on my patio this evening and watch the lowing sun stream through the trees and paint the yard a yellow-green, it is difficult for me to feel any great animosity towards the powers that be. It is within this singular moment that everything feels at peace with itself. The leaves rustle to the gentle cadence of the breeze, and the wild birds, distant and near, play their continuous song in unbroken bliss. There is not a one thing out-of-place in the natural order in this singular moment, indeed, the illusion is so great that it is easy to believe that God built everything from the foundation of love.

There has been a gradual realization within my inner self as of late, one that it so simple and sublime I scarcely understand why the idea had not before entered my mind. I used to believe that the Holy Bible, the incorruptible word of God, if you will, was the means by which we could, in some small way, understand God. I realize now, that it is not truly possible, or perhaps even recommendable, to understand God from a corruptible book built from human hands. For indeed, any Holy Book can be misconstrued to meet the agenda of people, civilizations, and organizations. The best way to understand God is to move past religion and look upon the creation itself. It is then that we can scrutinize the intent of the true God, instead of whatever God we were taught to believe in via religion.

What do we see when we look upon the creation? Do we see pure love, or do we see life fought with struggle and agony? Do we see pure fairness and equality, or do we see deception and death? In the natural order, does one life live without taking the life of another? In the natural order, does one life live without struggle, or is struggle what allows one to live? It’s interesting, because I see minute traces of the good in the natural order, but it is saturated with the negative. If a loving God (whoever that might ultimately be) did create the universe, then why did he not saturate the order with the good, and have but traces of the evil? Indeed, all life seems to be constructed to cause agony to some other life form.

I am left with the logical conclusion that God is, at best, overwhelmingly indifferent. What is your conclusion?

The Discrete Identity of Sin and the Universal Law of Good and Evil

It is truly disquieting what beliefs one naturally inherits and accepts from a group assembly. Equally troubling is with what ease our minds can be molded from birth by religious doctrine to seek not out God, but rather, vicariously accept external belief on what the nature of this grand being is. Many churches, it seems, are more of a place where one goes to hear a cliché message of what God is like (usually these messages involve love, care, kindness, forgiveness, etc.), rather than a place one goes to truly seek out the nature of God. Hardly does there exist an assembly that truly presses its congregation not to accept what they have been taught, but to read the Bible free from the heavy chains of religion and discover the nature of God for themselves. When one does this, it becomes apparent that there is a gaping hole between the actual God of the Bible, and the God that many profess to know.

Several months ago I began a Biblical journey with the express intent of realizing, if even but in the smallest of degrees, the truest nature and personality of God.  As I was reading and rereading the first chapters of Genesis in late December and early January, I was struck with a profound concept regarding sin and the knowledge of good and evil (at least in the way I traditionally see the concept viewed.) For most of my life I assumed that sin and evil were identical concepts. Indeed, Christians often speak of sin as representing a grave misdeed, that is, evil.  I was pondering over verses seven through eleven of Genesis chapter three, however, when I suddenly realized this not to be the case.

And the eyes of them both were opened, and they knew that they were naked; and they sewed fig leaves together, and made themselves aprons. And they heard the voice of the LORD God walking in the garden in the cool of the day: and Adam and his wife hid themselves from the presence of the LORD God amongst the trees of the garden. And the LORD God called unto Adam, and said unto him, Where art thou? And he said, I heard thy voice in the garden, and I was afraid, because I was naked; and I hid myself. And he said, Who told thee that thou wast naked? Hast thou eaten of the tree, whereof I commanded thee that thou shouldest not eat?” [Genesis 3:7-11]

Note that Adam and Eve were in a perpetual state of evil (that of being naked) since the beginning of their existence, but God cared not of this matter. God cared only that they held his singular commandment (to eat not of the tree of knowledge of good and evil) in perfect order.  This fact, then, heavily suggests that sin, and knowledge of good and evil, are disparate concepts. Furthermore, God seems to show some anxiety after learning of the ascended state of his creation:

“And the Lord God said, Behold, the man is become as one of us, to know good and evil: and now, lest he put forth his hand, and take also of the tree of life, and eat, and live for ever: Therefore the LORD God sent him from the garden of Eden, to till the ground from whence he was taken. So he drove out the man; and he placed at the east of the garden of Eden Cherubims, and a flaming sword which turned every way, to keep the way of the tree of life.” [Genesis 3 : 22 – 24]

The fundamental drive behind God’s anxiety may share a common root to a great fear that plagues humanity: the fear, or perhaps resentment, of judgment.  For, if we assume at the moment that the concept of good/evil and sin are disparate to one another, would not the ability to discern good, and the ability to recognize evil, then allow man to place under scrutiny God’s actions? And would not the ability to recognize good from evil allow man to compare God’s commandments against these universal laws? Or perhaps God is troubled that man is now two thirds a true god. Man is at this moment immortal and knowledgeable of the Law of Good and Evil. The only grand ability lacking between humanity and God at this point in time is great power, and that is something that, given enough time, might have been obtainable. It was necessary for God to impose mortality upon his creation to keep the scales balanced, or rather, to prevent them from tipping too much in our favor.

If man now has the ability to judge good from evil themselves, then what is sin? It is obvious that sin isn’t some sort of barrier to keep man from doing evil, as God would have commanded Adam and Eve to be clothed. We can deduce from Genesis 3:11 that to sin is to break a commandment of God, or to go against his will. It is possible, when seen from this viewpoint, to do good, but still commit sin. And it is possible, from this viewpoint, to follow God’s commandments, but still commit acts of evil.

This then, brings us to a moral dilemma. If God commanded us to perform an act of great evil, what would one do? To not follow God’s evil request would cause us to disobey (or sin against) God, and therefore invoke his wrath, but to follow his command would perhaps break an even greater law, one that the all-mighty himself may be subject to: The Law of Good and Evil. The ‘traditional’ and ‘religious-taught’ Christian likely will say at this moment that God is incapable of sin, and thus would never ask a person to commit an evil act. I must remind the one thinking this that they are but confusing two different concepts. It is indeed logically impossible for God to sin, for how can God go against his own will? It is very much possible, however, for God to commit evil acts, and the Holy Word is filled with instances of him doing so. One of the more fascinating, and troubling, cases is in Numbers 14.

The story in Numbers 14 takes place several years after God had wrenched the Israelis free from Egypt’s iron grip. They had all left their slavery (and everything they had ever known) on God’s express promise that he would bring them into a much better place, a place ‘flowing with milk and honey’ [Exodus 3:8].  God had already shown himself to be a very demanding and demeaning entity during this journey by murdering, on several accounts, thousands of Israelis. There were even times when God appeared to play games of life and death with Israel, granting them food that they deeply desired, and then killing them while they ate.

“And there went forth a wind from the LORD, and brought quails from the sea, and let them fall by the camp, as it were a day’s journey on this side, and as it were a day’s journey on the other side, round about the camp, and as it were two cubits high upon the face of the earth. And the people stood up all that day, and all that night, and all the next day, and they gathered the quails: he that gathered least gathered ten homers: and they spread them all abroad for themselves round about the camp. And while the flesh was yet between their teeth, ere it was chewed, the wrath of the LORD was kindled against the people, and the LORD smote the people with a very great plague.” [Numbers 11:31-33]

I can in some ways empathize with God’s anger towards Israel. The Israelis had proven to be a distrustful group who were not at all shy to vent their frustrations and worries, and they did so on numerous occasion leading up to this moment. The incessant whining of a people you were trying to help would undoubtly become irksome, but I can’t help but think that God is, in part, to blame for their discomfort in the first place. There were numerous times (see Exodus 15:23, Exodus 16:1, Exodus 17:1) in which God led them into bleak scenarios and failed to provide basic needs for the multitude until they were angrily complaining about their lack of welfare.  Had he met their needs, or communicated before the journey what sort of hardships they were to face, then the whining would have likely been much less prevalent. Now that we understand the state of Israel (that of being hungry, thirsty, and terrified of a seemingly unjust entity with great power) let us move on to Numbers 14.

This chapter takes place right after God had commanded Moses to send scouts into Canaan. After searching the land for forty days they returned with grim news:

“And they told him, and said, We came to the land where you sent us, and surely it flows with milk and honey; and this is the fruit of it. Nevertheless the people be strong that dwell in the land, and the cities are walled, and very great… And Caleb stilled the people before Moses, and said, Let us go up at once, and possess it; for we are well able to overcome it. But the men that went up with him said, We be not able to go up against the people; for they are stronger than we… The land, through which we have gone to search it, is a land that eats up the inhabitants thereof; and all the people that we saw in it are men of a great stature. And there we saw the giants, the sons of Anak, which come of the giants: and we were in our own sight as grasshoppers, and so we were in their sight.” [Numbers 13:27 – 33]

At this news Israel beings grumbling, going as far as to wish that they would have died in the wilderness or in Egypt than to be consumed by the giants living in the land:

“And all the congregation lifted up their voice, and cried; and the people wept that night. And all the children of Israel murmured against Moses and against Aaron: and the whole congregation said to them, Would God that we had died in the land of Egypt! or would God we had died in this wilderness! And why has the LORD brought us to this land, to fall by the sword, that our wives and our children should be a prey? were it not better for us to return into Egypt?” [Numbers 14:1 – 3]

Israel’s complaining irritated God with such degree that he was on the verge of murdering the entire congregation. It actually took a human figure, Moses, to keep God’s morality in line. But even after God granted Israel a pardon his rage wasn’t fully quenched, and he spoke a troubling message to Moses:

“Say to them, As truly as I live, said the LORD, as you have spoken in my ears, so will I do to you: Your carcasses shall fall in this wilderness; and all that were numbered of you, according to your whole number, from twenty years old and upward which have murmured against me. Doubtless you shall not come into the land, concerning which I swore to make you dwell therein, save Caleb the son of Jephunneh, and Joshua the son of Nun. But your little ones, which you said should be a prey, them will I bring in, and they shall know the land which you have despised. But as for you, your carcasses, they shall fall in this wilderness. And your children shall wander in the wilderness forty years, and bear your prostitutions, until your carcasses be wasted in the wilderness. After the number of the days in which you searched the land, even forty days, each day for a year, shall you bear your iniquities, even forty years, and you shall know my breach of promise.” [Numbers 14: 28 – 34]

Read the last sentence again:  After the number of the days in which you searched the land, even forty days, each day for a year, shall you bear your iniquities, even forty years,  and ye shall know my breach of promise.” God broke the promise he made with Israel in Exodus 3:8. He had promised the entire assembly that he would bring them into a land flowing with milk and honey if they would follow him. But what happens when they get there? That’s right, God nullifies the promise he made. This knowledge profoundly alters my view of God, for I have been taught since my upbringing that God cannot lie or break his promises. The Old Testament, much to my dismay, stoically disagrees with this viewpoint. I must make clear, though, that God was actually answering the cry of Israel, for did not they wish to have died in the wilderness (Numbers 14 : 2)?

That was a rather lengthy delve, but it was necessary to make clear God’s capability for committing acts of evil, and our ability to judge those acts. Keep in mind that there are many more instances in the Bible that support these points, but it would take far too long to mention every one (or even just a few!) It’s interesting really…the more I read the Holy Bible for myself the more I discover that the nature of God is much less ‘godlike’ than what people generally profess (and what I used to believe may I add.)  The Bible is indeed an interesting book…

I’m always up for some philosophical debate, so hit me up in the comments section below if you are in the mood.

The Riddle of Life

The contingencies present in the post-modern era constitute a means by which a man must constrain himself to unrealistic achievement.

 

The disdain of life is often what brings to arousal the action to sustain the cause of the disdain.

 

Thought is but a metamorphosis of the actions behind the divine; to discover the underlying well is to break free from the chains.

 

The bondage of the slave is a facet engraved into the systematic procedures commandeering the layman ways, for these surface into an imaginary cause by which we redeem ourselves, and bring into condemnation those admonishments of the wise.

 

The whole are mightier than the one; the whole is feeble; the whole is broken; the whole is petty; the whole is lossless. Only in the one can we find the whole. For in the one the whole is, and the whole of the whole wishes to be this. We are but blind-sighted.

 

Nature reveals her crevasses not in the vise of the visible, but in the shadowy wistfulness that embeds into this Earth its own meaning. To seek, we must stop seeking. To know, we must stop striving. To gain, we must give up what we have gained. To be one, we must lay low our ambitions.

The Coupling between Information and Destruction

An interesting idea arose into my thoughts this morning as I drove to church. I was thinking about ancient times, and how many valued artifacts and histories were lost and/or obfuscated due to wars. Often, it seems that raids of war always somehow pronounced fire on a sanctuary containing important artifacts of the time. My thoughts then transferred to the modern era, and I began wondering if the same thing were possible due to the global scale of the internet.  As I thought on this matter I realized that, indeed, the same prospect still stands, as it appears that weapons technology (the means of destroying information) and the means of propagating information grow at nearly the same scale. If information is local, then the ability to destroy it is also local. For example, in ancient times, information was traditionally local (there was often not many quantities of information because of the time it took to produce (copying a book by hand for instance)). Thus this valued information could be erased by the technology available at the time (siege or fire.) If the information is global, then the means of destroying it is also global. In the modern-day, information is easy to produce and share across the globe with the aid of computers, but there exists powerful nuclear weapons that could still disrupt large quantities of it. A global nuclear war would likely destroy the information globally, and force us back into a more localized scope of life. I suppose the theorem could be extrapolated to say that if information is universal, then the means of destroying it is also universal, but that thought is too troubling to think upon for very long.