Categories
Game Development

Putting Off Procrastination

Fighting Procrastination: The Local Maxima Problem describes how procrastination might be a symptom of a project that has hit a standstill and can’t easily move forward without taking a few steps back. The Local Maxima is best illustrated by the example of the robot that wanted to go to the moon:

The Moon is way up there. That tree is higher than the ground. I must climb to the top of the tree to get to the Moon.

So the robot climbs up the tree and sits. Yes, it may be closer to the moon than it was when it was standing on the ground, but it won’t actually reach the moon. To actually reach the moon, it would need to climb down the tree and get inside a space shuttle or rocket ship; however, the robot might not want to go down the tree. After all, if the moon is higher, why would going back down the tree, going lower, help?

Jay Barnson experienced this same problem with his own project. He had created a working prototype, but to make progress he would need to tear out functionality and replace it with something else. I’ve experienced this same problem myself, and the fear he refers to is real. Who wants to work productively only to have to say, “Ok, those results were nice, but now they don’t matter, and I’ll need to do it over”? So procrastination becomes a real problem.

I use Subversion for my projects, and I think that it has helped alleviate this problem quite a bit. I could experiment with code, go in different directions, delete and change functionality, and if I fall into despair with no hope of returning with a better product, I can essentially hit the reset button. My last working build is returned to me in pristine condition, and I can start again, only now I know what not to do. The worst case is that I am back where I started with more knowledge of the problem domain. The best case is that I now have an improved code base.

It is probably easy to think that a project’s progress is simply a linear series of accomplishments. Maybe people who have tons of experience can do it based off of a perfect design document, but I can’t. For instance, I had hardcoded variables to get certain functionality up and running in Oracle’s Eye. Originally those variables helped move the project forward. Otherwise, I would be writing abstractions before I know what abstractions are needed. Trying to write code that works in more than just your specific case is great and all, but it is also a great way to stall what you are specifically trying to do. And in my case, I didn’t even know what I was specifically trying to do, so how could I hope to write code that will work for all cases as well as mine?

Later, as I gained an understanding of what I was doing, I had to tear out the old hardcoded variables and analogous functions to replace them with something better. Essentially, I would need to break my project to make a better project. It isn’t so bad when you can change a small function or change a variable, but if your change impacts three classes and fifteen functions, you might be a bit wary. I was. There was the temptation to think, “But why should I go lower when I need to go higher?” Even with the safety net that Subversion provides, it was scary to dive into my code and change it so fundamentally. Even scarier was not being able to compile it for hours.

I did go through it, however, and came out the other side with great progress on Oracle’s Eye. When I hit the next local maximum, I hope I can remember Barnson’s post.

Categories
Game Development Personal Development

Thousander Club Update: February 27th

For this week’s Thousander Club update:

Game Hours: 23 / 1000
Game Ideas: 111/ 1000

Target: 105

Last Monday was President’s Day, and it helped a lot with regards to providing me with some coding time since I had the day off from my job. That day I managed to get some huge bugs fixed and created the ability to load levels from a file. I also added six hours of work. I just had to do four hours of work to add up to the 10 I hoped to do for the week. While I was able to work a few mornings before going to my day job, I found that I was not able to accomplish as much as I thought I could. During the week there were any number of things that came up. A friend of mine was leaving the state, and so we threw a party on Friday evening. I was at an all-day event on Saturday. Sunday was a day for errands.

It is clear to me that I am not doing as good a job as I could be doing regarding my game development schedule. This coming weekend I will be leaving town, so any work I do will have to take place between today and Friday morning. I would need to work two hours a day in order to get to 10 hours. Since I couldn’t do 10 hours in a full week, I am not sure if I can expect to do so with a few days missing.

Of course, it sounds like a challenge to me. B-)

Categories
Game Development Marketing/Business

Advice for IGF Finalists

Dustin Sacks of Sillysoft Games and creator of the amazingly expandable and cross-platform Risk-clone called Lux wrote an article entitled Advice for Independent Games Festival Finalists. Lux made it to the IGF finals last year, and Dustin basically felt unprepared. He’s decided to write up his experiences to help out developers who made it to the finals this year.

It is a quick read and should be helpful for anyone who wants to network with other people involved in game development or to get more publicity.

Categories
Game Development Personal Development

Thousander Club Update: February 20th

For this week’s Thousander Club update:

Game Hours: 15.5 / 1000
Game Ideas: 85 / 1000

I should have 84 for the year so far. I’ve caught up with my game ideas target, but I am still fairly short of my game development target. I doubt I’ll be able to catch up.

I think it is clear that I am falling way short of the 21 hours per week I should be dedicating to development hours. If I can’t do 21 hours, I should be able to try for 10. This past week I did five hours, so doubling that productivity should be a viable goal.

Categories
Game Development Personal Development

Thousander Club Update: February 13th

For this week’s Thousander Club update:

Game Hours: 10.5 / 1000
Game Ideas: 58 / 1000

Since I technically started tracking the last week of January, I’ve decided to readjust the total numbers I should keep as weekly targets. Today I should have 63 to keep on track for 1,000 hours by the end of next January. Otherwise, if I kept the old numbers, I would constantly feel bad for not catching up with almost a month of inactivity.

I’m hitting my goals for game ideas, which are fairly easy to come up with each day. I could think of three to 10 ideas in a few moments.

On the other hand, game development takes time. I can’t immediately get one, two, or three hours of game development. While I can’t always dedicate hours of development each afternoon, I think I might need to come up with a simple list of 5, 10, or 15 minute game development activities. I managed to get 30 minutes of programming before going to my day job this past week because I was finishing up some code I wrote to experiment with TinyXML. I think if I can take advantage of more “weird” windows of time, I should be able to make greater progress than if I expected to work during scheduled sessions.

Categories
Game Development

Oracle’s Eye Development: Configuration Parser and Loader

Yesterday I finished by saying that I was working on adding a configuration loader . I added some stub code so that I would be ready to start working right away.

I realized that while I have coded a text parser before, I never had to worry about getting configuration data out of a file. What would I actually need? Before agonizing too much over it, I thought that it was more than likely that a ready-made, well-tested solution already exists. I spent some time looking through books, notes, and Gamedev.net before finding someone asking the same question I was: isn’t there a an easy to use tool so I don’t have to reinvent this obviously already solved problem?

One suggestion was boost::program_options. I looked into it for a little bit, but another suggestion was to use TinyXML. At first, I thought that using XML was a bit overkill for configuration files. At the same time, it would be ideal for holding the levels, and if I could kill two birds with one stone, all the better. The best part? TinyXML is already in my project! It comes with the Kyra Sprite Engine.

I spent the day reading the tutorial and trying out some test code. It took me only a few moments to get an XML configuration file to load successfully, and a bit more code allowed me to view a few of the elements. I spent the evening learning how the library works, and it seems easy so far. I wish there was some better documentation out for it, though.

My configuration file used to look like:

TimerInterval 80
SpriteSize 64
LeftEdge 64
UpperEdge 64
Ball velocity 5
Player velocity 5

and I wrote it before I wrote more than a single function to help parse it.

Now:

<?xml version=”1.0″ ?>
<!– Configuration for codename: Oracle’s Eye –>
<Config>
<Timerinterval interval = “80”/>
<Spritesize dimension = “64”/>
<Border leftEdge = “64” upperEdge= “64”/>
<Entity>
<Ball velocity = “5” />
<Player velocity = “5” />
</Entity>
</Config>

Unfortunately, I haven’t been able to do more than grab the root element, but I’m still learning how this library works. I’ll hope to be able to finish the configuration loader within the week. Afterwards, it shouldn’t be too much more work to write a level loader with TinyXML as well.

Categories
Game Development

Oracle’s Eye Development: Jumpstarted!

This past Saturday I worked on Oracle’s Eye for the first time in over a month. When I last worked on it in late December, I was trying to update the Frame Rate Independent Movement code I created. It was good enough when I implemented it, but I had a nagging suspicion that I didn’t do it right. I never did check in the changes I had made, and since it has been so long, I had to figure out what I was doing and then do it.

Originally, my code required that the Ball and the Player had movement functions that took an argument. This argument was the delta. For example, the Player could move 5 pixels each frame. 30 frames per second would mean that the Player should move 150 pixels per second. Of course, each frame might not be exactly 1/30th of a second, so I would have to calculate how far to move each frame so that the movement seems smooth. If, for example, a frame takes 1/30th of a second, then the delta multiplier should be 1. If it takes 1/10th of a second, then the multiplier should be 3. A frame that took 1/60th of a second would result in a multiplier of 0.5.

The sad thing is that it wasn’t all that clear how it should work when I originally implemented it. Also, I didn’t understand how to repeat the exact results in case I wanted to script it, nor did I know how it would work if I ever wanted to run a networked game on multiple platforms. After reading through a few more tutorials, I decided to fix it. I based my new code off of Sol’s Tutorials. Running the example game, I noticed that it isn’t terribly smooth itself. It periodically seems that the player’s ship takes small jumps. Perhaps it isn’t the best example to use? I’m open to better implementations if they exist.

This implementation works by setting game updates to specific time intervals. If the Player should move at 5 pixels per frame, then each update will result in a movement of 5 pixels. Multiple updates can take place during each rendered frame, but it is really easy to track the movement for each frame and use the data to accurately reenact it. For instance, I could eventually code replay functionality, which would be a great way to show solutions to the puzzles. I had to change a lot of the code to allow for this change, which shows how fundamental FRIM code is to a game engine. It wasn’t terribly difficult, and it didn’t take me too long.

The best part is that I’m familiar with the project again, which means that I won’t feel apprehension whenever I think to work on it. There were a number of days last month when I felt guilty for not working on the project. I just felt uneasy about the project, and while originally it was probably because I needed to focus on the direction to take it, it eventually was due to the fact that I hadn’t worked on it and had vague thoughts about not understanding it. Rationally, working on it would necessarily bring back familiarity, but it can be tough to pinpoint the fear sometimes.

I decided to focus on coding a configuration loader next. Basically, if I wanted to change the speed at which the Player, the Ball, or the game engine ran, I would have to recompile. Being able to load the configuration dynamically without recompiling or even rerunning the game would do wonders for productivity. I wrote some stub code on Saturday, and I will work on it this week.

Categories
Game Development Personal Development

Thousander Club Update: February 6th

While I could more easily catch up with the number of ideas I need for this week, I know it will be incredibly difficult to catch up with the number of hours to put in. After all, during a week, about 21 hours need to be fulfilled in the first place. To catch up with the previous hours I missed would be terribly difficult. But as Scott says, actually achieving the 1,000 hour mark is not as important as keeping development at the front of my consciousness. In the past 15 minutes to a couple of hours a week was considered good enough, but I joined the Thousander Club to do great. My status so far(actual#/for the week/for the year):

Game Hours: 7 / 21 / 1000
Game Ideas: 37 / 21/ 1000

So I did a little better with regards to new game ideas than I needed to for the week. Ideas are a dime a dozen, as they say, but it is still good to have them. There is no need to lose any creativity to forgetfullness since I’ll be able to leverage it in the future with new ideas.

Game development hours showed a marked improvement over the previous week. A few hours might not be directly related to Oracle’s Eye, but I’m counting my practice time with The Gimp since I think it is a skill that I can leverage with game development. I was using a number of tutorials, including the ones mentioned in an indiegamer.com post as well as a few Gimp-specific ones. You can see the results of my work from Friday and Saturday morning here:

First attempt 35KB
Second attempt 57K
with planet! 55K
with atmosphere…kinda 54K

The rest of my time was spent on programming, and I will cover what I did in another post.

Categories
Game Development Personal Development

Thousander Club Update

Besides attempting to work on game development for 1,000 hours this year, I also wanted to come up with 1,000 new game ideas. The Thousander Club is definitely a great way to raise your game.

As a reminder, I should have about three hours or ideas per day. Below I list my actual numbers versus the numbers I should be at:

Game Hours: 1 / 83
Game Ideas: 11 / 83

Ahem. Not so good, but I didn’t join until the second week of January. Still, it doesn’t justify the majority of the missing numbers.

If I notice that I am getting down on myself too much for not hitting the right numbers, I might start displaying them differently. Until then, I think it is good to know what progress I am making as well as how far along I should be. I will try to post these updates regularly on Monday.

Categories
Game Development

Oracle’s Eye Development: Taking an Hour

Thanks to a comment from a previous post, I decided to follow the advice on GameProducer.net specified in the article 1 hour solution to any problem.

… decide that you won’t check email before you have done that one daily hour. Don’t watch tv, don’t visit those nice discussion forums you usually do, don’t allow yourself to do any nice thing you usually do – until you have took action for at least one hour.

So I did it. I set an alarm for an hour and started planning my next steps with Oracle’s Eye. Before I get to the results of that hour, let me just say that I couldn’t believe how easily distracted I could get. I’d want to check my email to see if someone responded to a message I sent the day before. I wanted to see if a question I asked on the Indie Gamer forums was answered. I even wanted to start a blog post! There were a number of smaller things that I refused to do during that hour as well. Still, I didn’t think that hour would be so difficult. Perhaps with practice it will get easier.

So how did I productively spend that hour? I started by trying to picture what I wanted Oracle’s Eye to be like when it was completed. I then worked backwards by trying to list each “accomplishment” I would need to complete the entire project. Among the subprojects: defining a level structure, creating a level editor, selecting a level, loading a level, playing background music, and playing sound effects. I also wanted to add animation to a number of objects, fix the collision detection, improve the frame-rate independent movement, and create a menu system. I want to be able to build the project for Gnu/Linux and Win32 from a single codebase.

Having all of these specific subprojects is a bit less unwieldy than simply wanting to “complete the game project”.

I then needed to manage what actions will be involved in actually trying to finish a subproject. I picked frame-rate independent movement first. Here is a portion of my next actions list:

Frame-Rate Independent Movement:
    - To get game time to run at regular intervals
        - find/read FRIM references
        - define # of milliseconds in interval
        - verify that the code already in place will run updates at interval
        - change/update code so that it does, if needed

That doesn’t seem so hard, right? Perhaps I’m leaving out some details, but the very next action is good enough to get me going when I do sit down to work on this part of the code. It might be all I need to keep myself going, filling in the gaps as I go. Otherwise, I’ll just run this exercise again to get a better next actions list.

I’m still surprised at how easily distracted I was. I’ll need to work on that issue. I have a sign on top of my monitor that says, “What is the best use of my time right now?” that I apparently ignore now. I do so many things from one moment to the next without consciously thinking about whether it is the best thing I could be doing at that moment. In the future, I think during the hour it should be ok for me to at least write down those things I think to do. I can remember to do them later when it is more appropriate. It won’t really serve as a distraction in that case since I can get it down on paper and get it out of my head. We’ll see.

In any case, forcing myself to work within the hour actually made me more efficient with the time I utilized. When I needed to look up something for my list, I noticed that I was much quicker about searching than I would have been if the hour deadline wasn’t approaching. It would take me less than a minute to get the information I would need. Normally I might take five minutes or more because I would check if there are any comments on my blog or check for interesting new posts on the forums. I had a feeling that each second counted, and for the most part I treated them that way.

The next time you have a project that is sticking around on your list for too long, try to take at least some of it out in one hour. Even if you get somewhat distracted as I did, you might find that the time you do focus on the project will be incredibly productive. For another example, I dedicated an hour to catching up on magazines and got through a few of them before stopping to make dinner. I might catch up on the last few Escapist issues if I dedicate another hour tonight. B-)