Tag: #idevblogaday

Announcing the first Corona SDK book

 

UPDATE: Unfortunately I won’t finish the book for now. But, you can get the book “Corona SDK Mobile Game Development: Beginner’s Guide” by Michele Fernandez: http://goo.gl/rb8g2

This is something that has been on the works and I feel it’s time to start talking about it already!

I’m writing the first dedicated book about the Corona SDK, and it will be published by a very good and known publisher. Although I can’t reveal which one yet.

The book will be beginner focused, but that doesn’t mean you won’t learn advanced subjects. Also if you already are a programmer or game developer, it will help you learn Lua and the whole Corona SDK.

You will learn Lua and almost all details of the Corona SDK. The book will be tutorial and example driven: you won’t read boring texts about this or that. You will be actually making games while learning Corona! It will be a ready-to-action book.

I will try to give weekly previews about the book, this way I can get your feedback of what you think and expect. Expect more news soon!

Getting news about the book

There is nothing fancy set yet, but you can already like the Facebook page for the book, add the book’s official site to your bookmarks or follow me on Twitter, @KarnakGames.

Book newsletter. Your e-mail:

The last #iDevBlogADay for now

#iDevBlogADay has new rules, and for this reason, I have to give my spot to another person. It’s been almost 6 months of writing 4 posts per month. It was a pleasant and nice experience. And I could say that my time is over in a good moment: I have to focus on the book as well on the dozens of game development contracts I have on my hands.

That doesn’t mean the blog is over. I will keep writing and updating here, probably not weekly, but at least monthly (or weekly for the book previews). You can find constant updates from me on my Twitter @KarnakGames.

With #iDevBlogADay, my blog went from 200 visits/monthly to more than 4000, which is stable now. Thanks Miguel and all the community for the amazing #iDevBlogADay! And good luck for the blogger that is taking my spot.

How to make a simple physics based shooter game with the Corona SDK

 

Corona Simple ShooterIn this article I’ll share with you a very super simple shooter with Corona. The aim of this code is to show you how simple is to setup physic based behaviors with the Corona SDK, how to setup a game loop, handle basic touches, score system and play sound effects.

About the game

  • We have the player (which is a plane) and this plane is constantly shooting bullets automatically with random speed.
  • Physics based, where the enemies just fall down thanks to the gravity, so we don’t need to worry about moving them.
  • The player and the bullets are of the type “kinematic” so they aren’t affected by gravity.
  • For each bullet that hits an enemy plane, we earn one point, show on the top left of the screen.
  • The only way of losing the game is colliding with an enemy plane.
  • There is pew-pew!

The Complete Game with Assets

I’m using 3 sprites from the SpriteLib by Ari Feldman (those sprites are under GPL, which means we can freely using it under some conditions). For the sounds I used the excellent cfxr.

Download everything here.

NOTE: the code is not ready for production use.

The Source Code

Here is the complete code for the game. It is commented, and you can read it up down, it is placed in a form of tutorial. If you have any doubts/questions, please drop a comment below.

The game code itself without comments is around 150 lines. Also it took me around 20 minutes to make. So you bet it? How simple is that? :)

-- Hide status bar, so it won't keep covering our game objects
display.setStatusBar(display.HiddenStatusBar)

-- Load and start physics
local physics = require("physics")
physics.start()

-- A heavier gravity, so enemies planes fall faster
-- !! Note: there are a thousand better ways of doing the enemies movement,
-- but I'm going with gravity for the sake of simplicity. !!
physics.setGravity(0, 20)

-- Layers (Groups). Think as Photoshop layers: you can order things with Corona groups,
-- as well have display objects on the same group render together at once.
local gameLayer    = display.newGroup()
local bulletsLayer = display.newGroup()
local enemiesLayer = display.newGroup()

-- Declare variables
local gameIsActive = true
local scoreText
local sounds
local score = 0
local toRemove = {}
local background
local player
local halfPlayerWidth

-- Keep the texture for the enemy and bullet on memory, so Corona doesn't load them everytime
local textureCache = {}
textureCache[1] = display.newImage("assets/graphics/enemy.png"); textureCache[1].isVisible = false;
textureCache[2] = display.newImage("assets/graphics/bullet.png");  textureCache[2].isVisible = false;
local halfEnemyWidth = textureCache[1].contentWidth * .5

-- Adjust the volume
audio.setMaxVolume( 0.85, { channel=1 } )

-- Pre-load our sounds
sounds = {
	pew = audio.loadSound("assets/sounds/pew.wav"),
	boom = audio.loadSound("assets/sounds/boom.wav"),
	gameOver = audio.loadSound("assets/sounds/gameOver.wav")
}

-- Blue background
background = display.newRect(0, 0, display.contentWidth, display.contentHeight)
background:setFillColor(21, 115, 193)
gameLayer:insert(background)

-- Order layers (background was already added, so add the bullets, enemies, and then later on
-- the player and the score will be added - so the score will be kept on top of everything)
gameLayer:insert(bulletsLayer)
gameLayer:insert(enemiesLayer)

-- Take care of collisions
local function onCollision(self, event)
	-- Bullet hit enemy
	if self.name == "bullet" and event.other.name == "enemy" and gameIsActive then
		-- Increase score
		score = score + 1
		scoreText.text = score

		-- Play Sound
		audio.play(sounds.boom)

		-- We can't remove a body inside a collision event, so queue it to removal.
		-- It will be removed on the next frame inside the game loop.
		table.insert(toRemove, event.other)

	-- Player collision - GAME OVER
	elseif self.name == "player" and event.other.name == "enemy" then
		audio.play(sounds.gameOver)

		local gameoverText = display.newText("Game Over!", 0, 0, "HelveticaNeue", 35)
		gameoverText:setTextColor(255, 255, 255)
		gameoverText.x = display.contentCenterX
		gameoverText.y = display.contentCenterY
		gameLayer:insert(gameoverText)

		-- This will stop the gameLoop
		gameIsActive = false
	end
end

-- Load and position the player
player = display.newImage("assets/graphics/player.png")
player.x = display.contentCenterX
player.y = display.contentHeight - player.contentHeight

-- Add a physics body. It is kinematic, so it doesn't react to gravity.
physics.addBody(player, "kinematic", {bounce = 0})

-- This is necessary so we know who hit who when taking care of a collision event
player.name = "player"

-- Listen to collisions
player.collision = onCollision
player:addEventListener("collision", player)

-- Add to main layer
gameLayer:insert(player)

-- Store half width, used on the game loop
halfPlayerWidth = player.contentWidth * .5

-- Show the score
scoreText = display.newText(score, 0, 0, "HelveticaNeue", 35)
scoreText:setTextColor(255, 255, 255)
scoreText.x = 30
scoreText.y = 25
gameLayer:insert(scoreText)

--------------------------------------------------------------------------------
-- Game loop
--------------------------------------------------------------------------------
local timeLastBullet, timeLastEnemy = 0, 0
local bulletInterval = 1000

local function gameLoop(event)
	if gameIsActive then
		-- Remove collided enemy planes
		for i = 1, #toRemove do
			toRemove[i].parent:remove(toRemove[i])
			toRemove[i] = nil
		end

		-- Check if it's time to spawn another enemy,
		-- based on a random range and last spawn (timeLastEnemy)
		if event.time - timeLastEnemy >= math.random(600, 1000) then
			-- Randomly position it on the top of the screen
			local enemy = display.newImage("assets/graphics/enemy.png")
			enemy.x = math.random(halfEnemyWidth, display.contentWidth - halfEnemyWidth)
			enemy.y = -enemy.contentHeight

			-- This has to be dynamic, making it react to gravity, so it will
			-- fall to the bottom of the screen.
			physics.addBody(enemy, "dynamic", {bounce = 0})
			enemy.name = "enemy"

			enemiesLayer:insert(enemy)
			timeLastEnemy = event.time
		end

		-- Spawn a bullet
		if event.time - timeLastBullet >= math.random(250, 300) then
			local bullet = display.newImage("assets/graphics/bullet.png")
			bullet.x = player.x
			bullet.y = player.y - halfPlayerWidth

			-- Kinematic, so it doesn't react to gravity.
			physics.addBody(bullet, "kinematic", {bounce = 0})
			bullet.name = "bullet"

			-- Listen to collisions, so we may know when it hits an enemy.
			bullet.collision = onCollision
			bullet:addEventListener("collision", bullet)

			bulletsLayer:insert(bullet)

			-- Pew-pew sound!
			audio.play(sounds.pew)

			-- Move it to the top.
			-- When the movement is complete, it will remove itself: the onComplete event
			-- creates a function to will store information about this bullet and then remove it.
			transition.to(bullet, {time = 1000, y = -bullet.contentHeight,
				onComplete = function(self) self.parent:remove(self); self = nil; end
			})

			timeLastBullet = event.time
		end
	end
end

-- Call the gameLoop function EVERY frame,
-- e.g. gameLoop() will be called 30 times per second ir our case.
Runtime:addEventListener("enterFrame", gameLoop)

--------------------------------------------------------------------------------
-- Basic controls
--------------------------------------------------------------------------------
local function playerMovement(event)
	-- Doesn't respond if the game is ended
	if not gameIsActive then return false end

	-- Only move to the screen boundaries
	if event.x >= halfPlayerWidth and event.x <= display.contentWidth - halfPlayerWidth then
		-- Update player x axis
		player.x = event.x
	end
end

-- Player will listen to touches
player:addEventListener("touch", playerMovement)

How to take in-game screenshots with Cocos2D and upload them to a Facebook album

 

I’ll be covering a very cool feature to add a new social feature in your game: posting in-game screenshots straight from the game to a Facebook album! I managed to do it today for a client game and it worked smoothly, so why not sharing?

What is covered in this article?

  1. Taking a screenshot via code from your Cocos2D game and storing it in an UIImage.
  2. Integrating Facebook into your Cocos2D game.
  3. Posting the screenshot to the Facebook account of the player (upon permission).

Taking Screenshots in Cocos 2D

This step was the easiest one for me. Oh wait, it’s not that easy to take a screenshot of the actual state of your game: what I have done was using a code written by Manu Corporat (Infinity Field developer). Grab the “Cocos2D Screenshot” methods here and add them inside the class CCDirectorIOS (cocos2d/Platforms/iOS/CCDirectorIOS.m) – it works for iPhone, iPhone 4 and iPad screenshots, e.g. all iOS devices and versions.

You can now take screenshots from your game by just calling:

UIImage *screenshot = [[CCDirector sharedDirector] screenshotUIImage];

You can even save this image in a folder (or even the Photo Album):

NSString *savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Screenshot.png"];

// Write image to PNG
[UIImagePNGRepresentation(tempImage) writeToFile:savePath atomically:YES];

Integrating Facebook into your Cocos2D game

- First of all, Setup a New App on Facebook: http://www.facebook.com/developers/. Once the application is created, click on the left tab “Mobile and Devices”, change the “Application type” to “Native App” and copy the “Application ID”.

- Open your Xcode project and add the following keys to your info.plist: Key: URL types -> Key: Item 0 -> Key: URL Schemes -> Key: Item 0 -> Value: fbYOUR_APP_ID (include the fb), it should look like:

Facebook - info.plist

- Clone the Facebook iOS-SDK from Git: https://github.com/facebook/facebook-ios-sdk.

Drag the “src” folder into your Xcode project.

- If you want the official “Login with Facebook” blue button, open the folder “sample” that you cloned with the Facebook SDK, and right click “FBConnect.bundle” -> Show Package Contents -> copy and paste the images you want in your Cocos2D project. Consider renaming @2x to -hd.

- Import FBConnect.h into your Cocos2D Scene or Layer, the one in which you want to open the Facebook connection:

#import "FBConnect.h"

- Your class interface has to implement the Facebook delegates, as well have some members:

@interface HelloWorld : CCLayer
{
	// Facebook
	Facebook *facebook;
	BOOL isFBLogged;

	// GUI
	CCLayer *shareLayer;
	CCMenuItem *facebookLoginButton, *facebookLogoutButton;
	CCLabelTTF *message;
}

- Add the GUI to handle facebook messages, as well the Login button (in this case you do as you wish, the way I’m doing is just an easy example). Although my GUI code is just an example, note that I’m inserting them inside a child CCLayer. When we are going to take the screenshot, we won’t want the Facebook button in the screenshot, nor the label saying “SHARE”, so I’ll just turn visibility of the layer on and off, instead of turning every element individually.

-(id) init
{
	if( (self=[super init] )) {
		CGSize size = [[CCDirector sharedDirector] winSize];

		CCSprite *gameElement = [CCSprite spriteWithFile:@"poolplane.png"];
		gameElement.position = ccp(size.width * .5, gameElement.contentSize.height * .5);
		[self addChild:gameElement];

		shareLayer = [CCLayer node];
		[self addChild:shareLayer];

		facebookLoginButton = [CCMenuItemImage itemFromNormalImage:@"LoginWithFacebookNormal.png" selectedImage:@"LoginWithFacebookPressed.png" disabledImage:@"LoginWithFacebookPressed.png" target:self selector:@selector(facebookLogin)];

		CCMenu *fbMenu = [CCMenu menuWithItems:facebookLoginButton, facebookLogoutButton, nil];
		fbMenu.position = ccp(size.width * .5, size.height * .5 + facebookLoginButton.contentSize.height * 3);
		[shareLayer addChild:fbMenu];

		message = [CCLabelTTF labelWithString:@"Share in Facebook!" fontName:@"Marker Felt" fontSize:24];
		message.position = ccp(size.width * .5, fbMenu.position.y + facebookLoginButton.contentSize.height);
		[shareLayer addChild:message];
	}
	return self;
}

Logging in into Facebook and getting permissions

We may enable the user to login into his Facebook account by simply calling the Facebook:authorize method passing in the permissions we want to get. We also may already hide unecessary items for the screenshot before calling the Facebook authorize method. You will know why later on.

- (void) facebookLogin
{
	// The screenshot is going to be taken instantly after the login,
	// so already hide GUI/unecessary stuff
	shareLayer.visible = NO;

	if (facebook == nil) {
		facebook = [[Facebook alloc] initWithAppId:@"FACEBOOK-APP-ID"];
	}	

	NSArray* permissions =  [[NSArray arrayWithObjects:
							  @"publish_stream", @"offline_access", nil] retain];

	[facebook authorize:permissions delegate:self];
}

Now we implement the delegate functions to handle the login request responses. They are very simple. The game will take the screenshot right after logging in (inside FBSessionsDelegate:fbDidLogin) and that is why we’ve hidden the GUI before logging in (the takeScreenshot screen is detailed below).

#pragma mark -
#pragma mark FBSessionDelegate
/**
 * Called when the user has logged in successfully.
 */
- (void)fbDidLogin {
	isFBLogged = YES;
	[self takeScreenshot];
}

/**
 * Called when the user canceled the authorization dialog.
 */
-(void)fbDidNotLogin:(BOOL)cancelled {
	if (cancelled) {
		[message setString:@"Login cancelled. No Login, No Share, No Game! :)"];
	} else {
		[message setString:@"Error. Please try again."];
	}

	shareLayer.visible = YES;
}

Taking the screenshot, uploading to Facebook and handling the responses

This is where the real magic happens: sending the screenshot to Facebook. It’s a very simple GRAPH API call to “me/photos” that sends the UIImage we make with the CCDirector:screenshotUIImage method.

According to the documentation this call uploads an image to the application’s album in the user account: “We automatically create an album for your application if it does not already exist. All photos from your application will be published to the same automatically created album.”

- (BOOL) takeScreenshot
{
	UIImage *tempImage = [[CCDirector sharedDirector] screenshotUIImage];

	NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
								   tempImage,@"message",
								   nil];

	[facebook requestWithGraphPath:@"me/photos"
						 andParams:params
					 andHttpMethod:@"POST"
					   andDelegate:self];

	[message setString:@"Uploading screenshot. Please wait..."];
	shareLayer.visible = YES;

	return YES;
}

The last step is handling the responses: the upload may fail or be successful. For the first case we would need to alert the user about the error andshow the Facebook button again and enable a new upload, for the later we have to show a positive notification for the user. In both case we need to show the GUI layer again.

#pragma mark -
#pragma mark FBRequestDelegate
/**
 * Called when a request returns and its response has been parsed into
 * an object. The resulting object may be a dictionary, an array, a string,
 * or a number, depending on the format of the API response. If you need access
 * to the raw response, use:
 *
 * (void)request:(FBRequest *)request
 *      didReceiveResponse:(NSURLResponse *)response
 */
- (void)request:(FBRequest *)request didLoad:(id)result {
	[message setString:@"Photo posted in the \"APP NAME\" album on your account!"];
	shareLayer.visible = YES;

}

/**
 * Called when an error prevents the Facebook API request from completing
 * successfully.
 */
- (void)request:(FBRequest *)request didFailWithError:(NSError *)error {
	[message setString:@"Error. Please try again."];
	shareLayer.visible = YES;
}

Example/Template project

I’ve packed everything in a Cocos2D Xcode project, ready to be used and compiled: just change your Facebook App’s ID and adapt in your project.
Download the example project here.

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.

Tips #1: Cornerstone, AgileZen and Compressed Cocos2D textures with Texture Packer

 

I’m really busy this week, so this is not an article. I wanted to share some tips from what I’ve been dealing recently, that I found to be very useful.

Cocos2D pixel formats and highly compressed textures with Texture Packer

One of the games I’m working on has dozens of sprite sheets, and most of them are 2048×2048. That is a killer even for the iPhone 4 and iPad, and I can’t even consider older devices.

Consider using 4 Sprite Sheets at once that are 2048×2048 each and PNG: the game wouldn’t even run, because the consumed memory would be too big. Also, the loading times would be terrible.

What is the solution?

  1. Get Texture Packer.
  2. Group background images and other squared sprites in the same sprite sheet, choose the RGB565 pixel format, select “FloydSteinberg+Alpha” as the Dithering algorithm and export it as a compressed PVR texture (pvr.ccz). BINGO! The image looks the same as 32-bits pixel format, the file size is smaller than PNG, and the loading time is decreased from around 15s to 1s (at least with my 2048×2048 spritesheet!).
  3. For sprites with alpha/transparency required, you may use RGBA4444 + FloydSteinberg+Alpha for those with a few to no gradients, or even RGBA8888, but in both cases export them as pvr.ccz! Using RGBA4444 reduces the memory usage by half. For RGBA8888 you still have the same memory usage, but since it is pvr.ccz, at least the loading times are cut.The problem is that most of the times RGBA4444 looks bad, so you may give a chance to RGGBA8888 + PVR.CCZ.

To learn more about Texture Packer and Cocos2D textures, read How to Create and Optimize Sprite Sheets in Cocos2D with Texture Packer and Pixel Formats by Ray Wenderlich!

On the end: Texture Packer is probably the most important tool for a Cocos2D developer.

The real good Mac SVN Client: Cornerstone!

After I wrote the last article dealing with SVN, where I recommended Versions as the best Mac client, I received lots of suggestions in Twitter and in the comments to use Cornerstone. I decided to try it, and now I can’t even open Versions anymore. The only problem is buying another $59 license!

From a tweet I posted (that got retweeted by the developers of Cornerstone): “After using Cornerstone for some days, I can’t even use Versions anymore. It lacks everything and looks old. #svn”.

AgileZen and Lean project management

Got to know about agile lean project management yesterday, which lead me to meet AgileZen – probably the simplest project management system on earth, yet probably the most efficient.

You can read a good overview of AgileZen here: AgileZen for Solo Remote Development.

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.

How to setup a complete Project Management, Subversion and Issue Tracking ecosystem

 

I’m going to explain what kind of virtual (or “on the cloud”) development “ecosystem” I’ve been using for some time to manage lots of development/game projects at once. This includes personal as well client projects, where the client may interact with the development.

Note: everything expressed in this post is personal opinion covering what I’m using lately that is working for me and my clients. This post may look a bit commercial, but I’m not affiliated with any of the cited companies (I’m putting “pure” links, without any kind of affiliate link).

1) Register a domain

Since everything is on the cloud, the first thing you need is a domain. The cheapest I know and also my favorite is GoDaddy. A .com domain can go for as low as US$ 7.90~8.20.

2) Host with DreamHost

Why DreamHost? Because you can create unlimited SVN repositories (public and private) under your domain, with unlimited storage and bandwidth (that means you can extend your projects without worrying about paying more for additional users, space or even for new repositories). Also tons of additional features for very cheap (due to a promotion I paid US$ 6.80 for the first year! I’m love with it). See the complete list of features, as well sing up here.

3) Create two subdomains

In your DreamHost panel, create a subdomain for your repositories, I use svn.mydomain.com and create one for your project management system (I’ll show you that next). For that I chose pier.mydomain.com, but you can choose anything you want, like projects.yourdomain.com.

4) Create a MySQL database

Again in your DreamHost panel create a MySQL database and write down the connection details.

5) Download and install Project Pier

Project Pier is an open source online management system very similar to the ultra popular Basecamp from 37signals. It doesn’t have those hard features of project management (like Gantt Charts, etc), it simply deals with projects as Tasks, Messages, Files, Milestones, Tickets and optional Wiki per project.

Download it, upload and install it (it has a browser based installer, you don’t have to manually deal with uploading and changing database settings).

6) Add your project and invite clients/users

Using Project Pier is very easy and straightforward:

  1. Create a project.
  2. Create a “Client Company”.
  3. Add users to the client company.
  4. Set these users to the created project and give them appropriate permissions (permissions are related per project, which means that you may have hundreds of projects and the client will only see his related projects).
  5. Add milestones, tasks, files, etc, don’t forget to check notifications checkboxes when applied.

Now you can center everything related to your project in Project Pier and access everywhere: brainstorming, files, tasks, bug tracking, etc. Explain and invite your clients to not directly send project related emails, but to post Messages in Project Pier (everyone receives them by email after that).

Note that you can add “Private Items”: private milestones, tasks, etc that the involved clients won’t see. Those can be internal tasks/files/etc that you don’t want the client to see nor participate.

7) Create a SVN repository for your project

Again, that’s a matter of adding the repository via your DreamHost panel. Add your user as well users for others involved in the work.

8) Download a SVN client

I really recommending downloading a GUI SVN client, instead of dealing with command line sub-versioning. That will save you a bunch of time. There are dozens of SVN clients for Mac, you can check a brief comparison of some of them here. I actually like and use Versions, because it is very simple, it has practically every aspect of SVN and it is the cheapest one among all the others. I’ve never had any kind of problem with it.

9) Checkout, work, commit, work, commit, work, commit!

After you have created your repository and installed a SVN client, checkout your fresh new repository and now you can start adding/updating/working. Don’t forget to commit often!

10) Git, Mercurial and additional tips

Of course this is not the only way nor best path. There are different systems, options and hosts. As I wrote on the beginning of the post, I just wanted to share what I use. For additional options and tips, I recommend these #iDevBlogADay posts on the subject:

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.

How to outsource art for your game using freelancing sites

 

Paint PaletteAfter I published the post with the postmorten of my Christmas games – where I told that I outsourced the art in a fast and effective way (I won’t say cheap because that depends on the quality of the work you want) – I received 6 e-mails (which is a lot considering that I barely receive emails concerning a post) of persons wanting to know how to outsource and tips related to it: how to relate with the artist, how to post the job offer on freelancing sites, etc. Instead of answering one by one, I preferred to write this post about the subject, this way showing to anyone who wants the same. And even if you don’t plan to outsource, this may change your idea.

Note that I’m no expert in outsourcing, but what I did (and still do) worked: I got quality customized art and managed to talk publicly about my game without telling “secret” details; without the need of sending NDAs to be signed by the artists.

Where to find artists?

My favorite site and the one where I hired the artists is oDesk. I like oDesk because it has thousands of quality professionals and the system is very cool to use: the interface is the best among all freelancing sites. Also the site is very fast compared to the others.

The other big site is Elance. I still haven’t hired through eLance, but I always post here too. I also receive more proposals via Elance, but what I have seem so far is that the quality of the portfolios are higher on oDesk.

And the last one is Freelancer. This is the biggest of all sites with the highest number of freelancers, but I haven’t used it yet.

Know and list what you want

Before posting a job, to go this, that is the most important step in my opinion. You have to know what you need to be produced by the artist. Otherwise, how do you think that people will bid in your project? You have to know every detail of what you need to be drawn, designed, animated and painted, as well as the style that you want. You need this to know how much are you going to spend and how to choose the best artist.

To do this, you first need your game concept to be ready, this way you will be able to list almost every asset required by your game. I call this list “Art Assets Work List”.

Work ListHow do make an “Art Assets Work List”?

  1. Tell the drawing and painting style you want: cartoonish, pre-rendered 3D, pixel art, etc. You can also make it an artist’s choice (as I did).
  2. Tell in which environment the game goes on: medieval, cartoon, futuristic, etc. If the game has different environments, you will need to tell this in the list.
  3. Tell the file format: you may want all the art in a vector format, so you can resize or you may want pixel art in transparent PNGs. Don’t forget to tell that.
  4. List down all art assets needed.

Now to the good part. Listing them is pretty easy: just make a table with the name and description of the art asset required, dimensions, if it is animated and if so tell how many frames and what kind of animation is that, and additional notes.

I have uploaded to Google Docs the Art Assets Work List document I made for my game Santa in a Hurry, get it here. Feel free to use and change it as you wish.

After you made your list, attach it to your job opening, making it easier again to select contractors that have read your list and gave prices accordingly.

Know your budget and deadline

In your job opening in oDesk (or the site you choose), don’t forget to put your budget. This way you can get proposal accordingly without having to deal with low quality work or artists that are too expensive. Also tell when you want the final work delivered with all the sources.

Calendar, MilestoneSet Milestones

SET MILESTONES. If you don’t set milestones the artist will feel very comfortable and will keep working forever.

Examples: “first sketches by this date, first final polished item by this date, backgrounds by this another date” and so on. Actually this is very important when outsourcing any kind of task. Freelancers tend to take lots of work, so if you don’t guide them, they will keep taking new work and delaying what you asked (and probably paid) until they can (like near the deadline). Set milestones!

Don’t tell details about the game

If you already downloaded the list I provided you will notice that there are no details about the game itself. That’s just a pure list of what the artist needs to do. That’s why it is important to have your game concepts ready: this way you know what will be required in terms of art without actually telling about the game itself.

The point is that you have to go straight to the point: “I need an artist with portfolio to make art for a game. I need that you draw all the elements of my game, including its GUI. You have to follow a cartoonish style and provide me the original PSD files. See attached file for complete work list.”.

Don’t pay more than 20% upfront

The subtitle tell its all. And for most cases I advice paying 10%, nothing more (although on a job I’m working on, the artist set up the upfront to 40% and I didn’t see before hitting the “Hire” button… And then I had a good amount of money charged for an artist that I didn’t know before. And I’m feeling pretty bad for that – take care of this detail). Most freelancers agree with that. Just pay more than that if you already know the artist.

Maintain a good relation

If you liked the artist’s portfolio and if he is making good progress, there is no reason to not keep a Good Relation. This way the artist will work better for you and will even make better things than you asked. Also for future projects, you will have someone ready to work for you.

Karnak Games News

  • I have a secret big game project that’s been in production for almost 7 months already. I’m actually porting the game to Unity. First details will be revealed by March.
  • Reached 500 Twitter followers and 50 Facebook likes as of today! Help me end the year with at least 1000 twitter followers and 100 likes! Please, Follow me and like my Facebook page :)

Images used are royalty free photos from http://www.sxc.hu/.

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.

Don’t you dare waste your time. Work for your dreams. Live your dreams.

 

This post is not game nor game development related. It’s just a reflexion about “Dreams”, about “What can I do with my life?”. It applies to everyone’s life. Notice that is a bit abstract and a try to be motivational, but totally inspired by an Austin poetry video (video below).

Don’t you dare waste your time!

If you aren’t working right now in your best idea or in favor of your dreams then you are doing everything wrong.

In my everyday’s rush in trying to get more and only the best things, and noticing the chaotic world we live in, I notice and feel even more the need to DREAM. We need something to sustain and keep our bases strong, something that must keep us STRUGGLING.

Wake up everyday, work, lunch, work, dinner, sleep, go out with the family on the weekends. Loop through it. Repeat. It’s a pattern. Almost everyone is happy and satisfied with that. But even this repeating cycle has a meaning (even although it’s completely abstract): happiness. But where does this take us? The same cycle for 10, 20, 50 years?

I DON’T HAVE ENOUGH TIME / MONEY / SUPPORT / [INSERT ANY OTHER EXCUSE HERE]

You’re WRONG. It’s not a matter of chasing and struggling for your dreams when you have more time, when you have more money, when you are in the right place, when you have a bigger house or a better computer. This time will never come, because by then you will want a even bigger house or a even better computer, you will always think that you won’t have the time because you need to work to bring food home, and then you will keep locked in this repeating pattern. Maybe you think that working in your dreams looks like that you will lose the power to feed your family?

Here’s a tip: if you are in a place that you want to leave or if you are in a bad moment, adopt that as a reason to fight for a dream or for something you can do best: this way you will be able to leave this bad or repeating situation.

If you are still waiting for the “right moment”, sorry to say but it won’t come.

THE TIME IS NOW.

Yes, now, in this very own second. Start by changing your behavior, acts and thoughts – drive them accordingly to your dreams. You will se how things will start shining. Everything will be more pleasant and enjoyable.

Turn your dreams into your reason to live and bring them into your everyday’s activities. This good thing will spread to everyone around you, and then, they will start supporting and taking part of what you do and think. And everything will look even bigger.

Life is so fragile and at the same time, so short. I ask you, right now, what are you waiting for? Why aren’t you being everything you can be right now? *

One more time: If you aren’t working right now in your best idea or in favor of your dreams then you are doing everything wrong.

* Words by Gabrielle Bouliane that died by cancer last year and like a night before she gave a motivational speech about enjoying everyday as it was the last, and that you should never AVOID NOR DELAY something, because death can come anytime.

Her last speech, but ultra motivational video:

I originally wrote this text on Apr 20th, 2010. Additional inspiration from REWORK (controversy sometimes).
This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.

The year that was and goals for the new year

 

2010 was a fun and challenging year for me. I will never forget 2010, when one of the most important facts happened in my personal life: I got married. On the professional side, Karnak Games and DogPaw Mobile were created: I quitted my Web development career to start making games and mobile applications. Following are all events I can remember in a straightforward list (I’ll try to go into personal things very fast).

2010

  • On the personal side, some events to notice: I got married, bought a house, started studying how to draw, started studying art, studied pixel art, bought a second dog (a female one, to be Koda’s companion), traveled abroad for the first time (to Buenos Aires, Argentina), directed and edited for two months a TV show, made the last clients websites then decided to quit Web work, stopped procrastinating (I do everything at once now, while on the past I sadly used to be a pro-procrastinator) and many more smaller events.
  • I decided that in 2010 I was finally going to start making games: I started programming when I was 8 because I wanted to make games, but just in 2010 I took it seriously, mainly because of the AppStore which I was looking into since launch. But the problem is that before I didn’t have a Mac.
  • Full time indie developer.
  • Bought my first Mac, an iMac 27″ Core i5 on March. Turned out to be a Mac addict and Apple lover after 1 month of use. I can’t even touch Windows anymore.
  • Finally studied Photoshop seriously, and now I can do almost every thing with it. I just lack art skills and talent.
  • Karnak Games was created.
  • I finally started taking Twitter seriously and turned out to be a Twitter addicted. The Twitter account @KarnakGames was created and reached up to 400 followers.
  • Bought an iPod Touch 3G.
  • This blog became very active after I got my #iDevBlogADay spot, which I still have (well, this post is part of it :).
  • I learned Objective-C, Cocos2D and Box 2D.
  • Took a nice iPad application development task from a nice client – my first Objective-C coding. Planning and designing the application took me 60 days, while developing it took 30 days.
  • Bought a 64GB Wifi iPad and got dove deeper into my Apple obsession and addiction.
  • Made 2 games in 10 days (Santa in a Hurry and Present Catcher), which by the way are my first games ever, which accumulated sold around 1000 copies, not bad.

Karnak Games and me in 2011

  • Read and Learn even more: on 2010 I read and learned thousands of things, and I don’t plan to change that this year. Learning something new is what really keeps me motivated.
  • Release multi platform games and just one or two iOS exclusive titles. Since I’m a full time indie, I need to get revenue from the broadest possible range from my games. To accomplish this I’m using and loving Unity. I may consider Corona for one of the games.
  • Release 2 big games: one of them is already being designed, and at least one of them has to be free with IAPs.
  • Release 5 small games: at least of them has to have pixel art graphics made by myself.
  • Since I’ll make multi platform games: launch something on the Mac App Store.
  • Reach 800 Twitter followers.
  • Reach 100 Likes on our Facebook page (46 right now).
  • Go to USA or Canada, and participate on a local Game Jam or WWDC.
  • Participate on at least 3 game jams, one of them has to be Ludum Dare.
  • Get really good with Blender (I already know how to model, texture and animate, but I want to get professional).
  • Make a living with the games (I’m talking about a reasonable monthly revenue), so I can focus only on making games, and not taking client work anymore.

Tracking 2011 with a spreadsheet

To help summarize 2011 on the next year (I’m thinking on 2012 already) and help keeping me motivated I’m writing down everything (personal and professional) I’m doing in 2011 since day one, using Google Docs Spreadsheets. I just write a short summary of the earlier day, example:

1: We enjoyed the beach. Studied some advanced Unity stuff.
2: Drove back home. Started designing a new game “####”. etc…

I’m not writing down the days: the spreadsheet lines tells me which day of the year that record refers too. I also think that this will be fun to read on the future.

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.

Unity video tutorials and courses

 

As expressed on my last #iDevBlogADay post I’m “disconnected from my normal life” with just a Windows laptop (which I’m hating btw, I miss my Mac :(), and I’m taking this as an opportunity to share the way to learn 3D Modeling and Unity.

I love Unity for basically two reasons:

  • Easy way to do multi platform game development.
  • I want to create GAMES and GAME CONTENT instead of spending time on low level details and on programming game engines.

Free video tutorials and courses

  1. 3D Buzz – Over 7 hours of Unity Training Videos: I liked these videos so much that I watched them all in just one day (I know, it was heavy)! These videos teach how to work with Unity overall by making a 2D shooter with it. By the way, they cover scripting with C#.
  2. Unity3D Student: probably the most complete site on teaching Unity, divided by learning modules.
  3. Unity Jump Start – Video Tutorials – Proof Of Concept #1 – Space Shooter: another one that creates a 2D game.
  4. Video Tutorial: Making Tic Tac Toe in 25 minutes: (2D)
  5. Will Goldstone – Unity Tutorials: a 5-hour course focusing the creation of a 3D game from scratch with some Cinema4D lessons.
  6. Infinite Ammo – Unity3D Tutorial: Indie legend Alec Holowka (Aquaria) recorded this six parts video tutorials (all videos listed on this YouTube playlist).

More tutorials and references

Paid books and courses

Happy New Year!

2010 was an AMAZING year for me and I plan to write about this (on the Game Development angle) in the next #iDevBlogADay post. This makes my last post of 2010. See you in 2011! Happy New Year!

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.

Blender video tutorials and courses

 

BlenderOne of the most cool things of being an indie is that you have to be learning something new every time, otherwise you’re a dead indie game developer. And this is my favorite part: I love to learn new stuff. To be honest, I like studying and researching more than actually doing something – but as expressed on my last post a balance is necessary to avoid procrastination with never accomplishing something.

I’ll be disconnected from 24/Dec to 03/Jan with just a Windows notebook (I just have an iMac) – that means iOS development won’t be possible. That’s my chance to finally watch some videos I’ve been archiving forever. I’m talking about some 3D gaming video tutorials and courses.

More specifically Unity and Blender (I’ll skip writing about Unity for now).

Why Blender? Why not Maya? Cinema 4d? Or another one? Reason number 1: I already did some modeling with Blender on the past for the TV, even tho it was some basic stuff, anyway that counts as experience. The other reasons? See next.

Note: if you are looking only for the learning resources, scroll down the article to “Free video tutorials and courses” where I posted dozens of links to video tutorials and more!

3D modeling and animation tools

Blender InterfaceI researched about almost every 3D tool and installed the following ones (trial/demo versions, except for Blender):

  • Blender 2.49 and 2.55: both scared me off because once you open it it looks so complex and confusing (even more in case of version 2.49), but it’s FREE and has tons, tons and tons of tutorials.
  • Cheetah 3D: it’s OSX only and WOW what a nice piece of software, so compact, clean and cheap (~$149), not so many tutorials, but the few available cover almost everything.
  • Silo: another clean and cheap one (~$80), with nice video tutorials (for every level) from the official site. And from reading on the Unity forums, it misses some features which makes you still use another tool like Blender or Cinema 4D together with Silo.
  • Cinema 4D: very nice with thousands of learning resources, but the price is too big as I just want to try.

I also took in consideration the Unity support: Blender, Cheetah and Cinema are naturally integrated with Unity (check this nice comparison: 3D Modeling and Animation on OS X). Pull off Silo from the list (it is possible to use it or any tool with Unity but for these “non native” tools you need additional work and as a beginner on the subject I prefer to skip everything “additional” for now). Also skip Cinema 4D due to its price.

Blender and Cheetah 3D left. I sticked with Cheetah 3D. The interface is so clean and easy, I also started following some video tutorials pointed on the forums. And almost bought the official training. And was loving it…

Sintel on Blender…until I met this open movie project totally made with Blender and other open source tools. But what really convinced me was watching the one hour long making of. Everything involved is amazing and I thought “wow, this is something everyone can participate”.

Consider the fact of it being FREE, having an huge amount of learning resources and anamazing and also huge community… so why not giving it a try?

And it worked! I’m LOVING it. After just some hours of tutorials I feel so confident with the interface already. I can’t do anything good yet, but I already know the shortcuts and how stuff ties together on Blender. And that’s what I’ll share now: the FREE (hundreds of) learning resources I’m following!

Note: to use Blender 2.55 you will need to do some manual work when importing into Unity, since Unity still doesn’t natively support it. So, as most Unity users that use Blender, I’ll stick to version 2.49 until 2.55+ is supported.

Free video tutorials and courses

These links are posted in my order of preference so far and the order that I’m following, but you can pick any of them.

  1. Blender Underground – Learning Blender 3D: Covers Blender 2.44 (in our case, it is valid for Blender 2.49), I’m still following these videos and they are my favorite so far.
  2. Blender 3D Design Course: A MASSIVE amount of videos and exercises. As the title implies, it’s a complete course (2.5+).
  3. Blender 3D Design, Spring 2008 – Tufts OpenCourseWare: another MASSIVE amount of videos and exercises (2.4+).
  4. A Detailed Overview of the Blender Interface: 23 minutes of interface coverage (2.4+).
  5. Blender Cookie – Getting Started with Blender: looks good, but they charge for part of the content (2.5+).

Free books and general references

  1. Blender HotKeys In-depth Reference: the most important PDF I found, with every Blender hotkey (be prepared for a massive information overload).
  2. Hotkeys Map: the hotkeys mapped on a keyboard image – easier to follow than the PDF.
  3. Book – Essential Blender: a wiki-book available in the official site.
  4. Book – Blender 3D: Noob to Pro: another wiki-book.

Tutorials and community sites

Paid resources

Merry Christmas!

Christmas arrives in two days: MERRY CHRISTMAS EVERYONE! And if for some reason you still haven’t checked my Christmas Games, give them a try! Santa in a Hurry and Present Catcher (universal, Game Center, Retina Graphics): http://karnakgames.com/christmas.

Also remember that I’m running an iTunes Gift Cards contest! It’s very easy to take part: just follow me on Twitter and RT a message. Details: http://karnakgames.com/christmas.

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.