Category: Self-Improvement

Book Progress, Part Deux

I have now finished 110 of the 357 pages in my current book. That’s about thirty percent. I would very much like to get this book done by the end of next week…that will take a serious commitment from me. To the tune of about twenty-five pages a day.

I also have a little something else that I’ll talk about later, when it’s actually congealed.


Book Progress

I am currently on page 78 of Frank Luna’s book. There are 376 pages in it. I am averaging about ten pages a day, which means I’ll be done in about a month unless I really pick up the pace. Of course, I don’t want to rush too much or I might miss things, which would be counterproductive.

In other news, last night I dreamt that I’d already lost all my weight and everyone was commenting on how good I looked. Then I woke up. 🙁


Weight Control

I’ve had a weight problem for about ten years now.

Being overweight didn’t used to be a problem. It meant you had eaten more than you needed to survive – thus, you were a successful person. And most people become overweight simply by eating when and what their body tells them to, because our biology has not caught up with our sociology – it is no longer necessary to put weight on as a safeguard against starvation later. In fact, in this day and age, being overweight is like hanging a permanent sign around your neck that reads, “I have no self-discipline”.

Except that I do have self-discipline. I have done things that required serious self-discipline in the past and will do more of such things in the future. Why am I still having trouble with this?

I am six feet, four inches tall. I weigh about three hundred and forty pounds. Because of my height, I am not really rotund, but I still weigh about a hundred pounds more than I should.

About two years ago, I seriously started on a plan to lose weight. I did some research, reading books like The Hacker’s Diet. I then got off caffeine, drank only water, took vitamins every day, and ate a very small number of calories (around 1800). I also worked out at home at least three times a week. My workout consisted of playing Dance Dance Revolution for about fifteen minutes to get my heart rate up, then doing a series of calisthenics. I burned about 250 calories per workout. The very low number of calories was quite difficult to maintain, but I told myself that every time my stomach growled it meant I was losing weight.

Initially, this worked great. The pounds seemed to melt right off, and it appeared that I would reach my goal of 240 far faster than I thought I would. I don’t know exactly how much weight I lost because my scale was not reading right (something I didn’t find out until later) but I probably lost about 35-40 pounds. My legs looked great, and I started having to tighten my belt lest my pants fall off. A female co-worker of mine told me I was looking “splendid”, which was quite encouraging.

But I was overdoing it. For a 340-pound male, 1800 calories is practically nothing. After about three months of this, my body went into starvation mode and I stopped losing weight. This was also when I discovered that my spring scale was not accurate, since it was telling me that I weighed 295 but the new digital scale I bought, which went up to 300, refused to weigh me. So I didn’t even know how much I’d lost.

After about a month of continuing to practically starve myself with no results, I got frustrated. I stopped exercising and started eating “normally” again. And all that weight came right back on.

My story is a very common one. Despite all the research I had done and all the good intentions I had, I had gone about this project exactly wrong. The worst thing you can do to lose weight is temporarily alter how you exercise and eat, because even if they work, once you reach your target weight you will go back to normal…and the weight will come back on.

My weight is a consequence of my eating habits and exercise habits. Thus, if I want to change my weight permanently, I must also change those habits permanently. There is no way I can maintain a healthy weight drinking as much soda as I do, so I must stop drinking soda – permanently. There is no way I can maintain a healthy weight exercising as little as I do, so I must start exercising – permanently. And there is no way I can maintain a healthy weight eating as much mayonnaise as I do, so I must stop eating mayonnaise – permanently. I must break myself of my bad habits and replace them with good ones, and I must continually reinforce the good habits lest my decades of bad habitting reassert themselves.

So I’m going to start again, within the next week or two. I’m going to do a little preparation and then I’m going to start back down the road to good health…more gently, this time. It will take longer and be more difficult, but the result will be permanent success.


Confidence

I recently listened to Steve Pavlina’s podcast on building confidence. It crystallized a couple of things for me.

(Warning: PSRD breach ahead.)

I’ve stated in the past that I’m not very big on God, because I have an engineering mindset and that makes it difficult to believe in things that I have no evidence for. I’ve been asked, “But such belief tends to make the lives of the believers better! Isn’t that sufficient to justify religion, even if it’s not true?” Now, a purely agnostic, atheistic response to that would be, “No! Believing a lie is never justified! Live as we do, undeceived!”

Except that believing in something that you have no evidence for is the essence of self-confidence. Self-confidence is actually self-faith. You believe despite having no evidence, and your belief gives you a much greater chance of actualizing what you believe in.

Thus, the atheistic/agnostic mantra of “It’s always better to live undeceived” is revealed as a lie – there is direct evidence to the contrary.

Does this mean that I believe in God again? No, not really. But even after I fell away from religion, I never developed an antipathy for religion like some atheists do. And now I know I never will. Religion is actually a useful tool for self-improvement…I just don’t feel it works for me personally.


Inaria Postmortem

Around the end of October 2005, I decided to try to write a complete computer role-playing game in forty hours. I was inspired by this article by Jay Barnson on GameDev.net, Jeff Vogel‘s excellent work, and by my own love of RPGs. I am a professional game developer, but I’d never written an RPG engine and considered that a “hole” in my experience.

I picked a time limit because I’ve also been fascinated by people being forced to do the best they can with their skills under such limits; this was one reason why I wrote my Iron Gamedev article (the other reason was that I was feeling really goofy that day). And of course competions like the Ludum Dare also inspired me.

The project is now complete. You can download the game here, and the source files for both the game and the editor here. Here’s a screenshot:

Mmmm...pixels.

Now, the point of this project was to learn, not necessarily to make a complete and fun game. That said, I did want to make the game as good as it could be in the time I had. Here’s an excerpt from my original design doc with my goals:

We need four things to be able to call the project a success.

We need to create the map structure and populate it with an initial terrain layout.
We need to allow the player to walk around the map and be blocked by passability data.
We need to create monsters and have them move toward the player and attack him when they get in range.
We need to allow the player to attack back, and to have the player somehow gain in abilities when he succeeds in killing monsters.

That’s it. If we get that, we can publish it without fear of too much ridicule.

But that’s not enough. What I want is:

A map structure where every map cell is a list of critters placed on that cell. When the cell is drawn, all objects in that cell are drawn, from bottom to top. Since the terrain object will be pushed on the map on load, it will always be drawn first, on the bottom.

A map structure that contains data for map links.

An inventory and a current equipment screen.

If we get all this implemented, I will consider the experiment a resounding success.

Finally, what I’d really like is:

An overworld, three towns, two castles, and eight dungeon maps.

An overall plot, no matter how thin.

Quests and quest objects.

If we get all this implemented, I’ll be damn suprised.

Well, I didn’t get quite everything on my list done, but I’m still very surprised at how much I accomplished. I got the map structure I wanted, an inventory, buying and selling, NPCs with different AI behaviors, levelling up, one town, two castles and eight dungeons. And a very, very thin plot, but not quests or quest items.

I kept rigorous track of my time, but since I have a full-time job and a family, I wasn’t able to spend my hours over the course of a weekend or even a week or two. It took me about three months to finish the project, and I actually feel I did well completing it in that time. I am actually alloting myself four months to complete my next forty-hour project.

I would break down my time spent as follows: about five hours was spent fiddling with graphics, about thirty hours was spent writing code, and about five hours was spent creating the NPC data files and game levels.

What Went Right

Kicking it Old-School

Emulating an old Ultima-style RPG was the right tack to take. If I’d tried to write a 3D RPG, I simply would have gotten overwhelmed and probably quit. The feature set I wanted fell into the “tough but doable” range and made for a perfect forty-hour challenge.

Using the SDL

I wouldn’t have completed what I did if I had not used the SDL and instead just used DirectDraw. End of story. I cannot imagine why someone would not want to use it for a project like this, it was so easy to use and saved me so much time.

Grabbing Graphics off the Web

All the items, monsters and NPCs in the game came from this page of free RPG tiles. This was a lifesaver – if I’d had to create the graphics myself, not only would they have looked like crap, I would have burned so much time on them that I would not have had any chance of completing my goal. As it was, I could not find any decent terrain tiles that I liked, so I ended up grabbing a lot of the ones I used out of Ultima VI. This cost me at least two hours, unfortunately.

Making an Editor

I spent about five hours making an editor for the engine – you can see a screenshot of it here and it’s included with the source package linked above. I think this may have been my smartest move. I ended up spending far too much time on the code and far too little on the maps (see What Went Wrong, below), but if I hadn’t had the editor I probably wouldn’t have gotten more than one or two maps into the game.

Using my PDA to Sync Projects

I have an Asus A620 PocketPC-based PDA. I love it, and one of the things I use it for is to keep projects synched between work and home. This way I was able to work on my project at work, sync my PDA, take it home, sync it at home, and pick right up where I left off. Now that I’ve got some webspace, though, I’ll probably set up a Subversion server to make it even easier, and give me real source control features like versioning.

Blogging the Process

This was vital. The fact that I knew people were watching kept me going when I got really tired of the project 🙂 I’d like to thank my friends Ryan Clark and Tom Mauer from work who tracked the progress of the project with interest, as well as Andrew Wooldridge and Gianfranco Berardi who linked to me, and to Sol who piped up with helpful suggestions when I mentioned I was using his tutorials.

What Went Wrong

Hoo boy, where to start?

Well, first, here’s a screenshot of the most visually interesting bug I encountered during development:

I'm walking on mouths.

Multiple Mistakes with the Editor

I made two huge mistakes with the editor. First off, I made it too early in the project. I made the editor when I felt I needed map data to work on, but once I had the map I then added lots of features to the map structure…which the editor then didn’t support. I had to add the map level number, map name and map links all by hand. The editor still saved me time, but it could have been even better if I’d just made a temp map by hand to work on, finalized my map data structure, and then made the editor.

My second mistake was a doozy. I split the editor off into its own project, instead of simply creating a new editor source file in the base project. By splitting the editor off, I ensured that all maps would have to be moved from the editor folder to the actual game folder before they could be tested – and then moved back if additional work was needed. Maps quickly got out of date and filenames got confused. I finally fixed this by putting a hardcoded path into the editor source so that it saved and loaded from the game folder, a terribly hacky solution.

Secondly, I ensured that all the changes to the source files I made while writing the editor had to be merged back over to the game project, and then changes made there had to be merged back into the editor…it was just bad. Still much better than no editor at all, but these mistakes caused me to eat up time that could have been spent making the maps better. Which leads me to…

Too Much Time on Infrastructure, Not Enough on Content

Now…this is a thing that went wrong, but in the end, this was a learning exercise, not an attempt to make a publishable game. I wanted the game to be as good as it could be, but in the end the quality of the game is not that important.

That said, the game could have been twice as good with just one or two more hours spent on the content – and I’d have had those hours if I’d both planned better and not made those boneheaded mistakes with the editor. There are features in the engine that the player will never see…because I didn’t have time to write content that uses them. Yay!

Schizophrenic Source Code

I almost didn’t want to post the source…in just about every case, I started doing things the “right” OOP-ish way, and then reverted to procedural programming when time got tight.

For instance, there is an NPC class. Great! Do I subclass from that for all my NPC types so that I can program in individual unique NPC actions? Nope, I simply use that one class and have the Update() function determine the NPC’s type and perform actions based on a classically bad switch/case statement. The input code is atrocious; I’m doing tons of stuff there that have nothing to do with input. I felt like crying when I put the code to draw the hit marker and projectile marker inside the input function with their own frame pumps…but it was either do that or cut them completely. I guess I can console myself with at least knowing that it was bad.

Conclusion

Despite all of that, I do consider the project a success. I learned a lot and created a fair amount of code that can and will be reused for other projects. And I’m planning on doing three more of these forty-hour learning exercises over the course of the next year.


Success

Around the beginning of 2004, I started thinking about how to seriously improve myself. I wasn’t down-and-out or anything. Our financial situation was…adequate, and the job I was at was stable. But there were several aspects of my life that I didn’t feel were measuring up, and I wasn’t happy about them. I was fortunate at around that time to run across several articles on the internet that pointed me in a helpful direction.

Since then, I’ve read several self-help and success books and listened to many recordings. I’ve read The Power of Positive Thinking by Norman Vincent Peale, Success for Dummies by Zig Ziglar, and I’ve listened to The Strangest Secret by Earl Nightingale.

They basically all say the same thing.

First, in order to succeed, you must define success for yourself. This smacks of secular humanism, but it’s true: we all define success differently, and our definitions of success are direct reflections of who we are as people. Success is your goal – and your goal must be concrete and measurable. It must be a specific event. Unmeasurable goals are not goals at all and cannot be attained. Most people never specifically set goals for themselves, and then wonder why they feel directionless.

Once you have defined success for yourself, you then create a plan for achieving that success. The plan must consist of several steps or milestones, each of which is a smaller, measurable goal that, when completed, add up to the completion of your overall goal.

Then, having picked a goal and defined a plan, you must make progress along your plan every day.

That’s it.

Well, goshwow, you might be thinking, if it’s that simple, why doesn’t everyone do it?

Two reasons.

One, we’re not taught to do it. While I had very good parents, at no point did they ever sit me down and say, “Anthony, here’s how to ensure you get the most out of your life.” Most parents feel that if they simply ensure their children recieve a good education, they’ve done their job. It’s hard to blame them; they probably weren’t explicitly taught about how to succeed themselves.

Two, because, if you’ll forgive the hokey Matrix reference, it’s far harder to walk the path than it is to know the path. Succeeding takes self-discipline, which most of us don’t have (and again, aren’t taught). I recently watched an episode of Penn & Teller’s excellent show Bullsh*t!, which talked about Alcoholics Anonymous. One thing mentioned during the episode is that just about all professional self-help systems report about a 5% success rate (success being measured by a person staying on the system for a year straight). This matches up with Earl Nightingale’s findings; he found that only 5% of people are financially self-sufficient or better at retirement age. Thus, if you are capable of self-discipline, you have automatically put yourself into the top 5% of people, and it’s difficult for someone with self-discipline to fail.

But what about motivation? How do you keep going when it gets difficult?

This is where things get kind of fuzzy, because just about every major self-help author is a Christian, and he simply says, “Have faith in God! He’ll help you!”

(Yes, I’m violating PSRD a bit here today. You’ll live.)

I’m not big on God. Most people with an engineering mindset find it difficult to believe in something that there’s no physical evidence for. So what do I do? When things are tough, who do I lean on?

Well, the answer has to be me, doesn’t it? And it’s not as silly an answer as you might think; there are many people who aren’t religious and yet have the depths of self-discipline necessary to succeed despite adversity and difficulty.

Now, despite not being particularly religious, I have to express an admiration for Christianity at this point. Christianity is based around two powerful ideas: have faith and treat others as you would like to be treated. (Both of these are commandments from Jesus himself, see Mark 9:23 and Matthew 22:39). This is why Christianity was able to shuck the majority of its tribal, barbaric roots (see the book of Leviticus in the Old Testament for many instructive examples). It moved forward and became something very positive in the lives of its followers.

But if there is a practical difference between a person who succeeded because they believed, “God is helping me” and the person who succeeded because they believed, “I believe in myself”, I don’t know what it is. Hardcore atheists will doubtless say, “Well, the first person believed a lie, and the second believed the truth” but recall that I was asking for a practical difference. In both cases, the person succeeded.

It will be necessary for you to train yourself to stop negative, “I can’t”-style thoughts in their tracks and replace them with positive thoughts. If you’ve thought your plan out and it’s a good one, and you are making daily progress along it, then there really isn’t any reason for you to feel bad about yourself. You have proven that you are in the top 5%, and about the only way for you to fail to eventually reach your goal is for you to abandon your plan. And why would you do that?

Believe and succeed.


[Keanu]Whoa.[/Keanu]

Okay, back in March I wrote an entry here called The Power of the Force, which detailed how my life changed when I finally started moving resolutely towards my goals.

Well, a few days ago Steve Pavlina (who I mentioned in said entry) asked for people to submit stories about how what he had written had helped people. He was going to judge the stories and award the winner with a CD of Earl Nightingale‘s The Strangest Secret. So I posted a link to my story.

And I won. And now there’s an entry on Steve’s blog mentioning me and my story.

Whoa.


My Latest Project

Okay, purely for my own edification, I intend to write an RPG in 40 hours.

I was, of course, inspired by this blog post, and also by the fact that I really, really wanted to participate in the most recent Ludum Dare challenge, but couldn’t. So I’m sort of doing it on my own. Now you know why I was researching Roguelikes; 40 hours is too short to do just about anything graphical. Text mode will allow me to get the most out of my time.

Here’s the rules:

1. This will be a project created in Visual Studio .NET, using C++. It will be a console application, and it should run on both Win2K and Win9x.

2. The timer starts when I first create the project (which I haven’t yet).

3. Since I am a father of three and employed full-time, I can’t do something stupid like work on this for 40 hours straight. Instead, I will work on it whenever I have time, rigorously keeping track of my time. When the 40 hours is up, I will post whatever I’ve got, even if it’s not playable (though I will do my best to make sure that it is).

4. Time designing, coding and creating content counts against my 40 hours; time thinking about the project and writing blog entries about its progress do not. Thus, I can do some “mental preproduction” work on it as long as I don’t code anything or write any design down.

5. Failsafe. I have 40 hours to do this project, and I can spread them as thin as I want, but if the project is not done within 30 days (that is, it is not done by midnight, June 18th, 2005) the rest of my time is forfeited and I must post what I have.

Currently my thinking is that I will break the project up into two 20-hour chunks – one for coding the engine and one for creating content that runs on the engine. This should (note the word “should”) ensure that I ship something a bit more robust than just a hack & slash engine. My fears are that I will either overestimate the difficulty of the project and set my sights too low, resulting in a completed game so simplictic that no one wants to play it, or that I will conversely bite off far more than I can chew, resulting in no functioning game at all.

Oooh, this is going to be fun. I think.


The Power of the Force

Since the age of nine, I have wanted to be a game developer. I’ve wanted to make games ever since I realized that the TRS-80 Model 1 sitting in the corner of my classroom at school was technically the same device as the Pac-Man and Asteroid machines I played on down at the 7/11.

It’s been 25 years since then, and while I came close several times, getting jobs at Origin, 3DO and Human Code, I never managed to make the jump from tester or support person to developer. I did finally manage to get my first programming job about three years ago. I guess you could technically call it game development – the company I work for uses C++ and DirectX to make video bingo games for Indian resevation casinos. It’s actually a very good company full of very good people, and they did give me, someone who wasn’t able to finish college, a programming job.

But I still wanted to do real game development, and I began to think that going indie on the side might be a good idea – bring in some extra money (hopefully) and scratch my personal itch to make real games.

So I moved forward. I chose the design for my first game (a very cute puzzle game using colored water droplets and some design elements from Marble Drop and The Incredible Machine). I picked a name for my company. I bought some webspace. I cleared what I was going to do with my boss, who was very supportive. I started on my prototype and got to the point where I had some balls rolling down the screen across platforms in a fairly realistic manner.

And then one night I was idling in the #gamedev channel on irc.afternet.com, and someone came in and asked, “Any game developers from Austin in here?”

And I put my hand up and said, “Uh…I’m a game developer from Austin.”

And he implored me to apply at his company! They had recently lost some programmers to another company and desperately needed to staff back up. So I blew the dust off my resume, added an entry for my current job and sent it to him.

And they called me in for an interview, which went great. They showed me some of the games they were working on, which looked awesome. I hadn’t been looking for a job so I had no demo, so instead they asked me for a code sample. I sent them the sample and then chewed on my fingernails for twenty-four hours.

And then they called me and told me that they wanted me to work for them.

You may have read Steve Pavlina‘s articles on Dexterity.com. You may have read The Power of Positive Thinking or Think and Grow Rich or The Seven Habits of Highly Effective People. You may have heard succesful people of all stripes tell you that no matter how big the obstacles seem, as soon as you resolutely move towards your goals they will fall all over themselves getting out of your way. You may have dismissed it as bunk. It’s not. You want a Force? This is the true power of the Force. I moved resolutely towards my goals – and I mean really moved, not just reading books and hanging out in IRC and wishing. I took real, concrete, irreversible, fear-overcoming steps towards realizing my goals, even in a circumscribed way. And when I did, the universe dutifully rearranged itself so that the job I really wanted fell right into my lap. I didn’t even have to look – it came to me.

I’ve had self-confidence problems my entire life. In the past I have managed to overcome my fears and self-doubts long enough to do some great things, but afterwards I always reverted back to type, thinking “Whew! Glad I got away with that, now let’s never do that again.” This has kept me from seeing the truth – that everything I’ve really tried to do, I’ve succeeded at. And every time in the past that I have conquered my fear and moved resolutely towards my goals, the results have always been positive. But now I know. This most recent experience is simply the icing on the cake. I’m not going to be afraid any more. In a few years I’ll be speaking at the GDC. Just you wait.