Tutorial: How to create a game like Angry Birds with box2D, World Construction Kit and Flash – Part 1

Part1 – Box2D installation with WCK installation in Flash

I decided to write a tutorial every friday. :)

Introduction

Today I will show you how to make a game like Angry Birds with a physics engine with Flash.

The famous Physics engine is named Box2D. 95% of 2D games with physic use this engine. (Angry Birds, Limbo, Bad piggies, etc.).
The original engine is written in C++ language. Look at the Box2D C++ website. But this engine was ported in ActionScript 3.0 his codename is box2DFlash.

Box2DFlash

[swf:http://www.box2dflash.org/swf/main_demo_21a.swf 512 288]

Box2DFlash is a powerful engine but it’s very difficult to use if you are not a good programmer or if you don’t have a level editor to create your levels with a WYSIWYG layout.
That’s why I suggest to use the World Construction Kit framework.

World Construction Kit

See the Wolrd Construction Kit Framework website: http://www.sideroller.com/wck/

Summary: World Construction Kit is is a toolset / framework for rapidly developing physics based games / websites within the Flash IDE. WCK allows you to layout your 2d worlds / game levels entirely within Flash and have them hook into the physics simulation without writing any code

Installation

  • Downloads and install: Adobe Flash Pro
  • Download the WCK from github: https://github.com/jesses/wck (Download the Zip if you don’t have a git client)

Capture d’écran 2013-03-15 à 00.09.05

  • Extract the WCK zip content in a folder.
  • Open the BlankProject/main.fla from the folder you just extract.
  • The Box2D engine and the WCK framework are ready to use!
  • Test the animation hit CTRL+Enter or CMD+Enter with OS X.
  • You should see this

[swf:/wp-content/uploads/2013/03/main.swf 550 400]

In the next tutorial I will show you how to construct a basic level with box2D Flash and WCK.