Get the full commented source code of

HTML5 Suika Watermelon Game

Talking about Actionscript 3, Box2D and Flash.

Do you remember Bisonkick? I already blogged about it almost three years ago, it was an easy way to design levels for physics games, and during this time the project evolved a lot, including a bunch of new features such as:

Cloud space: your designs can be saved in the cloud service provided by Bisonkick and played by other users, or kept private for your eyes only.

Joints, events, and more: you can add squares, circles, and polygons. Connect them with all different joints. Use collision, keyboard, mouse or other events to make your game instantly playable by others. Add goals and redirects for when a user hits that goal.

Code generator: according to the format you decide to export your designs, Bisonkick will generate code for you.

This is the most interesting feature: look at what I did in about a minute:

Once I exported the design for AS3, I got an entire class:

package {
	public class Levels {
		public static const LEVEL_1:Object = {shapes:[{
		  bodytype : "static",
		  h : "20.0000",
		  nameid : "Bez6B-27",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "Uv15Nza",
		  w : "640.0000",
		  x : "0.0000",
		  y : "460.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "40.0000",
		  nameid : "base_brick_left",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "mpMrgkK",
		  w : "40.0000",
		  x : "194.0000",
		  y : "421.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "40.0000",
		  nameid : "base_brick_right",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "mkOLWBP",
		  w : "40.0000",
		  x : "394.0000",
		  y : "420.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "50.0000",
		  nameid : "mid_brick_left",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "JcbRAdE",
		  w : "50.0000",
		  x : "189.0000",
		  y : "370.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "50.0000",
		  nameid : "mid_brick_right",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "6SbMopz",
		  w : "50.0000",
		  x : "389.0000",
		  y : "370.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "80.0000",
		  nameid : "top_brick_left",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "czJfWTK",
		  w : "80.0000",
		  x : "174.0000",
		  y : "291.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "80.0000",
		  nameid : "top_brick_right",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "5FY4zCq",
		  w : "80.0000",
		  x : "374.0000",
		  y : "290.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "50.0000",
		  nameid : "large_brick",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "TVpE0mS",
		  w : "400.0000",
		  x : "114.0000",
		  y : "241.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "50.0000",
		  nameid : "border_brick_left",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "lFy2dsM",
		  w : "50.0000",
		  x : "114.0000",
		  y : "191.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "50.0000",
		  nameid : "dCqsy-37",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "square",
		  uid : "SEi6WM4",
		  w : "50.0000",
		  x : "464.0000",
		  y : "191.0000"}
		,
		{
		  bodytype : "dynamic",
		  h : "60.0000",
		  nameid : "ball",
		  pinned : false,
		  props : {
		    id : "properties"}
		,
		  rotation : "0.0000",
		  type : "circle",
		  uid : "iUTtZCh",
		  w : "60.0000",
		  x : "294.0000",
		  y : "180.0000"}
		],
		joints: [],
		events:[]
		};
	}
}

At this time I was able to use the class with the BisonkickSample class provided in the resources you can access when you register, and without writing any line of code I just had the NAPE simulation of my project running like a charm:

You can also drag and drop bodies with the mouse.

And if you want to see a fully featured project, go to this link and see what this library is capable of.

Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.