Posts Tagged ‘cocos2d-javascript’

Anyone here experienced with Cocos2D JS

Posted by (twitter: @jacklehamster)
Tuesday, February 11th, 2014 12:19 pm

I’m in the process of slowly moving out of my comfort zone, and try to learn to make games without Flash. Flash has had its moments, but the port to mobile is getting really clunky and impractical.

So, the obvious choice would be Unity, as it seems to grow in popularity and has the advantage of being cross platform. But I was also considering another option: Cocos2D JS

I’ve read some tutorials, and it seems like a nice concept: I make a game in JavaScript, make it work within the browser, then port it nicely to iOS and Android. But there some issues with it I could think of:
#1. Well… it’s not clear but… is this developed by Zynga? ;-P
#2. The IDE of choice seems to be cocosbuilder.com, and at the top of the page it says Cocos Builder is no longer maintained. (then it redirects me to SpriteBuider.com). Does it look like a red flag?
#3. Isn’t JavaScript slow?

The reason I’m not completely sold on Unity, is because I’m mostly a 2D game developer, and I would prefer something a little more lightweight. Unity seems to be for the kind of devs who like to incorporate APIs, engines. I’m the kind of dev who’d rather implement basic collision detection than use a physics engine in my game.

Anyway, just looking for other dev’s thoughts about it. Thanks

The Barrier

Posted by (twitter: @luisparravicini)
Sunday, August 25th, 2013 5:33 am

The game is based on the “10-second barrier“, which is “a term used in track and field athletics, which refers to the physical and psychological barrier of completing 100 metres sprint in under ten seconds.”.

In this case you have to run 100 meters in exactly 10 seconds. And you are an alien!

 

Play The Barrier

 

And here’s the dev timelapse: The Barrier – Ludum Dare 27

 

Oh yeah I’m in

Posted by (twitter: @Nehmulos)
Friday, December 14th, 2012 2:23 pm

After I made my warmup game (play) here’s the obligatory I’m in post:

Html5 Warmup game

Posted by (twitter: @Nehmulos)
Friday, December 14th, 2012 1:47 am

Html5 Base-App

Posted by (twitter: @Nehmulos)
Sunday, December 9th, 2012 10:37 am

This weekend I created the base that I’m going to use for the next Ludum Dare.
It uses cocos2d-javascript for graphics, box2d.js for physics and a custom Audiomanager.

If you want to get started with cocos2d-javascript, a look on my source code might be useful for you, since the tutorials are outdated.

Physics
I have a custom PhysicsNode class that provides a simple constructor for box2d shapes and synchronizes a cocos2d graphics node with the box2d.body.

Preloading images
I modified cocos2d-javascript to allow simple resource preloading from javascript.
Earlier versions required you to use the cocos2d commandline tool that merged all your files.
Now you can just write this in your Application.js file:

registerResource("images/myimage.png", "image/png");

Audio
The custom Audiomanager first checks which codecs are supported,
when you give it an audio file to preload it will use the first url for a supported format:

Audiomanager.instance.load({
    "ogg": "audio/blub.ogg",
    "aac": "audio/conversions/blub.aac"
},"blub");

Then you can play it with using the given alias

Audiomanager.instance.play("blub");

The repository also contains a small bash script that converts all ogg files in the audio directory into aac and wav files using ffmepg.

Please feel free to use this base for your own games.
It’s licensed under the zlib license, which means: do WTF you want, just don’t claim, that you wrote code that was written by others.

You can test it here.

[cache: storing page]