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

[:en]

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.[:fr]

Partie 1 – Installation de FlashBox2D (box2d) avec WCK

J’ai décidé de rédiger un petit tutoriel chaque vendredi. :)

Introduction

Aujourd’hui je vais vous montrer comment créer un jeu comme Angry Birds en plusieurs étapes avec un moteur physique en Flash.

Le fameux moteur physique s’appelle Box2D. 95% des jeux en 2D avec de la physique utilisent ce moteur : Angry birds, Limbo, Bad piggies, etc.
La version originale de Box2D a été développée en C++. Pour plus d’informations visitez le site Box2D C++. Ce moteur a été porté en ActionScript 3.0 appelé box2DFlash.

Box2DFlash

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

Box2DFlash est un moteur physique très puissant mais difficile à utiliser si vous n’êtes pas un bon programmeur et si vous n’avez pas d’éditeur de niveaux visuels.
C’est pourquoi je suggère d’utiliser le framework World Construction Kit (WCK).

World Construction Kit (WCK)

Site web : http://www.sideroller.com/wck/

Voici la description de World Construction Kit en anglais provenant du site :

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

Malheureusement le framework n’est plus maintenu à jour. Néanmoins il est reste très complet et performant.

Installation

  • Télécharger et installer : Adobe Flash Pro
  • Télécharger le framework WCK depuis github: https://github.com/jesses/wck (Télécharger le Zip si vous n’avez pas de client git)

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

  • Extraire tous les fichiers du zip dans un dossier.
  • Ouvrir le fichier BlankProject/main.fla  depuis le dossier fraichement décompressé.
  • Voilà Box2D est déjà préinstallé avec le framework WCK.
  • Tester l’animation avec CTRL + Entrée ou CMD + Entrée sous OS X.
  • Vous devriez voir cela :

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

Dans le prochain tutoriel je vais vous montrer comment construire et paramétrer un niveau avec le moteur Box2D à l’aide de WCK en Flash.[:]

Author: Benoit Freslon