Where to start when making a new game
When you are about to start a new game, obviously the first thing you decide is the concept.
No matter whether you change it during the making of the game or not, I think we all start from the idea “hey, let’s make a game people will play this way”.
Then, when you have an idea of the kind of game you are going to make, you can start coding… or drawing… or looking for a music… or… how do you start a game?
I always started my games from the code… some boxes representing the objects and sprites, and then I tried to improve the graphics… but I always ended with games with poor graphics.
For my latest game, to be released within a week, I decided to start from the graphics.
So I looked for some cartoonish landscapes like this one:

http://www.flickr.com/photos/ballookey/317256732/
And I started drawing something similar in Flash. Read more
Apply amazing filters to your photos with Virtual Photographer
If you are looking for a software that lets you instantly apply high quality, professional photographic styles to your digital images with just one click, then optikVerve Labs ‘ virtualPhotographer is the software you need.
This free package comes in two versions: as a Photoshop plugin or as a standalone software.
I tested the PS plugin and that’s what I think about it:
First, on the official site you will find virtualPhotographer is compatible with Photoshop CS3 and older

But I successfully installed (and used) it on my CS4 Master Collection version. Read more
Understanding AS3 ColorMatrixFilter class
Do you want to apply color correction to images into your Flash movies on the fly?
Then ColorMatrixFilter is the class you need.
The ColorMatrixFilter class lets you apply a 4 x 5 matrix transformation on the RGBA color and alpha values of every pixel in the input image to produce a result with a new set of RGBA color and alpha values.
The color matrix filter separates each source pixel into its red, green, blue, and alpha components as srcR, srcG, srcB, srcA.
To calculate the result of each of the four channels, the value of each pixel in the image is multiplied by the values in the transformation matrix.
It allows saturation changes, hue rotation, luminance to alpha, and various other effects.
For more information visit the official Adobe docs page.
Around the web you can find a lot of examples of photos loaded with Flash and sliders to change colors, but I want to explore this feature from a coding point of view.
I will make some experiment on this photo I found on Flickr

The first thing is creating a MovieClip with the image inside. I called it cats, so with this simple code I display the cats on the stage: Read more
Playing with Google Analytics API
I think you all know Google Analytics.
A Google Analytics API has long been one of the most widely anticipated (and wanted from developers) features. On April 21st, 2009 the official blog announced that the Google Analytics Data Export API beta is now publicly available to all Analytics users.
The API will allow developers to extend Google Analytics in new and creative ways and integrate Google Analytics into their existing products and create standalone applications that they sell.
Read more at the official post.
So I think it’s time to play a bit with this new toy.
Today we’ll learn how to autenticate to the service.
I made the script you are about to see reading the information at this page.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <?php header("Content-type: text/plain"); $email = "xxxxxx@xxx.xx"; $password = "xxxxxxx"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.google.com/accounts/ClientLogin"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch,CURLOPT_HEADER,true); curl_setopt($ch, CURLOPT_POSTFIELDS,"accountType=GOOGLE&Email=$email&Passwd=$password&service=analytics&source=feronatoblog"); curl_exec($ch); curl_close($ch); ?> |
Line 3: Setting the header to text/plain because I am going to output plain text instead of html
Lines 5-6: Assigning to two variables my Analytics email and password. Obviously replace the xxx with your correct Analytics email and password
Line 8: Initializing a cURL handle. I am using it to communicate to Google servers using HTTP protocol and pass variables in POST mode. More information about the cURL library at this link.
Lines 9-12: Setting some options for the cURL handle. CURLOPT_URL is the URL to fetch, CURLOPT_POST to perform a HTTP POST, CURLOPT_HEADER to include the header in the output and CURLOPT_POSTFIELDS contains the full data to post in a HTTP “POST” operation.
This way I am simulating an HTML form submission to https://www.google.com/accounts/ClientLogin using POST method.
Let’s take a look at the variables I am sending:
accountType: Type of account to be authenticated. The default is GOOGLE (I found it’s not case sentitive).
Email: The user’s email address.
Passwd: The user’s password.
service: The Analytics service name is analytics.
source: A string identifying your client application in the form companyName-applicationName-versionID (actually you can write whatever you want).
Lines 13 and 14 perform and close the cURL session.
This is the result if everything went fine:
1 2 3 4 5 6 7 8 9 10 11 12 13 | HTTP/1.1 200 OK Content-Type: text/plain Cache-control: no-cache, no-store Pragma: no-cache Expires: Mon, 01-Jan-1990 00:00:00 GMT Date: Sat, 25 Apr 2009 19:02:11 GMT X-Content-Type-Options: nosniff Content-Length: 563 Server: GFE/2.0 SID=DQAAA... LSID=DQAAA... Auth=DQAAA... |
The Auth code is what we need to retrieve account and report data. I’ll show you how to do it next time.
At the moment I am integrating the Analytics in a control panel we provide to some customers, in order to give them access to all information from a single page.
Do you have a creative use of this API in your mind? Look at some examples at this link and you will agree this is a great feature
Fifteen Million Plays Club membership
Some months ago, my second game, Christmas Couples, joined the Ten Millions Plays Club.
I am happy to inform you now I am in the Fifteen Million Plays Club.

This is my most successful game, in terms of games played.
What’s yours?
Thousands of patterns for your Flash arcade game
One of the most successful arcade of all times is Bubble Bobble.
Besides the awesome gameplay, one of its features that made it a successful game was its cute graphic design.
If you look at the picture, every level is made by a just a black screen with some platforms, but the patterns filling these platforms give the game an interesting look.

The following is a list of sites that offers patterns I think you can find useful for your next Flash arcade game.
Remember to check the license before using one of them for commercial use
www.brusheezy.com/patterns – free Photoshop patterns
squidfingers.com/patterns/1/ – more than 150 pixel patterns
www.dinpattern.com/index.php – some interesting big patterns that can be used as backgrounds
bgpatterns.com/ – online tool to create your own pattern
patterns.ava7.com/ – about one thousand patterns searchables by color and theme
www.deviantart.com/#catpath=resources/applications&order=9&q=pixel+pattern – more than 50 resources for pixel patterns
www.k10k.net/pixelpatterns/ – a lot of tiny pixel patterns
veredgf.fredfarm.com/pattern-bomb/ – patterns for non commercial use only
www.tilemachine.com/ – design your own tile or choose one from the gallery
http://www.kollermedia.at/pattern4u/ – more than 250 patterns
www.fontastica.com/pixel-patterns.html – pattern fonts, very “Game Boy” look
www.colourlovers.com/patterns – thousands of patterns
www.clickpopmedia.com/tag/pixel-patterns/ – some black/white pixel patterns
celestial-star.net/patterns/ – pattern files for Photoshop
www.stripegenerator.com/ – online tool to create your own striped pattern
If you know more, just let me know.
Got funds for my project with My Micro Fund!!
Just a few days ago I blogged about (try to) Get funds for your project with My Micro Fund.
Today I am glad to announce Alex from My Micro Fund liked my proposal and gave me some money to start the project I submitted.
I am proud to say another reader of this blog got the funds necessary to start his project… I would ask him to unveil something more, but now it’s time to share a couple of points with you:
How to ask for a Micro Fund
Alex is a nice person but he won’t give his money to anybody. That’s how I asked for my funds
Introduce yourself: yes, your first and last name, the country you live in and all these kind of annoying information. If you have a webpage with something about you, then just give him the link and you’ll save some “tic-toc-tic” on the keyboard
BRIEFLY explain your idea: the keyword is “briefly”. This means “The next big Flash game” is not the way you should explain your idea, and starting with the story of Macromedia Flash becoming Adobe Flash with all difference between AS2 and AS3 will be quite boring to read. That’s how I explained my idea:
The idea is making a Flash Sokoban game with thousands of levels that can be played also on Facebook
followed by a quick summary about monetizing a Flash game (I have to say, I sent him the link to the experiment).
Provide a timeline and your motivation to complete the project: nobody wants to wait for years for your next big thing… so tell when will your project will be finished and explain why you should be the right person to manage the project. In my case, being the project a Flash game, I showed some games I made. I wouldn’t be able to get the funds if I wanted to make the next World of Warcraft competitor…
Time to talk about money: ask how much do you need for the project and how will you spend the money. Remember Alex isn’t paying you to make a game, he is giving funds for your project… so if you are developing an iPhone application, you must specify you need (example) $1000 for a Mac.
In my case, I explained I need a professional logo, a solid hosting plan, and some money for the promotion.
Try to be clear about the refunding process, even in the worst case… shoud your project be a failure.
Why did I ask for a fund?
Interesting question… I can afford this project but I asked for funds anyway. Why? First, I wanted to test this system, but mainly I am messing around with Sokoban since 2004… having someone waiting for the project to be live shortly and spreading this through the net will motivate me to complete the project and wipe out some vaporware out of my life
The perfect size for a Flash game
When you are about to design a Flash game, one of the first things you must consider is the size of the stage.
Those “width” and “height” parameters must be set carefully. A size too small allows limited gameplay, while a big one can cause problems to users playing at not-so-high resolutions on not-so-powerful computers, such as netbooks.
While you should set the stage size according to the gameplay (a Tetris clone should have a portrait size, while a Metro Siberia Underground clone should have a landscape size), it’s interesting to have a brief overview about other games’ size.
Thanks to my MochiAds plugin for WordPress I collected the sizes of 7,873 games and made some queries to obtain some interesting stats.
This won’t tell you the perfect size for a Flash game, but it will help you to know the most used game sizes
| Width | Height | |
| Average | 617 | 469 |
| Max | 1280 | 900 |
| Min | 300 | 207 |
| Most used | 550 (23%) 600 (15%)640 (13%) |
400 (31%) 480 (12%) 600 (10%) |
And this is the top 5 chart of the most used resolutions:
1) 550×400 (18%)
2) 640×480 (11%)
3) 600×400 (6%)
4) 800×600 (5%)
5) 750×530 (2%)
What’s your favorite Flash game size?
Adobe CS4 Master Collection
Do you want to know what do Adobe ships to you when you purchase the Adobe Creative Suite 4 Master Collection?
Here it is:

Five DVDs with the suite itself and one DVD with two hours of video footage about using CS4 softwares.
Let me remember you the software included:
InDesign CS4
Photoshop CS4 Extended
Illustrator CS4
Acrobat 9 Pro
Flash CS4 Professional
Dreamweaver CS4
Fireworks CS4
Contribute CS4
After Effects CS4
Adobe Premiere Pro CS4
Soundbooth CS4
Adobe OnLocation CS4
Encore CS4
Adobe Bridge CS4
Adobe Device Central CS4
Dynamic Link
Version Cue CS4
I still haven’t installed it, so I can’t say, at the moment, if there is something made exclusively for the box retail edition, something the downloadable version does not have.
Create a “Share on Facebook” link in your WordPress blog
With its over 200 millions registered users (read 200 Million Strong) Facebook can bring a lot of traffic to your blog, so in my opinion it’s very important to add a “Share on Facebook” button to your blog.
Facebook Sharer
If you noticed, Facebook as a sharer url allowing you to share a link.

I am going to use this feature to create the button.
sharer.php needs two variables to share your page: u for the link and t for the title, so we need to create a link like
http://www.facebook.com/sharer.php?u=the_link&t=the_title
WordPress functions
The function that returns URL for the permalink to the post currently being processed is the_permalink(). You can read more information about it at the official page.
The function to get the title is (guess what?) the_title. More information at the official page.
Some icons
Just in case you are looking for some interesting Facebook icons, I am giving you a couple of links:
http://csi.nfshost.com/goodies/
http://www.webfruits.it/dblog/articolo.asp?articolo=62 (this one is in italian, just go on download button at the end of the page).
If you know more links about free Facebook icons, just let me know and I’ll add them here.
The code
Time to write some code now… in your wp-content/themes/ folder of your WP installation, locate the folder of your theme and check for single.php file.
Warning: not all themes have a single.php file… if you can’t find it, then probably the right file to edit is index.php… anyway it could be the right file if you see the_content() function.
The code I suggest you to add, after the_content, is
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank">Share on Facebook</a>
And you’ll have your Facebook link like the one I added on my blog.
- Citrus Engine released for free for learning
- My epic fail with ClickBank
- Get up to $100,000 for your next Flash game with Mochi GAME Developer Fund
- Create a dynamic content animated footer ad for your site in just 9 jQuery lines – 17 lines version
- Sell sitelocked version of your Flash games and even .fla sources to Free Online Games
- Protect your work from ActionScript code theft with SWF Protector
- Create a dynamic content animated footer ad for your site in just 9 jQuery lines
- Understanding Box2D’s one-way platforms, aka CLOUDS
- Triqui MochiAds Arcade plugin for WordPress upgraded to 1.2
- Box2D Flash game creation tutorial – part 2
- Create a Lightbox effect only with CSS - no javascript needed
- Flash game creation tutorial - part 1
- Create a Flash Racing Game Tutorial
- Flash game creation tutorial - part 2
- Make a Flash game like Flash Element Tower Defense - Part 2
- Flash game creation tutorial - part 3
- Triqui MochiAds Arcade plugin for WordPress official page
- Make a Flash game like Flash Element Tower Defense - Part 1
- Create a flash draw game like Line Rider or others - part 1
- Create a flash artillery game - step 1
- Flash game creation tutorial – part 5.2 (4.88/5)
- Create a flash artillery game – step 1 (4.79/5)
- Create a Flash Racing Game Tutorial (4.76/5)
- Create a survival horror game in Flash tutorial – part 1 (4.74/5)
- Create a flash artillery game – step 2 (4.74/5)
- Creation of a Flash arcade site using WordPress – step 2 (4.73/5)
- Flash game creation tutorial – part 1 (4.71/5)
- Flash game creation tutorial – part 2 (4.71/5)
- Create a flash draw game like Line Rider or others – part 1 (4.69/5)
- Creation of a platform game with Flash – step 2 (4.68/5)



