Archive

Archive for January, 2012

Programming Part-Time

January 31, 2012 2 comments

So I know I haven’t made much visible progress on my game since I started this blog. And I think it’s due in large part to working on it part time.

Since going back to work after the new year, I haven’t had a normal sleep schedule. I got used to staying up until 2 AM every night instead of my typical 11 PM. I’m finally starting to get back to my “normal” schedule. But until now, this terminal sleepiness has made programming after work difficult.

This is a situation a lot people get into when they start trying to start up a business or project on the side. A full-time job can be really draining and after one and a half hours of commuting and eight and a half hours at work, the last thing on anyone’s mind is putting in work on a side project. The only thing keeping me working on my game is my intense passion for games in general and my strong desire to turn this into a career.

While I don’t expect to quit my job and start developing flash games full-time in the near future, releasing and selling my first game is the first step towards that goal.

Even if I produce a mediocre game that sells for $50 after I put a couple hundred hours into it, it’s still worth it. If I want a career in video games, having released one will help. If I want to turn this into a business, having released a game is necessary. Even if all I do with this is use the experience to improve my programming skills, it’s worth it.

So I’m resolving to get this game finished and ready for sponsorship on Flash Game License by May 1 of this year. If I have to rush the last bit and release a game that’s barely more than a prototype, I’ll do it. Stay tuned over the next 3 months to follow my progress. You’ll know as I get closer to the deadline whether I’m going to release a crappy game or something actually worthy of playing.

Let me know what you think of my goal in the comments. Is it not ambitious enough? Too ambitious? Should I instead follow the advice of this article on Lifehacker and schedule some time each week to work on my game?

Advertisements

The Results of 3 Hours of Programming

January 29, 2012 1 comment

So after doing 3 hours of programming from scratch I only have the bare bones of my game completed. I did manage to make my level select screen and the rest of the game is in much better shape than it was before. Unfortunately the new game is still a good 3-4 hours short of being a full prototype.

This is what I had after 45 minutes of programming

I think the lesson to learn from this is don’t attempt to complete a prototype from scratch in one sitting if you’re not a great programmer. Also, don’t start at 11 PM if you know staying up past 2 AM isn’t a realistic expectation. I’m guessing the people that do this from scratch thing probably have more tools than just basic actionscript 3 at their disposal. Once I have my game working again I may have to look into it to see what’s out there.

Game Jam Time

January 28, 2012 Leave a comment

A Game Jam is a programming session undertaken with the intention of creating a complete and working game prototype. Since I had so many issues when I went to integrate my level selection screen, I’ve decided that I’m going to start from scratch and see what I can do. If all goes well, I’ll post a picture of the new version of the game tomorrow.

I know I can stay up until at least 2 AM, so that’s at least 3 hours of work. Having already made the prototype of the game once that should be enough to get everything working as it does now. Since I already know what mistakes I made the first time, it might actually work better after I’m done with this. Wish me luck!

Unexplained Bugs

January 26, 2012 Leave a comment

My game has been on Flash Game License for a week now and in that time all 3 of my friend’s with fan accounts have logged in and tried it. The first one discovered the error caused by code encryption. The second one told me that they couldn’t figure out how to end turn, but after looking into that I couldn’t find an issue. The third one reported the same issue as the second one. So I dug a little deeper.

Apparently, moving units is causing the “End Turn” button to disappear. The third tester also found that when clicking on an enemy unit, the game completely locked up. I have yet to reproduce either of these things even when playing the game online on a different computer. So I guess it’s back to the drawing board on the buttons.

Additional Game Progress
In the meantime, I’ve been working on adding a level selection screen up front. It’s making me realize how bad a decision it was to treat the “Main” class as though it were the class for my battle screen. I don’t have a “destroy” function to quickly make everything disappear when I want to go back to the stage selection screen.

That’s a lesson for anyone starting on their first game. Make every screen the user might see it’s own class and make the “Main” class (the one that runs every time the game is opened) as minimal as possible. It should contain a static variable referencing the window itself and should create an instance of whatever class will contain your opening screen and then attach it to the window. That way when you switch up which screen your game opens with you only need to change which class is called. Don’t do what I did. You’ll have to rewrite most of it later.

Listening to Other Indie Developers

January 24, 2012 1 comment

So I spent a good amount of time listening to the Infinite Ammo podcast today, specifically the one with Andy Moore. I think it helps a lot to listen to other game developers, especially when they have more experience than I do. Their discussion ranges all over the place, but here’s a few things I pulled from it.

Hook your players quickly

Like Murphy Lee said, “Wat da hook gon be?” For flash games specifically, it’s important to get players excited about the game as soon as possible. Players aren’t paying any money up front to play a flash game so if they aren’t enjoying it they have no reason to stick around. With more traditional, paid games, players have a sunk cost that they want to try and recoup before dropping a game. It’s a behavioral economics thing.

I’ve read before that with a flash game, you want to try and hook a player in the first minute, including load time. That’s also one of the reasons why keeping game file size down is important because people without a fast internet connection might give up on your game if it takes too long to load. Ideally, the player will feel like they’ve accomplished something within the first 4 clicks.

That might seem extreme, but why not? One click for “Play”, one click for “Okay” on the tutorial slide, one click to select your unit, one click to select an enemy. BOOM! You’ve defeated your first enemy! YAY!!!

I’m trying to keep this in mind as I design my user interface.

Metrics can make games better

While it’s important not to rely on metrics to design your game for you, they are a necessary tool for fixing and polishing your game. For example, let’s say you’re tracking what percentage of players are completing each level. Over all 20 levels, about 3% of players quit during every level, but you find that 20% of players quit on level 5.

Is it because level 5 contains an especially difficult challenge? Is there a glitch that causes some people to be unable to complete the level? Is there a mistake on any of the hints on that level that causes confusion? This merits further investigation, but without the metrics you’d have no way of knowing that there even was a problem.

Tips for new Indie developers

I realize I’m still in the target group on this one, but here are a few of the tips I gathered from the Infinite Ammo podcast.

1. Release your games
It’s very difficult after spending a lot of time on a creative work to think rationally about it’s quality. I know from just a couple months of working on this game that it’s all too easy to put an endless amount of work polishing, correcting, adding new features and generally improving the game. But if you do this forever, you’ll never release your game.

It’s also possible to get to a point where you’re sick of the game, having playtested it for the thousandth time and still not being satisfied with the way the characters move or with the level difficulty. At that point I think it’s time to fix any big glaring bugs and then publish it. It’s better to publish a game that has a few issues than to never publish a game at all.

2. Secure your code
This is a particular issue with flash games. Because of the way flash saves your game, it’s all too easy to decompile the source code, make whatever changes you want and then upload the game as your own. Fortunately there is software that encrypts code so that it’s more difficult/ near impossible to make changes to the swf file. Flash Game License provides a 25% code for Kindisoft’s secureSWF. It’s still $300 for the professional version, but it’s better than having your games ripped off.

3. Don’t be afraid to be inspired by other games
While this isn’t specifically mentioned during the podcast, it’s a lesson I drew from it. Around the 2:20:00 mark they discuss game clones. While copying a game action for action and level for level is definitely too far, there is a point at which you can borrow from other games. Innovation comes when people take what came before them and either reimagine it in a new way or combine it with other things to make a new combination.

It’s all too easy for critics to call any work derivative, but at the same time it’s impossible to construct a creative work in a vacuum. If you’re especially inspired by another game, don’t be afraid to say so. As long as you put your own touches on your game you have nothing to be afraid of.

Code Encryption and the Stage

January 22, 2012 Leave a comment

So I’ve learned a valuable lesson when it comes to flash code and code encryption software. Don’t use the default “stage” variable outside of the initialization function.

So for those of you not familiar with flash, the screen that is displayed when you open something in flash is called the “stage”. It is created automatically when code is compiled and everything that shows up on the screen has to be added as a child of the stage. So if you want 3 airplanes to appear on the screen your function call should look something like this:

tempAirplane = new Airplane();
stage.addChild(tempAirplane);

tempAirplane = new Airplane();
stage.addChild(tempAirplane);

tempAirplane = new Airplane();
stage.addChild(tempAirplane);

Encrypting your code is a necessary step when publishing a flash game, otherwise anyone could copy your flash game, decompile it, and change whatever details they wanted to pass the game off as their own. Unfortunately, when the code is encrypted some things may break. In the case of Kindisoft’s secureSWF, almost all references to the stage become broken. The only things that seem to be left intact are those in the initialization function that’s called the first time the stage is created. So keyboard events created during that time will stay intact and any children added to the stage at that time will be added, but from there on out, you will need to rely on adding children to the objects added during the initialization function. So I added a “stageSprite” object and then added everything else to that. My new calls to add objects look like this:

stage.addChild(stageSprite);
stageSprite.addEventListener(Event.ENTER_FRAME, enterFrame);
stageSprite.addEventListener(Event.MOUSE_LEAVE, mouseLeaving);
stageSprite.addEventListener(MouseEvent.MOUSE_MOVE, mouseEntering);
stageSprite.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);

tempAirplane = new Airplane();
Main.stageSprite.addChild(tempAirplane);

tempAirplane = new Airplane();
Main.stageSprite.addChild(tempAirplane);

tempAirplane = new Airplane();
Main.stageSprite.addChild(tempAirplane);

Before the changes, my action menu stopped appearing when a unit was clicked and my onClick functions to select a target to move or attack stopped working. Post changes, everything seems to work great. Now that it’s working online with the code encryption I can start working on new things. Next step is creating a navigation menu to actually allow multiple maps to be selected from (right now it only loads one map that can be played endlessly). I also need to design a company logo to appear when the game loads. Any ideas for maps that might be fun?

Uploaded to Flash Game License

January 20, 2012 Leave a comment

So I got my game in enough of a working condition to upload it to Flash Game License as a full prototype.

I got the AI working a couple of days ago. Instead of using my movement function I ended up creating a very basic tile evaluation algorithm. All it does is count the distance from each enemy unit to every tile on the map. Since the zombies needed to charge straight at the first unit they can reach it worked out well. Finally got the AI to attack as well. It’s not much, but at least now it feels like playing against another player instead of playing against myself.

The Opening Move by My Zombie AI

I had a few other bugs to fix. Among them I needed to add a way to reset the game and end the turn without using the keyboard shortcuts. Also for some reason my AI wasn’t reacting well to losing a unit. It stopped working completely as soon as a unit was killed. Lastly I needed to make my AI actually end its turn once it had moved every unit. It’s still not feature complete, but it plays like a game now.

I know that my artist has some sketches of the first 6 units or so. I’ll probably show them to everyone once she sends them to me. They already look a lot better than my crappy placeholder images.

Now that it’s uploaded to Flash Game License I can start requesting some play testing to see how it works at the moment. I can also start sharing the latest version with people. For now I only opened it up to fans; special accounts I can create for friends and family. I’ve only created 2 fan accounts so far and I’ve got at least 2 more available. If you’re interested in testing my game send me an email or drop a comment.