“Tipsy Tower” HTML5 prototype made with Panda 2 – a powerful JavaScript based game development platform

Read all posts about "" game
Do you remember Panda.js? It was a promising HTML5 framework, I used it to create a demo version of Circle Chain and a physics demo. I said “it was a promising HTML5 framework” because now we don’t have a framework but a whole game development platform called Panda 2. In the above picture, you can see Panda2 running a Tipsy Tower script. And there’s a Three.js powered 3D version on its way, check this video to see how it’s working. Look at the 2D game at the moment, powered by p2.js physics
Click to drop a crate. Back to Panda 2, it includes all the features you may expect from a game development platform, such as: * Panda game engine, a powerful open source framework to create HTML5 games. * a powerful JavaScript code editor with multiple themes, keyboard shortcuts and auto-complete. * a game view to see your game running right next to the code editor and see changes instantly with live updates as you save your code, along with Game view it’s own JavaScript console for easy debugging. * a Panda Remote app allowing you to see your project as a fullscreen native app on unlimited number of tablets and mobile devices on the same Wifi network. * a sidebar to see all your classes, scenes, and assets. * different way to export your projects, such as a web build to make your games run in browsers or as Cordova project if you want to wrap your game as native app for platforms like Android and iOS. Do you want to have a look at the source code of Tipsy Tower to see how easy it was to create it? Here it is:
game.module(
    'game.main'
)
.require(
    'plugin.p2'
)
.body(function() {

game.addAsset('crate.png');
game.addAsset('ground.png');

game.createScene('Main', {
    backgroundColor: '#003a72',
    canDrop: true,
    crates: [],
    
    init: function() {
        this.world = new game.Physics();
        
        var ground = new game.PhysicsSprite('ground.png', game.width / 2, 960);
        ground.addTo(this.stage);
        
        this.moving = new game.Sprite('crate.png');
        this.moving.anchorCenter();
        this.moving.position.set(77);
        game.Tween.add(this.moving.position, {
            x: game.width - this.moving.width
        }, 1300, {
            repeat: Infinity,
            yoyo: true
        }).start();
        this.moving.addTo(this.stage);
    },
    
    mousedown: function() {
        if (!this.canDrop) return;
        
        this.canDrop = false;
        this.moving.visible = false;
        
        var crate = new game.PhysicsSprite('crate.png', this.moving.x, this.moving.y, {
            mass: 1
        });
        crate.addTo(this.stage);
        this.crates.push(crate);
        
        game.Timer.add(500, this.reset.bind(this));
    },
    
    reset: function() {
        this.canDrop = true;
        this.moving.visible = true;
    },
    
    update: function() {
        for (var i = this.crates.length - 1; i >= 0; i--) {
            if (this.crates[i].y > game.height + this.crates[i].height) {
                this.crates[i].remove();
                this.crates.splice(i, 1);
            }
        }
    }
});

});
Just a few lines, as you may expect from any serious game framework. You can play with it by downloading the source code. Panda 2 will help you to develop your games faster, thanks to a robust editor and a powerful framework. I will publish some tutorials during next days, meanwhile have a look at Panda 2.

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

215 GAME PROTOTYPES EXPLAINED WITH SOURCE CODE
// 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