HTML5 commented source code of commercial game Globez updated to Phaser 2.5.0 with a special offer to get the source code of my latest game

Read all posts about "" game
With the latest release of Phaser 2.5.0 it’s time to update the Globez HTML5 game available for download. One of the things I love the most when I self-publish my products is I can support old time customers releasing free updates, as well as mantain up to date products for new customers. Globez is one of the games I made I love the most, not only bacause I got some interesting revenue with my first Flash version which has also been ported to iOS, but also because a lot of games have been created starting from the AS3 source code, making readers learn how to create a full commercial Flash game. With the increasing interest of HTML5 games, I used my HTML5 Globez engine to create Sea Life Vs Mines which was published by FGL and Christmas Quest, my Christmas 2014 game with 100 levels. And my latest game, Drawsum, was also created with this engine. This is the game you are going to create, playable from your mobile device from this link:
If you are a long term reader of the blog, you should know I comment every single line of the code I publish, but just to give you an idea, this is an excerpt:
addTile: function(row, col){

     We have to generate a random number to decide which color to assign to
     the newly created globe
     Phaser has a nice way to generate random integer numbers. Just use
     game.rnd.between(0, - 1)
     and you will have an integer number between 0 and
     To achieve the same result with pure JavaScript, you would have to write
	var randomTile = game.rnd.between(0, - 1);
	determining globe x and y position according to tile size and offset
	var tileXPos = + col* + / 2;
	var tileYPos = + row* + / 2;
	adding the globe itself. Look. This is not an image. It's a sprite.
	What's the difference between an image and a sprite?
	The difference between an image and a sprite is that you cannot animate
	or add a physics body to an image
	Actually, this game could be done using images only, but I wanted you
	to know there are also sprites, and in more complex situations you may
	want to use sprites rather than images
	I would suggest to use images for logos, menus and screens, and sprites
	for the game itself
	var theTile = game.add.sprite(tileXPos, tileYPos, "tiles");
	assigning the randomly chosen frame to the sprite
	theTile.frame = randomTile;
	we don't want all globes to look the same, so we are rotating it a bit
	by a random angle. This will improve how the game looks
	theTile.angle = game.rnd.between(-20, 20);
	placing the anchor point in the center of the sprite. Notice everything you
	learned about images applies to sprites too
	placing the globe in tile array
	tileArray[row][col] = theTile;
	and finally adding it to tileGroup group
Did you find this code clear enough? The whole game is explained this way, and you will learn, among other things, how to: * create and manage game states * preload graphic assets, fonts and sounds * show a loading bar * create particle cascades and explosions * add images and sprites * manage group of images and sprites * create animation tweens * handle sprite sheets, also known as texture atlases * create and trigger buttons * handle click and finger inputs * manage timed events * play sounds * scale the game to fit on any device * cross-platform: create once, play everywhere * pass variables through states * use bitmap fonts * and above all… create a complete game, from boot scene to game over scene And there is a special bonus for you loyal readers, if you get the game before July 15, 2016, you’ll get the free update with Drawsum source code before the end of July. This also applies to old customers, no matter the tier you choose.
[pricing_table columns=”3″] [pricing_table_column title=”Uncommented source code” currency=”$” price=”9.99″][icon_list][icon_list_item type=”check”]Full source code[/icon_list_item][icon_list_item type=”times” style=”color: red;”]Comments to explain the code line by line[/icon_list_item][icon_list_item type=”times” style=”color: red;”]Up to 5 hours of support to create your game[/icon_list_item][/icon_list]
[/pricing_table_column] [pricing_table_column featured=”true” featured_sub=”Featured” title=”Commented source code” currency=”$” price=”19.99″][icon_list][icon_list_item type=”check”]Full source code[/icon_list_item][icon_list_item type=”check”]Comments to explain the code line by line[/icon_list_item][icon_list_item type=”times” style=”color: red;”]Up to 5 hours of support to create your game[/icon_list_item][/icon_list]
[/pricing_table_column] [pricing_table_column title=”Supported source code” currency=”$” price=”149.99″][icon_list][icon_list_item type=”check”]Full source code[/icon_list_item][icon_list_item type=”check”]Comments to explain the code line by line[/icon_list_item][icon_list_item type=”check”]Up to 5 hours of support to create your game[/icon_list_item][/icon_list]
[/pricing_table_column] [/pricing_table] A special thank you to all readers who will support the blog as well as the ones who already supported it.

Get the most popular Phaser 3 book

Through 202 pages, 32 source code examples and an Android Studio project you will learn how to build cross platform HTML5 games and create a complete game along the way.

Get the book

// 1+2=3
// 100 rounds
// 10000000
// 2 Cars
// 2048
// A Blocky Christmas
// A Jumping Block
// A Life of Logic
// Angry Birds
// Angry Birds Space
// Artillery
// Astro-PANIC!
// Avoider
// Back to Square One
// Ball Game
// Ball vs Ball
// Ball: Revamped
// Balloon Invasion
// BallPusher
// Ballz
// Bar Balance
// Bejeweled
// Biggification
// Block it
// Blockage
// Bloons
// Boids
// Bombuzal
// Boom Dots
// Bouncing Ball
// Bouncing Ball 2
// Bouncy Light
// BoxHead
// Breakout
// Bricks
// Bubble Chaos
// Bubbles 2
// Card Game
// Castle Ramble
// Chronotron
// Circle Chain
// Circle Path
// Circle Race
// Circular endless runner
// Cirplosion
// CLOCKS - The Game
// Color Hit
// Color Jump
// ColorFill
// Columns
// Concentration
// Crossy Road
// Crush the Castle
// Cube Jump
// CubesOut
// Dash N Blast
// Dashy Panda
// Deflection
// Diamond Digger Saga
// Don't touch the spikes
// Dots
// Down The Mountain
// Drag and Match
// Draw Game
// Drop Wizard
// DROP'd
// Dudeski
// Dungeon Raid
// Educational Game
// Elasticity
// Endless Runner
// Erase Box
// Eskiv
// Farm Heroes Saga
// Filler
// Flappy Bird
// Fling
// Flipping Legend
// Floaty Light
// Fuse Ballz
// GearTaker
// Gem Sweeper
// Globe
// Goat Rider
// Gold Miner
// Grindstone
// GuessNext
// Helicopter
// Hero Emblems
// Hero Slide
// Hexagonal Tiles
// HookPod
// Hop Hop Hop Underwater
// Horizontal Endless Runner
// Hundreds
// Hungry Hero
// Hurry it's Christmas
// InkTd
// Iromeku
// Jet Set Willy
// Jigsaw Game
// Knife Hit
// Knightfall
// Legends of Runeterra
// Lep's World
// Line Rider
// Lumines
// Magick
// MagOrMin
// Mass Attack
// Math Game
// Maze
// Meeblings
// Memdot
// Metro Siberia Underground
// Mike Dangers
// Mikey Hooks
// Nano War
// Nodes
// o:anquan
// One Button Game
// One Tap RPG
// Ononmin
// Pacco
// Perfect Square!
// Perfectionism
// Phyballs
// Pixel Purge
// PixelField
// Planet Revenge
// Plants Vs Zombies
// Platform
// Platform game
// Plus+Plus
// Pocket Snap
// Poker
// Pool
// Pop the Lock
// Pop to Save
// Poux
// Pudi
// Pumpkin Story
// Puppet Bird
// Pyramids of Ra
// qomp
// Quick Switch
// Racing
// Radical
// Rebuild Chile
// Renju
// Rise Above
// Risky Road
// Roguelike
// Roly Poly
// Run Around
// Rush Hour
// SameGame
// SamePhysics
// Save the Totem
// Security
// Serious Scramblers
// Shrink it
// Sling
// Slingy
// Snowflakes
// Sokoban
// Space Checkers
// Space is Key
// Spellfall
// Spinny Gun
// Splitter
// Spring Ninja
// Sproing
// Stabilize!
// Stack
// Stairs
// Stick Hero
// String Avoider
// Stringy
// Sudoku
// Super Mario Bros
// Surfingers
// Survival Horror
// Talesworth Adventure
// Tetris
// The Impossible Line
// The Moops - Combos of Joy
// The Next Arrow
// Threes
// Tic Tac Toe
// Timberman
// Tiny Wings
// Tipsy Tower
// Toony
// Totem Destroyer
// Tower Defense
// Trick Shot
// Tunnelball
// Turn
// Turnellio
// TwinSpin
// vvvvvv
// Warp Shift
// Way of an Idea
// Whack a Creep
// Wheel of Fortune
// Where's my Water
// Wish Upon a Star
// Word Game
// Wordle
// Worms
// Yanga
// Yeah Bunny
// Zhed
// zNumbers