Showing posts with label make games. Show all posts
Showing posts with label make games. Show all posts

Thursday, February 11, 2016

Get The Stars now for android

Join the small fairy and collect stars in this exciting little game. The game has easy controls and gameplay.
The good part is that its the same old html5 game with cordova around it. And I am using my favorite Phaser to make it. There are some tricks and tweaks to make everything work with cordova on android but after several days I think I grasped all details.
The most annoying problem with Phaser-Cordova game on android is the audio. Actually its a simple matter but there is not clear information or error messages so developers are left to struggle with this. Anyway, this post here is for my new, amazing android game - Get the Stars.
You can get it from the app store.
Please comment and rate my app.

Sunday, April 19, 2015

Solitaires, spring and some courses

Its hot outside and I must finish several solitaire games for 100solitaires.com. Working is not as fun when you want to be outside and play.
Anyway solitaires are extremely fun and addicting genre and I wanted to work on some similar project for some time.

Maybe I am masochist but instead of having some free time recently I am using all my time to study. Currently I've started several courses at coursera and I want to start a bit more.



  • Programming Mobile Services for Android Handheld Systems: Concurrency - very interesting course. My future plans are strongly related to Android so this course is extremely important for me.
  • Introduction to Finance - as a finance idiot I need this one. You can see some fundamental principles and I hope it can help me some day when I'll be super rich.
  • Introduction to Marketing - this one is to learn to sell my services better. Most of the time this skill is the one making money, not the programming. You may have amazing skills or product but if you can't promote it you won't make money from it. 

Friday, December 27, 2013

Where to find free art for your games

Finding good art for your games is not an easy task. And if your budget is 0$ finding art is really hard. Here is my list of sites where you can find free and legal art resources for your games.

1. opengameart.org - amazing collection of cool stuff. Your number one stop for art resources.

2. openclipart.org - cool vector art made with inkscape. Actually inkscape is something very useful for creating simple but stunning vector images

3. google.com - I don't need to describe this one or you've lived in a cave somewhere. You can use google image search and select an appropriate image license from the options.

Monday, November 4, 2013

Where to find quality free music and sound effects for your games

Music and sound effects are an important part of the game. Probably if you don't have them, your game will be overlooked by the players and portal owners and eventually you will consider it a failure. Although that is not always true and there are great games without any sound, its always better to have some high quality effects and nice music. Many people don't include music because they don't know where to find it.
I'll share with you where I choose music and effects for my games.
  1. incompetech.com - great music by Kevin MacLeod, licensed under Creative Commons: By Attribution 3.0. You can learn more about CC3 license here - Creative Commons 3.0
  2. newgrounds.com - at the good, old newgrounds you will be able to find anything, just be careful with the license
  3. opengameart.org - a lot of random game resources. You can find good sound effects and loops made by newbie composers. Again be careful with the licenses
  4. freesound.org - tons of sound effects and loops. Great place to start your search.
  5. google.com - just look around for appropriately licensed music

Monday, November 5, 2012

How to make simple shooting game like Balloon Hunt

For this tutorial I'll use only FlashDevelop as its easier this way. You can easily adapt it later to build with the Flash Ide.

So lets describe our game first. We will have flying targets all over the screen and we will click on them with the mouse in order to shoot them. You can play the original game here Balloon Hunt 2. First we will add the targets.

Now lets start with new AS3 project with size 640x480 and 50fps. Here is the stub code:

package  
{
 import flash.display.*;
 import flash.utils.*;
 import flash.events.*;
 
 public class Game extends MovieClip
 {  
  public function Game() 
  {   
  }  
 }
}
Now I'll add an array for our targets:
private var targets:Array = new Array();
And a separate class for our targets. Its a very simple class that extends MovieClip and we will use its graphics object to draw a circle in it.
 import flash.display.*;
 
 public class Target extends MovieClip
 {

  public var hit:Boolean = false;

  public function Target() 
  {
   graphics.beginFill(0xff0000);
   graphics.drawCircle(0, 0, 30);
  }
  
 }
And a function to our game class to start the game:
 
 import flash.display.*;
 import flash.utils.*;
 import flash.events.*;
 
 public class Game extends MovieClip
 {
  
  private var targets:Array = new Array();
  
  public function Game() 
  {
   startGame();
  }
  
  private function startGame() : void {
   var target:Target = new Target();
   target.x = 320;
   target.y = 240;
   this.addChild(target);
   this.addEventListener(Event.ENTER_FRAME, gameLoop);   
  }
  
  private function gameLoop(e:Event) :void {
   
  }
  
 }

Here you will see several things. First we add a target to our game just to see something on the screen. Next or actually first we call our function startGame from the constructor. And last we add a function that will be called every frame:
this.addEventListener(Event.ENTER_FRAME, gameLoop);
This will be our game loop. Now you can run the project and see what we get - a lonely target stuck at the center of our game. Lets change this - we will add target on regular basis. We need a counter for this - targetCounter.
private var targetCounter:int;
  
private const TARGETCOUNTER:int = 1000;
And we will add the variable lastTime:
private var lastTime:int;
And a code to the gameLoop function to track how much time have passed.
   if(lastTime == 0) lastTime = getTimer();
   var timeDiff:int = getTimer() - lastTime;
   lastTime += timeDiff;
Here is the full code:
 import flash.display.*;
 import flash.utils.*;
 import flash.events.*;
 
 public class Game extends MovieClip
 {
  
  private var targets:Array = new Array();
  
  private var lastTime:int;
  
  private var targetCounter:int;
  
  private const TARGETCOUNTER:int = 500;
  
  public function Game() 
  {
   startGame();
  }
  
  private function startGame() : void {
   lastTime = 0;
   targetCounter = 0;
   this.addEventListener(Event.ENTER_FRAME, gameLoop);   
  }
  
  private function gameLoop(e:Event) :void {
   if(lastTime == 0) lastTime = getTimer();
   var timeDiff:int = getTimer() - lastTime;
   lastTime += timeDiff;
  }
  
 }
Now we will start with adding targets and moving them around. I want to mention that the code is not optimized but I think it will be easier for beginners to understand it this way. Here is how we change the game loop now:
  private function gameLoop(e:Event) :void {
   if(lastTime == 0) lastTime = getTimer();
   var timeDiff:int = getTimer() - lastTime;
   lastTime += timeDiff;
   
   // next target counter
   targetCounter -= timeDiff;
   
   if (targetCounter <= 0) {
    // add new target
    var target:Target = new Target();
    target.x = -30;
    target.y = Math.random() * 480; // random
    this.addChild(target);
    targets.push(target);
    targetCounter = TARGETCOUNTER;
   }
   // move all targets
   for (var i:int = targets.length - 1; i >= 0; i--) {
    var tg:Target = targets[i];
    tg.x += timeDiff * 0.1;
    // check if the target is outside the screen
    if (tg.x > 670) { // 640 + 30
     this.removeChild(tg);
     targets.splice(i, 1);
    }
   }
  }
And here is the result:

Now its time to add the action. We will add the function mouseDown:
  private function mouseDown(e:MouseEvent) {
   
  }
And at startGame we will add this row:
this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
And here is the full code of mouseDown:
  private function mouseDown(e:MouseEvent):void {
   if (e.target is Target) {
    var target:Target = e.target as Target;
    target.hit = true;
   }
  }
And now we must change the part where we check if we must remove a target:
    if (tg.x > 670 || tg.hit) { // 640 + 30
     this.removeChild(tg);
     targets.splice(i, 1);
    }
And that's it all. Here is the full code if you've missed something:
Game.as
package  
{
 
 import flash.display.*;
 import flash.utils.*;
 import flash.events.*;
 
 public class Game extends MovieClip
 {
  
  private var targets:Array = new Array();
  
  private var lastTime:int;
  
  private var targetCounter:int;
  
  private const TARGETCOUNTER:int = 1000;
  
  public function Game() 
  {
   startGame();
  }
  
  private function startGame() : void {
   lastTime = 0;
   targetCounter = 0;
   this.addEventListener(Event.ENTER_FRAME, gameLoop);  
   this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
  }
  
  private function gameLoop(e:Event) :void {
   if(lastTime == 0) lastTime = getTimer();
   var timeDiff:int = getTimer() - lastTime;
   lastTime += timeDiff;
   
   // next target counter
   targetCounter -= timeDiff;
   
   if (targetCounter <= 0) {
    // add new target
    var target:Target = new Target();
    target.x = -30;
    target.y = Math.random() * 480; // random
    this.addChild(target);
    targets.push(target);
    targetCounter = TARGETCOUNTER;
   }
   // move all targets
   for (var i:int = targets.length - 1; i >= 0; i--) {
    var tg:Target = targets[i];
    tg.x += timeDiff * 0.1;
    // check if the target is outside the screen
    if (tg.x > 670 || tg.hit) { // 640 + 30
     this.removeChild(tg);
     targets.splice(i, 1);
    }
   }
  }
  
  private function mouseDown(e:MouseEvent):void {
   if (e.target is Target) {
    var target:Target = e.target as Target;
    target.hit = true;
   }
  }
  
 }

}
Target.as
package  
{
 
 import flash.display.*;
 
 public class Target extends MovieClip
 {
  
  public var hit:Boolean = false;
  
  public function Target() 
  {
   graphics.beginFill(0x00ff00);
   graphics.drawCircle(0, 0, 30);
   graphics.endFill();
  }
  
 }

}
And the final result:








Wednesday, November 2, 2011

How to make space shooter game with ActionScript 3 and FlashDevelop - part 1

As I mentioned in this post (How to make flash games without the expensive Flash IDE) you can make flash games and earn money without buying the Flash IDE. Actually, its very easy and I prefer to make my games this way. Here I’ll show very basic example that is appropriate even for beginners.

What do you need for this tutorial?
FlashDevelop - http://www.flashdevelop.org
Flex SDK - http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK

The basics

Let’s begin. Create new AS3 project and name it as you like. I’ll use the name Shooter for it.
This is what will be created for you.
And this is the content of Main.as:
package
{
   import flash.display.*;
   import flash.events.*;
   
   public class Main extends Sprite
   {
       
       public function Main():void
       {
           if (stage) init();
           else addEventListener(Event.ADDED_TO_STAGE, init);
       }
       
       private function init(e:Event = null):void
       {
           removeEventListener(Event.ADDED_TO_STAGE, init);
           // entry point
       }
       
   }
   
}
Add
trace(“Hello World”);
as the last row of the init function:
private function init(e:Event = null):void
       {
           removeEventListener(Event.ADDED_TO_STAGE, init);
           // entry point
        trace(“Hello World”);
       }
Now build and run your project. If everything is done wright you must see “Hello World” at the output window.

Let’s make some changes. First lets change the size and the frame rate. Go to Project->properties and make these changes:

Now our game will be 500x500 and will run at 50 fps(most of the time).

How to make space shooter game with ActionScript 3 and FlashDevelop - part 2

Saturday, September 3, 2011

Flash games - how to monetize them?

How to make money from flash games?
I can talk a lot about this question but I’ll try to make it short and clear.

There are several ways to make money from a flash game. And most of them can be combined for better profit.

First and most popular - flash game sponsoring.
How it works?
Basically a sponsor pays you a certain amount of money to place his logo, splash screen and eventually API into your game, then the game is released on his site. More about flash game sponsoring you can learn here - http://www.flashgamelicense.com/view_library.php

Other way to make money from your flash games are in-game ads. The most popular networks for in-game ads are CPM Star and MochiMedia.

Third method - selling in-game items and upgrades. I haven’t tried this yet so I can’t tell details about it but my opinion is that this way works better on mmo and social games.

Forth method - self sponsoring. Its the same as sponsoring but you advertise you own game portal and make money through it. This gives you some more freedom but its also a bit risky. Anyway if you can’t find sponsor for your game you can always self-sponsor it .

Resources
FlashGameLicense - you can find sponsor here or learn more about game sponsoring.
MochiMedia - ads, in-game transactions, leaderboard API and good distribution
CPMStar - in-game ads
Playtomic - analytics, leaderboards, distribution
FlashGameDistribution - distribution
HeyZap - game transactions, distribution

Friday, August 19, 2011

List of tutorials for beginner game developers - Flash and ActionScript

Here is a list of good Flash and ActionScript tutorials for game makers. If you want to learn more about how to make flash games consider reading them all.

Avoider Game Tutorial
http://gamedev.michaeljameswilliams.com/2008/09/17/avoider-game-tutorial-1/
Really good and detailed game tutorial.

Flash game creation tutorial
http://www.emanueleferonato.com/2006/10/29/flash-game-creation-tutorial-part-1/
Another good and long game tutorial.

Tile Based Games
http://www.tonypa.pri.ee/tbw/start.html
If you are serious on making games read this one too.

Make a Flash game like Flash Element Tower Defense
http://www.emanueleferonato.com/2007/10/06/make-a-flash-game-like-flash-element-tower-defense-part-1/
Good tower defense game tutorial.

How to create Tower Defense in ActionScript 3
http://www.flashgametuts.com/tutorials/advanced/how-to-create-a-tower-defense-game-in-as3-part-1/
Great tutorial!

How to make a vertical shooter
http://www.flashgametuts.com/tutorials/as3/how-to-make-a-vertical-shooter-in-as3-part-1/
Detailed and useful tutorial on making a shooter game.

How to create a Platform Game in AS3
http://www.flashgametuts.com/tutorials/as3/how-to-create-a-platform-game-in-as3-part-1/
If you want to make platform game read this one.

Build Tower Defense in ActionScript2
http://www.goofballgames.com/2009/10/25/building-a-tower-defense-game-in-flash-as2/
Its better to use ActionScript 3 but you can always get the idea and make the changes.

Complete Bejeweled Game
http://www.emanueleferonato.com/2010/12/16/complete-bejeweled-game-in-less-than-2kb/
How to make Bejeweled-like games - the tutorial is very detailed and not too hard.

Jigsaw Game tutorial
http://www.actionscript.org/resources/articles/13/1/Jigsaw-Puzzle/Page1.html

Wednesday, August 3, 2011

How to make flash games without the expensive Flash IDE

Can you make flash games without buying the Flash IDE? Actually, yes. You don't need to buy it to make online games. You can build flash files with the Flex SDK that is absolutely free tool by Adobe. You can learn more and download it free from here.

If you are serious about making flash games with Flex SDK I recommend you to use one more free tool called FlashDevelop. Its very useful open source editor for action script files with code completion that actually works.

If you are determined to make flash games but don't have much action script or game programming experience I recommend you to take a look at this open source game making library Flixel.