Flash Games Market Survey – 2010 edition

After the huge success of Flash Games Market Survey, Mochi Media in partnership with Flash Game License and Adobe present 2010 Flash Games Market Survey.

Last year’s survey showed just how vibrant the space is, it’s time to give some information again to help Mochi and partners to improve Flash gaming world. In addition, you can also win one of two $50 Amazon gift cards.

This survey is completely anonymous. Thanks for your time!!

Tic Tac Toe Artificial Intelligence

During these days I played a bit with Artificial Intelligence for a project I am working on (big news on the horizon) and I’m coming with a brief introduction to the simplest game you can use to test artificial intelligence. Tic Tac Toe.

It’s a pencil-and-paper game for two players, O and X, who take turns marking the spaces in a 3×3 grid, usually X going first. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game. (source: Wikipedia).

But most of all, it’s a good playground to apply artificial intelligence for four reasons:

It’s a perfect information game: all players know all moves that have taken place.

It’s a sequential game: when a player moves, the other player waits. And have the waiting player see the moves of the playing one.

It’s a zero sum game: if one player wins, the ohter loses. No cooperation.

It’s a non-random game: there isn’t any randomizing element such as dices, dealing of cards, and so on. Non-random games are pure strategy.

How many board configurations?

Now, we need to know how many boards configurations can exist in a Tic Tac Toe game. We’ll do it using php. We’ll code an empty board like a string with nine points (.........). Every point represents an empty cell. Then, with a recursive function, we’ll generate all possible board combinations, assuming the first player puts an X and the second player uses the O.

Here it is the script: Read more

Create a Flash game like Blockage – Movement prototype

This is one of those days when you want to make a thing work that way FULLSTOP.

And that’s it… this is the typical Blockage movement:

I wanted to do it without any timeline tween or tricks to change registration point on the fly, just using localToGlobal method. If you aren’t familiar with this method, read understanding AS3 localToGlobal method first.

So here it is the uncommented and unoptimized prototype. While comments and tutorial will come when I’ll integrate it into the making of the game, I think this can be useful to someone of you to have a sneak peak of what’s going on.

This is the main class:

1
2
3
4
5
6
7
8
9
10
11
package {
	import flash.display.Sprite;
	public class blkg extends Sprite {
		private var block:block_mc=new block_mc();
		public function blkg() {
			block.x=0;
			block.y=50;
			addChild(block);
		}
	}
}

and this is block_mc class: Read more

Worms-like destructible terrain in Flash – Part 3

After another truck of Aspirin, Jordi Sanglas Molist is back with the 3rd step of his Worms tutorial.

I’ve finished part 3. I almost got a headache. Forgive me if there are some mistakes, I wrote this post and the comments quickly.

Now the character is affected by the explosions. To do that, I added an horizontal speed and a friction. However, I don’t want the character to slide when I’m using the arrow keys, so:

* The arrow keys won’t use horizontal speed
* If the horizontal speed is different than 0 (an explosion is moving the character), I can’t use the arrow keys

To calculate the impulse, we will need to use trigonometry:

I’ve also solved another bug: if the character was falling (without using the space bar), it could jump in the air. Here I removed the jumping variable and I check if the character is on the ground.

Pay attention!!! Sometimes I check if the character is ON the ground (character.y+10) and sometimes I check if the character is TOUCHING the ground (character.y+9).

KNOWN BUGS:

* The horizontal speed won’t decrease faster or more slowly if the character is on a slope.
* The for loop isn’t exact when the horizontal speed is a decimal number (I think).

What should I do in the next part? I must do it before I start school, or I won’t have time.

While you think about the next part to request, here it is the script: Read more

Create a Flash game like Blockage

Did you play Blockage?

It’s a perfect game to make a tutorial series because at every level it introduces a new feature, so level after level you will see something new both in the game and in the prototype.

Other than that, it’s a tile based puzzle.

This first part will focus on level data. Since it’s a tile based game, you know we should create a bidimensional array, map all levels assigning each tile type a value such as zero for the empty space and one for the walls, and start creating the array tile after tile, just like in Create a Flash game like Rebuild Chile.

In this prototype I will try to “compress” the level packing it in a string containing comma separated values.

Let me explain the idea: count, from left to right, from upper to bottom corners, the number of contiguous walls.

There are 49 walls. Then, 14 empty spaces. Then, two walls. And so on. Exluding the actors (the square and the goal), create a string like this one:

49,1,14,0,2,1,14,0,2,1,14,0,8,1,1,0,56,1

That means the level has 49 walls (marked with 1), 14 empty spaces (marked with 0), then 2 walls, 14 spaces and so on.

So this code: Read more

Worms-like destructible terrain in Flash – Part 2

After having some troubles with the email, I am finally able to post Jordi Sanglas Molist‘s second step of Worms-like destructible terrain in Flash.

Now the character can jump and move. I’ve also solved a bug: in the last script I checked a collision using the feet, so if the terrain was between both feet the character would fall.

Now, instead of using a hitTest between a BitmapData and a point I use a hitTest between a BitmapData and a Rectangle.

We have to check more collisions, so I used four rectangles:

* The rectangle below the character is used to check if the character must fall

* The rectangle above the character is used to check if the character hit the ground (while he was jumping)

* The rectangles at the sides are used to check if the character can move.

These rectangles aren’t as long as the character, they’re 17 pixels height instead of 20. That’s because, if the character wants to move left and the obstacle isn’t high enough (high enough to reach the rectangle), the character will be able to move. A similar strategy is used in “Create a flash draw game like line rider or others – part 5“, where a point (the knee point) is used to check if the character can move.

I renamed the function “fall”: now it’s “move_character”. I only commented the new lines. Now I’m working on part 3, but I still don’t know how to calculate the explosion impulse. I looked for some information, but now I’m thinking about maths (an explosion is a growing circle). Read more

Create a Flash racing game – Flex version

Hamilton Lombardi is a brazilian Flex programmer who decided to rewrite the code you can find in the original post for Flex 4.

Moreover he added a splash screen, as you can see:

The source code is clearly formatted and commented as you can see from Level class: Read more

Claytus Hood Tower Defense case study

I always loved games that revive an old concept with new features, and Claytus Hood Tower Defense is one of them.

Based on the old “tower defense” theme, it introduces new strategy options with large, scrollable maps and the capability to block some paths to make enemies take a larger route to attack you base.

Roux Raphaël, the author, shares with us his experience:

« Why did I decide to work on Claytus?

Before that, I used to be a developer for a web agency, coding online shops or institutional communication websites… not that fun!

After I lost my job at the end of 2009, I decided to increase my knowledges in AS3, to code funny stuff like games for example!

I always learnt programming by myself (the geekish way), with books, resources found on the web and personal experience…

I thus decided to read Keith Peters’ book “AS3 animation – Making Things Move” to fill my gaps in maths, and I saw lots of quite useful things to code games I had forgotten.

After reading this book, I managed to learn AI and Pathfinding, I thus studied A* algorithm.

Here are the examples I inspired myself of to learn A* :
http://www.remixtechnology.com/view/AStar-haXe.

Well, I reviewed trigonometry, I know A*, what can I do with it? A Tower Defense game! Let’s code! Read more

The perfect swf file size of your Flash games

When you are making a Flash game, do you worry about the final size of your swf?

I had a look at 17.666 games with known filesize actually stored in Triqui.com, parsed from MochiMedia, and that’s what I found

Average swf file size: 0.99MB

swf file size # of games %
<100KB 2512 14.22
100 – 250KB 3311 18.74
250 – 500KB 3477 19.68
500KB – 1Mb 3271 18.52
1MB – 5MB 4596 26.02
>5MB 499 2.82

Finally, this is a chart representing the number of games (horizontal) for at any size (vertical) with a 250KB step

What’s your average swf size?

More mobile Flash game contests – $80,000 in prizes!!

If you think $30,000 in prizes aren’t enough, here they come $50,000 more in prizes from Kongregate‘s Mobile Flash Game Contest and MochiMedia‘s Made for Mobile Contest, for a grand total of $80,000!!!

This is the first time in Flash gaming history that three big sites host contests with the same topic, this means you could enter all contest with the same game… let’s make a recap:

Cell Your Flash Game by FlashGameLicense

Prizes: from $2,600 + Adobe Creative Suite 5 Master Collection to $100 (150 places elegible)
Deadline: September 6, 2010
Criteria: The Game must be able to be played on an Android 2.2 smart phone (the “Device”) – The Game must be of a high quality level and enjoyable to players – The Game must scale appropriately to multiple screen resolutions, keeping buttons and interactive elements at a usable size – The Game’s rescaled user interfaces must work with game logic. For example, hunt-the-pixel games must not become unacceptably difficult – Game input events that aren’t supported on the Device – like mouse-over and mouse-move events – must not be important to gameplay
Official page: http://www.flashgamelicense.com/sponsor_pages/adobe/

Mobile Flash Game Contest by Kongregate

Prizes: from $5,000 + Adobe Creative Suite 5 Web Premium to $750 (15 places elegible)
Deadline: August 23, 2010
Criteria:Graphics optimized for mobile device; Text/Instructions/scores, clearly legible; buttons large enough to use on touch screen – Game works regardless of input options (keyboard, touch screen, accelerometer, etc), easy to navigate and play; pause/save options; intuitive; seamless landscape, portrait, and full screen display; leverage and understand the device -Loads fast, built at 25-30 frames/second, fast start up time – Addictive, unique, can be adopted across multiple audiences – Built with standards in mind; easy to adapt to other displays quickly with minimal recoding effort; device and player detection, opportunity to integrate with social media.
Official page: http://www.kongregate.com/pages/mobile-game-contest

Made for Mobile by MochiMedia

Prizes: from $7,000 + Adobe CS5 Master Suite to $50 (105 places elegible)
Deadline: September 24, 2010
Criteria: Must incorporate Mochi Live Updates – Must use the Mochi Ads API advertisements – Must be formatted and performance tested for mobile devices (see rules for more info) – Must be tagged/keyworded with the phrase “adobe2010″ – Highly encouraged to use at least one of several mobile specific features
Official page: http://www.mochimedia.com/contest/jul10

Hope this recap helps. Now, it’s REALLY time to write some tutorial about mobile developing…

Next Page →