Archive

Posts Tagged ‘Flash Games’

Listening to Other Indie Developers

January 24th, 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 22nd, 2012 No comments

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 20th, 2012 No comments

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.

A few of my favorite Flash games

January 14th, 2012 No comments

Since I’m working on my own Flash game. I figured it would be appropriate to highlight a few of the best games I played last year.

Multitask 2

This game is actually 6 games in 1, all played simultaneously, each using a different set of keys on the keyboard. In standard mode, the game starts with one game and slowly adds them until you’re playing all 6 simultaneously. You might think you’re an expert multitasker, but even after you’ve mastered the controls it’s impossible to keep all 6 games juggled for very long.

Multitask 2 Screenshot

Bullet Audyssey

This game is a blast. Top down shooter with nothing but boss fights. Each boss fight is set up with stage’s music so that the enemies fire in time with the music. You also have the ability to slow down time in order to avoid getting hit. It’s nice and difficult.

Bullet Audyssey Screenshot

Pandemic 2

In this menu based game you create and evolve a disease with the goal of spreading it to every single person in the world in order to exterminate humanity. Evolve disease vectors, symptoms and resistances to make your disease the best it can be. On Kongregate, beating this game in under 100 days (game time) is an impossible achievement.

Pandemic 2 Screenshot

Rebuild

Take control of the last bastion of humanity after the zombie apocalypse. Manage your people to keep your base safe while expanding throughout the city. This game was sold on FlashGameLicense.com and apparently made its creator enough money for her to become a full-time game developer.

Rebuild Screenshot

These are just a few of the Flash games I’ve really enjoyed in the last year. Feel free to post your own favorite games in the comments.

Categories: Flash Games Tags:

Why Flash?

January 13th, 2012 No comments

Around when I started planning to develop a flash game, I had one of my programmer friends ask me why I would want to start learning Flash instead of HTML5 or Unity3d or any other game friendly development platform. He cited this article showing that even Adobe didn’t believe in the future of Flash.

There are many reasons why this didn’t stop me from starting with Flash for my first game development effort.

1. Flash games are incredibly popular on laptop and desktop computers

I started playing games on the Flash portal Kongregate about a year ago and they’re coming out with new content every week. Other sites like AddictingGames.com and Newgrounds are still thriving as well. With the most popular games on Kongregate getting over 10 Million plays I doubt that Flash is in danger of going obsolete any time soon.

2. It’s fairly easy to make games for Flash

I mentioned the Kongregate Shootorial before. Following the tutorial allows you to create a basic side-scrolling shooter in less than a day. I have a friend that had never programmed before that was able to complete it in 7 hours. Flash lowered the barrier to entry into game development for me.

3. Flash provides a large audience

Since Flash is web-based and free-to-play anyone can find and play my game once it’s published. If I were to create a Steam game it would be hard to get people to actually download the game. And there aren’t nearly as many iPhones or Android phones as there are computers. My hope is to get my game to as many people as possible, I’ll worry about monetizing it later.

Categories: Game Development Tags:

Strategy Game AI

January 12th, 2012 2 comments

So I had an epiphany today. Up until this point I had been planning on using a Monte Carlo-like algorithm to create a near universal strategy game AI. I knew it was something I could do, but it would require a decent time investment and might take too long to run before it could actually generate a good quality turn.

Then I realized, I want the enemies to be zombies. And why should zombies have an intelligent AI controlling them? So I think I can make the AI in my game work in almost exactly the same way that my movement works. During the AI turn for each unit, I’ll start from what’s next to them and then fan out til I hit the first enemy. Then I’ll randomly pick one of the shortest paths to that enemy and move the unit as close as it can get during it’s turn. It’s so simple, but makes so much sense for zombies. I haven’t finished updating it for the AI, but here’s the code I have for determining the total movement area available for a given unit.

//******Set starting tile as character’s current position******
currentNewTiles.push(new Array(attachedCharacter.currentHorPos, attachedCharacter.currentVertPos));

if(startDistance == 0) {

moveSquares.unshift(new MoveSquare(new Array(), attachedCharacter.currentHorPos, attachedCharacter.currentVertPos, squareType));
this.addChild(moveSquares[0]);

}
mapCheckArray[attachedCharacter.currentHorPos][attachedCharacter.currentVertPos] = 0;

//******Iterate through each possible move******
for (var moveCount:int = 1; moveCount <= endDistance; moveCount++) {

oldNewTiles = new Array();
oldNewTiles = currentNewTiles;
currentNewTiles = new Array();

//******For each space that was reached during the last move******
for each (var oldCoord:Array in oldNewTiles) {

var oldHeight:int = Main.tileMap.mapArray[oldCoord[1]][oldCoord[0]].tileHeight;

//******For each posible direction******
for (var directionCount:int = 0; directionCount < 4; directionCount++) {

//******Set new coord equal to old + new direction, but won’t go off map******
var newCoord:Array = new Array(Math.min(Math.max(oldCoord[0] + xArray[directionCount], 0), Main.mapWidth – 1),
Math.min(Math.max(oldCoord[1] + yArray[directionCount], 0), Main.mapHeight – 1));
var moveBlocked:Boolean = false;
var oldMoveCount:int = mapCheckArray[oldCoord[0]][oldCoord[1]];
var isImpassable:Boolean = Main.tileMap.mapArray[newCoord[1]][newCoord[0]].impassable;
var movesRequired:int =
Main.tileMap.mapArray[newCoord[1]][newCoord[0]].movesRequired[attachedCharacter.moveType];
var newTeam:int;
var tempCharacter:Character = Character.getCharacterAt(newCoord[0], newCoord[1]);

if (tempCharacter == null) {

newTeam = -1;

}
else {

newTeam = tempCharacter.characterTeam;

}

if (isImpassable) {

moveBlocked = true;

}
else if((oldMoveCount + movesRequired) > endDistance) {

moveBlocked = true;

}
else if (newTeam != characterTeam && newTeam != -1) {

moveBlocked = true;

}

if (squareType != “MOVE”) {

movesRequired = 1;

if (moveCount >= startDistance) {

newTeam = -1;

}
else {

newTeam = characterTeam;

}
moveBlocked = false;

}
//******Check if tile was reached previously or impassable******
if (mapCheckArray[newCoord[0]][newCoord[1]] > (oldMoveCount + movesRequired) && !moveBlocked) {

bestPathArray[newCoord[0]][newCoord[1]] = new Array();

for each(var tempVar:String in bestPathArray[oldCoord[0]][oldCoord[1]]) {

bestPathArray[newCoord[0]][newCoord[1]].push(tempVar);

}
bestPathArray[newCoord[0]][newCoord[1]].push(“1,”.concat(directionArray[directionCount]));
if (newTeam == -1) {

var squareFound:Boolean = false;

for (var i:int = 0; i < moveSquares.length; i++) {

if (moveSquares[i].horPos == newCoord[0] && moveSquares[i].vertPos == newCoord[1]) {

squareFound = true;
moveSquares[i] = new MoveSquare(bestPathArray[newCoord[0]][newCoord[1]], newCoord[0], newCoord[1], squareType);

}

}
if(!squareFound) {

moveSquares.unshift(new MoveSquare(bestPathArray[newCoord[0]][newCoord[1]], newCoord[0], newCoord[1], squareType));

}

}
currentNewTiles.push(new Array(newCoord[0], newCoord[1]));
mapCheckArray[newCoord[0]][newCoord[1]] = oldMoveCount + movesRequired;

}

}

}

}

I’m using actionscript 3 for the code if you’re curious. And here’s the result of all that code.

What a beautiful movement area

If there’s anything you’re interested in learning about what I’ve done so far or about the game development process, let me know in the comments.

Categories: Programming Tags:

The Story So Far

January 12th, 2012 No comments

As this is my first post, I believe an introduction is in order. My name is Kyle McGuffin and I’m in the process of programming my first published game ever. I’ve got a degree in Mathematical Economics from the University of Michigan which started me off working as a budget analyst and a web developer. I’ve enjoyed playing video games since I was 4 and have always thought that a career as a game designer/programmer would be fun. This is the start of me realizing that dream.

For my first game I’ll be using Flash to create a web based game. I started off by using the Flash Shootorial on Kongregate to learn the basics of Actionscript 3. I don’t know how much money is really in flash games, but I’ve heard several stories of people publishing games through Flash Game License so I figured it was a good place to start. My game will at least be published, even if it’s not very profitable.

My current idea is a turn-based strategy game in a medieval setting. The gameplay should be similar to Advance Wars, but with a completely different set of units since it’s medieval instead of modern. So far I’m planning on calling the game “Medieval Tactics” with a possible subtitle depending on if I add zombie enemies or not. Here’s a screenshot of the game so far.

The First Image of My Work

Most of the artwork is temporary and lifted from Google image searches. I have a friend that is working on the actual art assets for the game. Until those are ready, the placeholder images will have to do.

I’ll try to post my progress regularly. Hopefully you find my insights into creating a game for the first time interesting.

Categories: Game Update, Personal Tags: